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
35 #include "wine/heap.h"
36 #include "wine/list.h"
37 #include "wine/debug.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
49 char* __cdecl
_Getdays(void);
50 wchar_t* __cdecl
_W_Getdays(void);
51 char* __cdecl
_Getmonths(void);
52 wchar_t* __cdecl
_W_Getmonths(void);
53 void* __cdecl
_Gettnames(void);
54 unsigned int __cdecl
___lc_codepage_func(void);
55 int __cdecl
___lc_collate_cp_func(void);
56 const unsigned short* __cdecl
__pctype_func(void);
57 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, size_t);
58 const locale
* __cdecl
locale_classic(void);
61 wchar_t ** __cdecl
___lc_locale_name_func(void);
63 LCID
* __cdecl
___lc_handle_func(void);
67 #define locale_string basic_string_char
68 #define locale_string_char_ctor(this) MSVCP_basic_string_char_ctor(this)
69 #define locale_string_char_ctor_cstr(this,str) MSVCP_basic_string_char_ctor_cstr(this,str)
70 #define locale_string_char_copy_ctor(this,copy) MSVCP_basic_string_char_copy_ctor(this,copy)
71 #define locale_string_char_dtor(this) MSVCP_basic_string_char_dtor(this)
72 #define locale_string_char_c_str(this) MSVCP_basic_string_char_c_str(this)
73 #define locale_string_char_assign(this,assign) MSVCP_basic_string_char_assign(this,assign)
75 #define locale_string _Yarn_char
76 #define locale_string_char_ctor(this) _Yarn_char_ctor(this)
77 #define locale_string_char_ctor_cstr(this,str) _Yarn_char_ctor_cstr(this,str)
78 #define locale_string_char_copy_ctor(this,copy) _Yarn_char_copy_ctor(this,copy)
79 #define locale_string_char_dtor(this) _Yarn_char_dtor(this)
80 #define locale_string_char_c_str(this) _Yarn_char_c_str(this)
81 #define locale_string_char_assign(this,assign) _Yarn_char_op_assign(this,assign)
83 #define locale_string_wchar _Yarn_wchar
84 #define locale_string_wchar_ctor(this) _Yarn_wchar_ctor(this)
85 #define locale_string_wchar_dtor(this) _Yarn_wchar_dtor(this)
86 #define locale_string_wchar_c_str(this) _Yarn_wchar__C_str(this)
87 #define locale_string_wchar_assign(this,str) _Yarn_wchar_op_assign_cstr(this,str)
96 typedef struct _locale__Locimp
{
98 locale_facet
**facetvec
;
112 locale_string months
;
113 #if _MSVCP_VER >= 110
114 locale_string_wchar wdays
;
115 locale_string_wchar wmonths
;
117 locale_string oldlocname
;
118 locale_string newlocname
;
126 #if _MSVCP_VER >= 110
138 const char *grouping
;
141 const char *false_name
;
142 const char *true_name
;
147 const char *grouping
;
150 const wchar_t *false_name
;
151 const wchar_t *true_name
;
157 #if _MSVCP_VER <= 100
173 const wchar_t *months
;
178 /* ?_Id_cnt@id@locale@std@@0HA */
179 int locale_id__Id_cnt
= 0;
181 static locale classic_locale
;
183 /* ?_Global@_Locimp@locale@std@@0PAV123@A */
184 /* ?_Global@_Locimp@locale@std@@0PEAV123@EA */
185 locale__Locimp
*global_locale
= NULL
;
187 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
188 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
189 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
191 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
193 if(this->strbuf
&& !this->got
) {
194 int c
= basic_streambuf_char_sgetc(this->strbuf
);
205 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
207 if(this->strbuf
&& !this->got
) {
208 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
219 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
221 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
226 istreambuf_iterator_char_val(this);
230 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
232 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
237 istreambuf_iterator_wchar_val(this);
241 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
243 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
247 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
249 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
253 /* ??1facet@locale@std@@UAE@XZ */
254 /* ??1facet@locale@std@@UEAA@XZ */
255 /* ??1facet@locale@std@@MAA@XZ */
256 /* ??1facet@locale@std@@MAE@XZ */
257 /* ??1facet@locale@std@@MEAA@XZ */
258 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
259 void __thiscall
locale_facet_dtor(locale_facet
*this)
261 TRACE("(%p)\n", this);
264 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
265 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
266 locale_facet*, (locale_facet*, unsigned int), (this, flags))
267 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
269 TRACE("(%p %x)\n", this, flags
);
271 /* we have an array, with the number of elements stored before the first object */
272 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
274 for(i
=*ptr
-1; i
>=0; i
--)
275 locale_facet_dtor(this+i
);
276 MSVCRT_operator_delete(ptr
);
278 locale_facet_dtor(this);
280 MSVCRT_operator_delete(this);
291 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
293 /* Not exported from msvcp90 */
294 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
295 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
296 void __cdecl
locale_facet_register(locale_facet
*add
)
298 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
300 ERR("Out of memory\n");
301 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
305 list_add_head(&lazy_facets
, &head
->entry
);
308 /* Not exported from msvcp90 */
309 /* ?_Register@facet@locale@std@@QAEXXZ */
310 /* ?_Register@facet@locale@std@@QEAAXXZ */
311 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
312 void __thiscall
locale_facet__Register(locale_facet
*this)
314 TRACE("(%p)\n", this);
315 locale_facet_register(this);
318 /* Not exported from msvcp90 */
319 /* ??_7facet@locale@std@@6B@ */
320 extern const vtable_ptr locale_facet_vtable
;
322 /* ??0id@locale@std@@QAE@I@Z */
323 /* ??0id@locale@std@@QEAA@_K@Z */
324 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
325 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, size_t id
)
327 TRACE("(%p %Iu)\n", this, id
);
333 /* ??_Fid@locale@std@@QAEXXZ */
334 /* ??_Fid@locale@std@@QEAAXXZ */
335 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
336 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
338 TRACE("(%p)\n", this);
344 /* ??Bid@locale@std@@QAEIXZ */
345 /* ??Bid@locale@std@@QEAA_KXZ */
346 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
347 size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
351 TRACE("(%p)\n", this);
354 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
355 this->id
= ++locale_id__Id_cnt
;
362 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
363 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
364 int* __cdecl
locale_id__Id_cnt_func(void)
367 return &locale_id__Id_cnt
;
370 /* ??_Ffacet@locale@std@@QAEXXZ */
371 /* ??_Ffacet@locale@std@@QEAAXXZ */
372 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
373 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
375 TRACE("(%p)\n", this);
376 this->vtable
= &locale_facet_vtable
;
381 /* ??0facet@locale@std@@IAE@I@Z */
382 /* ??0facet@locale@std@@IEAA@_K@Z */
383 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
384 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, size_t refs
)
386 TRACE("(%p %Iu)\n", this, refs
);
387 this->vtable
= &locale_facet_vtable
;
392 /* ?_Incref@facet@locale@std@@QAEXXZ */
393 /* ?_Incref@facet@locale@std@@QEAAXXZ */
394 /* ?_Incref@facet@locale@std@@UAEXXZ */
395 /* ?_Incref@facet@locale@std@@UEAAXXZ */
396 #if _MSVCP_VER >= 110
397 #define call_locale_facet__Incref(this) CALL_VTBL_FUNC(this, 4, void, (locale_facet*), (this))
399 #define call_locale_facet__Incref locale_facet__Incref
401 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
402 void __thiscall
locale_facet__Incref(locale_facet
*this)
406 TRACE("(%p)\n", this);
408 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
413 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
414 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
415 /* ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ */
416 /* ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ */
417 #if _MSVCP_VER >= 110
418 #define call_locale_facet__Decref(this) CALL_VTBL_FUNC(this, 8, \
419 locale_facet*, (locale_facet*), (this))
421 #define call_locale_facet__Decref locale_facet__Decref
423 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
424 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
429 TRACE("(%p)\n", this);
431 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
435 ret
= this->refs
? NULL
: this;
441 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
442 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
443 size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
445 TRACE("(%p %p)\n", facet
, loc
);
449 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@@Z */
450 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@@Z */
451 size_t __cdecl
locale_facet__Getcat_old(const locale_facet
**facet
)
453 TRACE("(%p)\n", facet
);
457 /* ??0_Timevec@std@@QAE@ABV01@@Z */
458 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
459 /* This copy constructor modifies copied object */
460 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
461 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
463 TRACE("(%p %p)\n", this, copy
);
464 this->timeptr
= copy
->timeptr
;
465 copy
->timeptr
= NULL
;
469 /* ??0_Timevec@std@@QAE@PAX@Z */
470 /* ??0_Timevec@std@@QEAA@PEAX@Z */
471 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
472 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
474 TRACE("(%p %p)\n", this, timeptr
);
475 this->timeptr
= timeptr
;
479 /* ??_F_Timevec@std@@QAEXXZ */
480 /* ??_F_Timevec@std@@QEAAXXZ */
481 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
482 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
484 TRACE("(%p)\n", this);
485 this->timeptr
= NULL
;
489 /* ??1_Timevec@std@@QAE@XZ */
490 /* ??1_Timevec@std@@QEAA@XZ */
491 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
492 void __thiscall
_Timevec_dtor(_Timevec
*this)
494 TRACE("(%p)\n", this);
498 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
499 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
500 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
501 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
503 TRACE("(%p %p)\n", this, right
);
504 this->timeptr
= right
->timeptr
;
505 right
->timeptr
= NULL
;
509 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
510 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
511 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
512 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
514 TRACE("(%p)\n", this);
515 return this->timeptr
;
518 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
519 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
520 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
522 const char *locale
= NULL
;
524 /* This function is probably modifying more global objects */
525 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
528 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
530 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
531 locale_string_char_ctor(&locinfo
->days
);
532 locale_string_char_ctor(&locinfo
->months
);
533 #if _MSVCP_VER >= 110
534 locale_string_wchar_ctor(&locinfo
->wdays
);
535 locale_string_wchar_ctor(&locinfo
->wmonths
);
537 locale_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
540 locale
= setlocale(LC_ALL
, locstr
);
542 locale
= setlocale(LC_ALL
, NULL
);
545 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
547 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
552 /* ??0_Locinfo@std@@QAE@HPBD@Z */
553 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
554 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
555 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
557 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
560 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
561 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
562 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
564 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
567 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
568 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
569 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
570 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
572 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
575 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
576 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
577 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
579 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
582 /* ??0_Locinfo@std@@QAE@PBD@Z */
583 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
584 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
585 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
587 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
590 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
591 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
592 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
594 TRACE("(%p)\n", locinfo
);
596 setlocale(LC_ALL
, locale_string_char_c_str(&locinfo
->oldlocname
));
597 locale_string_char_dtor(&locinfo
->days
);
598 locale_string_char_dtor(&locinfo
->months
);
599 #if _MSVCP_VER >= 110
600 locale_string_wchar_dtor(&locinfo
->wdays
);
601 locale_string_wchar_dtor(&locinfo
->wmonths
);
603 locale_string_char_dtor(&locinfo
->oldlocname
);
604 locale_string_char_dtor(&locinfo
->newlocname
);
605 _Lockit_dtor(&locinfo
->lock
);
608 /* ??_F_Locinfo@std@@QAEXXZ */
609 /* ??_F_Locinfo@std@@QEAAXXZ */
610 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
611 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
613 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
616 /* ??1_Locinfo@std@@QAE@XZ */
617 /* ??1_Locinfo@std@@QEAA@XZ */
618 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
619 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
621 _Locinfo__Locinfo_dtor(this);
624 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
625 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
626 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
628 const char *locale
= NULL
;
630 /* This function is probably modifying more global objects */
631 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
633 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
635 locale_string_char_dtor(&locinfo
->newlocname
);
638 locale
= setlocale(LC_ALL
, locstr
);
640 locale
= setlocale(LC_ALL
, NULL
);
643 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
645 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
650 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
651 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
652 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
653 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
655 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
658 static _Collvec
* getcoll(_Collvec
*ret
)
662 ret
->page
= ___lc_collate_cp_func();
664 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
666 ret
->lc_name
= ___lc_locale_name_func()[LC_COLLATE
];
672 #if defined(__i386__) || _MSVCP_VER<110
673 ULONGLONG __cdecl
_Getcoll(void)
677 C_ASSERT(sizeof(_Collvec
) <= sizeof(ULONGLONG
));
679 getcoll((_Collvec
*)&ret
);
683 _Collvec
* __cdecl
_Getcoll(_Collvec
*ret
)
689 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
690 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
691 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
692 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
698 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
701 #if _MSVCP_VER >= 110
708 ret
->page
= ___lc_codepage_func();
710 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
712 if((name
= ___lc_locale_name_func()[LC_COLLATE
])) {
713 size
= wcslen(name
)+1;
714 ret
->name
= malloc(size
*sizeof(*name
));
715 if(!ret
->name
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
716 memcpy(ret
->name
, name
, size
*sizeof(*name
));
722 table
= malloc(sizeof(short[256]));
723 if(!table
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
724 memcpy(table
, __pctype_func(), sizeof(short[256]));
729 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
730 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
731 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
732 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
734 return _Getctype(ret
);
739 ULONGLONG __cdecl
_Getcvt(void)
748 ret
.cvtvec
.page
= ___lc_codepage_func();
749 ret
.cvtvec
.handle
= ___lc_handle_func()[LC_CTYPE
];
753 _Cvtvec
* __cdecl
_Getcvt(_Cvtvec
*ret
)
759 memset(ret
, 0, sizeof(*ret
));
760 ret
->page
= ___lc_codepage_func();
761 ret
->mb_max
= ___mb_cur_max_func();
763 if(ret
->mb_max
> 1) {
765 if(_ismbblead(i
)) ret
->isleadbyte
[i
/8] |= 1 << (i
&7);
771 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
772 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
773 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
774 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
777 ULONGLONG ull
= _Getcvt();
778 memcpy(ret
, &ull
, sizeof(ull
));
782 memcpy(ret
, &cvtvec
, sizeof(cvtvec
));
787 int __cdecl
_Getdateorder(void)
792 if(!GetLocaleInfoW(___lc_handle_func()[LC_TIME
], LOCALE_ILDATE
,
793 date_fmt
, ARRAY_SIZE(date_fmt
)))
794 return DATEORDER_no_order
;
796 if(!GetLocaleInfoEx(___lc_locale_name_func()[LC_TIME
], LOCALE_ILDATE
,
797 date_fmt
, ARRAY_SIZE(date_fmt
)))
798 return DATEORDER_no_order
;
801 if(*date_fmt
== '0') return DATEORDER_mdy
;
802 if(*date_fmt
== '1') return DATEORDER_dmy
;
803 if(*date_fmt
== '2') return DATEORDER_ymd
;
804 return DATEORDER_no_order
;
807 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
808 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
809 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
810 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
812 TRACE("(%p)\n", this);
813 return _Getdateorder();
816 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
817 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
818 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
819 const char* __thiscall
_Locinfo__Getdays(const _Locinfo
*this)
821 char *days
= _Getdays();
824 TRACE("(%p)\n", this);
827 locale_string_char_dtor((locale_string
*)&this->days
);
828 locale_string_char_ctor_cstr((locale_string
*)&this->days
, days
);
832 ret
= locale_string_char_c_str(&this->days
);
833 if (!ret
[0]) ret
= ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
837 #if _MSVCP_VER >= 110
838 /* ?_W_Getdays@_Locinfo@std@@QBEPBGXZ */
839 /* ?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ */
840 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getdays
, 4)
841 const wchar_t* __thiscall
_Locinfo__W_Getdays(const _Locinfo
*this)
843 static const wchar_t defdays
[] =
845 ':','S','u','n',':','S','u','n','d','a','y',
846 ':','M','o','n',':','M','o','n','d','a','y',
847 ':','T','u','e',':','T','u','e','s','d','a','y',
848 ':','W','e','d',':','W','e','d','n','e','s','d','a','y',
849 ':','T','h','u',':','T','h','u','r','s','d','a','y',
850 ':','F','r','i',':','F','r','i','d','a','y',
851 ':','S','a','t',':','S','a','t','u','r','d','a','y'
853 wchar_t *wdays
= _W_Getdays();
856 TRACE("(%p)\n", this);
859 locale_string_wchar_assign((locale_string_wchar
*)&this->wdays
, wdays
);
863 ret
= locale_string_wchar_c_str(&this->wdays
);
864 if (!ret
[0]) ret
= defdays
;
868 /* ?_W_Getmonths@_Locinfo@std@@QBEPBGXZ */
869 /* ?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ */
870 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getmonths
, 4)
871 const wchar_t* __thiscall
_Locinfo__W_Getmonths(const _Locinfo
*this)
873 static const wchar_t defmonths
[] =
875 ':','J','a','n',':','J','a','n','u','a','r','y',
876 ':','F','e','b',':','F','e','b','r','u','a','r','y',
877 ':','M','a','r',':','M','a','r','c','h',
878 ':','A','p','r',':','A','p','r','i','l',
879 ':','M','a','y',':','M','a','y',
880 ':','J','u','n',':','J','u','n','e',
881 ':','J','u','l',':','J','u','l','y',
882 ':','A','u','g',':','A','u','g','u','s','t',
883 ':','S','e','p',':','S','e','p','t','e','m','b','e','r',
884 ':','O','c','t',':','O','c','t','o','b','e','r',
885 ':','N','o','v',':','N','o','v','e','m','b','e','r',
886 ':','D','e','c',':','D','e','c','e','m','b','e','r'
888 wchar_t *wmonths
= _W_Getmonths();
891 TRACE("(%p)\n", this);
894 locale_string_wchar_assign((locale_string_wchar
*)&this->wmonths
, wmonths
);
898 ret
= locale_string_wchar_c_str(&this->wmonths
);
899 if (!ret
[0]) ret
= defmonths
;
904 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
905 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
906 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
907 const char* __thiscall
_Locinfo__Getmonths(const _Locinfo
*this)
909 char *months
= _Getmonths();
912 TRACE("(%p)\n", this);
915 locale_string_char_dtor((locale_string
*)&this->months
);
916 locale_string_char_ctor_cstr((locale_string
*)&this->months
, months
);
920 ret
= locale_string_char_c_str(&this->months
);
921 if (!ret
[0]) ret
= ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
922 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
926 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
927 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
928 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
929 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
931 TRACE("(%p)\n", this);
935 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
936 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
937 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
938 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
940 TRACE("(%p)\n", this);
944 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
945 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
946 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
947 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
949 TRACE("(%p)\n", this);
953 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
954 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
955 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
956 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
958 TRACE("(%p)\n", this);
960 _Timevec_ctor_timeptr(ret
, _Gettnames());
964 /* ?id@?$collate@D@std@@2V0locale@2@A */
965 locale_id collate_char_id
= {0};
967 /* ??_7?$collate@D@std@@6B@ */
968 extern const vtable_ptr collate_char_vtable
;
970 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
971 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
972 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
973 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
975 TRACE("(%p %p)\n", this, locinfo
);
976 _Locinfo__Getcoll(locinfo
, &this->coll
);
979 /* ??0?$collate@D@std@@IAE@PBDI@Z */
980 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
981 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
982 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, size_t refs
)
986 TRACE("(%p %s %Iu)\n", this, name
, refs
);
988 locale_facet_ctor_refs(&this->facet
, refs
);
989 this->facet
.vtable
= &collate_char_vtable
;
991 _Locinfo_ctor_cstr(&locinfo
, name
);
992 collate_char__Init(this, &locinfo
);
993 _Locinfo_dtor(&locinfo
);
997 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
998 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
999 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
1000 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, size_t refs
)
1002 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
1004 locale_facet_ctor_refs(&this->facet
, refs
);
1005 this->facet
.vtable
= &collate_char_vtable
;
1006 collate_char__Init(this, locinfo
);
1010 /* ??0?$collate@D@std@@QAE@I@Z */
1011 /* ??0?$collate@D@std@@QEAA@_K@Z */
1012 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
1013 collate
* __thiscall
collate_char_ctor_refs(collate
*this, size_t refs
)
1015 return collate_char_ctor_name(this, "C", refs
);
1018 /* ??1?$collate@D@std@@UAE@XZ */
1019 /* ??1?$collate@D@std@@UEAA@XZ */
1020 /* ??1?$collate@D@std@@MAE@XZ */
1021 /* ??1?$collate@D@std@@MEAA@XZ */
1022 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
1023 void __thiscall
collate_char_dtor(collate
*this)
1025 TRACE("(%p)\n", this);
1028 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
1029 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
1031 TRACE("(%p %x)\n", this, flags
);
1033 /* we have an array, with the number of elements stored before the first object */
1034 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1036 for(i
=*ptr
-1; i
>=0; i
--)
1037 collate_char_dtor(this+i
);
1038 MSVCRT_operator_delete(ptr
);
1040 collate_char_dtor(this);
1042 MSVCRT_operator_delete(this);
1048 /* ??_F?$collate@D@std@@QAEXXZ */
1049 /* ??_F?$collate@D@std@@QEAAXXZ */
1050 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
1051 collate
* __thiscall
collate_char_ctor(collate
*this)
1053 return collate_char_ctor_name(this, "C", 0);
1056 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1057 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1058 size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1060 TRACE("(%p %p)\n", facet
, loc
);
1062 if(facet
&& !*facet
) {
1063 *facet
= MSVCRT_operator_new(sizeof(collate
));
1065 ERR("Out of memory\n");
1066 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1069 collate_char_ctor_name((collate
*)*facet
,
1070 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1076 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
1077 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1078 size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
1080 return collate_char__Getcat(facet
, locale_classic());
1083 static collate
* collate_char_use_facet(const locale
*loc
)
1085 static collate
*obj
= NULL
;
1088 const locale_facet
*fac
;
1090 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1091 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_char_id
));
1093 _Lockit_dtor(&lock
);
1094 return (collate
*)fac
;
1098 _Lockit_dtor(&lock
);
1102 collate_char__Getcat(&fac
, loc
);
1103 obj
= (collate
*)fac
;
1104 call_locale_facet__Incref(&obj
->facet
);
1105 locale_facet_register(&obj
->facet
);
1106 _Lockit_dtor(&lock
);
1112 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
1113 const char *last2
, const _Collvec
*coll
)
1117 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
1119 #if _MSVCP_VER < 110
1120 lcid
= (coll
? coll
->handle
: ___lc_handle_func()[LC_COLLATE
]);
1122 lcid
= LocaleNameToLCID(coll
? coll
->lc_name
: ___lc_locale_name_func()[LC_COLLATE
], 0);
1124 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1127 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
1128 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
1129 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
1130 #if _MSVCP_VER <= 100
1131 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1132 (const collate*, const char*, const char*, const char*, const char*), \
1133 (this, first1, last1, first2, last2))
1135 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1136 (const collate*, const char*, const char*, const char*, const char*), \
1137 (this, first1, last1, first2, last2))
1139 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
1140 const char *last1
, const char *first2
, const char *last2
)
1142 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1143 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
1146 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
1147 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
1148 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
1149 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
1150 const char *last1
, const char *first2
, const char *last2
)
1152 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1153 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
1156 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
1157 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
1158 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
1159 #if _MSVCP_VER <= 100
1160 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1161 (const collate*, const char*, const char*), (this, first, last))
1163 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1164 (const collate*, const char*, const char*), (this, first, last))
1166 LONG __thiscall
collate_char_do_hash(const collate
*this,
1167 const char *first
, const char *last
)
1171 TRACE("(%p %p %p)\n", this, first
, last
);
1173 for(; first
<last
; first
++)
1174 ret
= (ret
<<8 | ret
>>24) + *first
;
1178 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
1179 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
1180 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
1181 LONG __thiscall
collate_char_hash(const collate
*this,
1182 const char *first
, const char *last
)
1184 TRACE("(%p %p %p)\n", this, first
, last
);
1185 return call_collate_char_do_hash(this, first
, last
);
1188 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1189 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1190 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
1191 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
1192 basic_string_char
*ret
, const char *first
, const char *last
)
1194 FIXME("(%p %p %p) stub\n", this, first
, last
);
1198 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1199 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1200 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
1201 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
1202 basic_string_char
*ret
, const char *first
, const char *last
)
1204 FIXME("(%p %p %p) stub\n", this, first
, last
);
1208 /* ?id@?$collate@_W@std@@2V0locale@2@A */
1209 locale_id collate_wchar_id
= {0};
1210 /* ?id@?$collate@G@std@@2V0locale@2@A */
1211 locale_id collate_short_id
= {0};
1213 /* ??_7?$collate@_W@std@@6B@ */
1214 extern const vtable_ptr collate_wchar_vtable
;
1215 /* ??_7?$collate@G@std@@6B@ */
1216 extern const vtable_ptr collate_short_vtable
;
1218 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
1219 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1220 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
1221 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1222 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
1223 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
1225 TRACE("(%p %p)\n", this, locinfo
);
1226 _Locinfo__Getcoll(locinfo
, &this->coll
);
1229 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
1230 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
1231 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
1232 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, size_t refs
)
1236 TRACE("(%p %s %Iu)\n", this, name
, refs
);
1238 locale_facet_ctor_refs(&this->facet
, refs
);
1239 this->facet
.vtable
= &collate_wchar_vtable
;
1241 _Locinfo_ctor_cstr(&locinfo
, name
);
1242 collate_wchar__Init(this, &locinfo
);
1243 _Locinfo_dtor(&locinfo
);
1247 /* ??0?$collate@G@std@@IAE@PBDI@Z */
1248 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
1249 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
1250 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, size_t refs
)
1252 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
1253 ret
->facet
.vtable
= &collate_short_vtable
;
1257 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1258 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1259 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
1260 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, size_t refs
)
1262 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
1264 locale_facet_ctor_refs(&this->facet
, refs
);
1265 this->facet
.vtable
= &collate_wchar_vtable
;
1266 collate_wchar__Init(this, locinfo
);
1270 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
1271 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1272 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
1273 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, size_t refs
)
1275 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
1276 ret
->facet
.vtable
= &collate_short_vtable
;
1280 /* ??0?$collate@_W@std@@QAE@I@Z */
1281 /* ??0?$collate@_W@std@@QEAA@_K@Z */
1282 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
1283 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, size_t refs
)
1285 return collate_wchar_ctor_name(this, "C", refs
);
1288 /* ??0?$collate@G@std@@QAE@I@Z */
1289 /* ??0?$collate@G@std@@QEAA@_K@Z */
1290 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1291 collate
* __thiscall
collate_short_ctor_refs(collate
*this, size_t refs
)
1293 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1294 ret
->facet
.vtable
= &collate_short_vtable
;
1298 /* ??1?$collate@G@std@@UAE@XZ */
1299 /* ??1?$collate@G@std@@UEAA@XZ */
1300 /* ??1?$collate@_W@std@@MAE@XZ */
1301 /* ??1?$collate@_W@std@@MEAA@XZ */
1302 /* ??1?$collate@G@std@@MAE@XZ */
1303 /* ??1?$collate@G@std@@MEAA@XZ */
1304 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1305 void __thiscall
collate_wchar_dtor(collate
*this)
1307 TRACE("(%p)\n", this);
1310 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1311 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1313 TRACE("(%p %x)\n", this, flags
);
1315 /* we have an array, with the number of elements stored before the first object */
1316 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1318 for(i
=*ptr
-1; i
>=0; i
--)
1319 collate_wchar_dtor(this+i
);
1320 MSVCRT_operator_delete(ptr
);
1322 collate_wchar_dtor(this);
1324 MSVCRT_operator_delete(this);
1330 /* ??_F?$collate@_W@std@@QAEXXZ */
1331 /* ??_F?$collate@_W@std@@QEAAXXZ */
1332 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1333 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1335 return collate_wchar_ctor_name(this, "C", 0);
1338 /* ??_F?$collate@G@std@@QAEXXZ */
1339 /* ??_F?$collate@G@std@@QEAAXXZ */
1340 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1341 collate
* __thiscall
collate_short_ctor(collate
*this)
1343 collate
*ret
= collate_wchar_ctor(this);
1344 ret
->facet
.vtable
= &collate_short_vtable
;
1348 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1349 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1350 size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1352 TRACE("(%p %p)\n", facet
, loc
);
1354 if(facet
&& !*facet
) {
1355 *facet
= MSVCRT_operator_new(sizeof(collate
));
1357 ERR("Out of memory\n");
1358 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1361 collate_wchar_ctor_name((collate
*)*facet
,
1362 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1368 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1369 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1370 size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1372 return collate_wchar__Getcat(facet
, locale_classic());
1375 static collate
* collate_wchar_use_facet(const locale
*loc
)
1377 static collate
*obj
= NULL
;
1380 const locale_facet
*fac
;
1382 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1383 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_wchar_id
));
1385 _Lockit_dtor(&lock
);
1386 return (collate
*)fac
;
1390 _Lockit_dtor(&lock
);
1394 collate_wchar__Getcat(&fac
, loc
);
1395 obj
= (collate
*)fac
;
1396 call_locale_facet__Incref(&obj
->facet
);
1397 locale_facet_register(&obj
->facet
);
1398 _Lockit_dtor(&lock
);
1403 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1404 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1405 size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1407 if(facet
&& !*facet
) {
1408 collate_wchar__Getcat(facet
, loc
);
1409 (*(locale_facet
**)facet
)->vtable
= &collate_short_vtable
;
1415 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1416 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1417 size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1419 return collate_short__Getcat(facet
, locale_classic());
1422 static collate
* collate_short_use_facet(const locale
*loc
)
1424 static collate
*obj
= NULL
;
1427 const locale_facet
*fac
;
1429 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1430 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_short_id
));
1432 _Lockit_dtor(&lock
);
1433 return (collate
*)fac
;
1437 _Lockit_dtor(&lock
);
1441 collate_short__Getcat(&fac
, loc
);
1442 obj
= (collate
*)fac
;
1443 call_locale_facet__Incref(&obj
->facet
);
1444 locale_facet_register(&obj
->facet
);
1445 _Lockit_dtor(&lock
);
1451 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1452 const wchar_t *last2
, const _Collvec
*coll
)
1454 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1456 #if _MSVCP_VER < 110
1457 return CompareStringW(coll
? coll
->handle
: ___lc_handle_func()[LC_COLLATE
],
1458 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1460 return CompareStringEx(coll
? coll
->lc_name
: ___lc_locale_name_func()[LC_COLLATE
],
1461 0, first1
, last1
-first1
, first2
, last2
-first2
, NULL
, NULL
, 0)-CSTR_EQUAL
;
1465 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1466 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1467 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1468 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1469 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1470 #if _MSVCP_VER <= 100
1471 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1472 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1473 (this, first1, last1, first2, last2))
1475 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1476 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1477 (this, first1, last1, first2, last2))
1479 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1480 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1482 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1483 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1486 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1487 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1488 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1489 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1490 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1491 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1492 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1494 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1495 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1498 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1499 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1500 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1501 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1502 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1503 #if _MSVCP_VER <= 100
1504 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1505 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1507 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1508 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1510 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1511 const wchar_t *first
, const wchar_t *last
)
1515 TRACE("(%p %p %p)\n", this, first
, last
);
1517 for(; first
<last
; first
++)
1518 ret
= (ret
<<8 | ret
>>24) + *first
;
1522 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1523 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1524 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1525 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1526 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1527 LONG __thiscall
collate_wchar_hash(const collate
*this,
1528 const wchar_t *first
, const wchar_t *last
)
1530 TRACE("(%p %p %p)\n", this, first
, last
);
1531 return call_collate_wchar_do_hash(this, first
, last
);
1534 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1535 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1536 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1537 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1538 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1539 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1540 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1542 FIXME("(%p %p %p) stub\n", this, first
, last
);
1546 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1547 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1548 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1549 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1550 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1551 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1552 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1554 FIXME("(%p %p %p) stub\n", this, first
, last
);
1558 /* ??_7ctype_base@std@@6B@ */
1559 extern const vtable_ptr ctype_base_vtable
;
1561 /* ??0ctype_base@std@@QAE@I@Z */
1562 /* ??0ctype_base@std@@QEAA@_K@Z */
1563 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1564 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, size_t refs
)
1566 TRACE("(%p %Iu)\n", this, refs
);
1567 locale_facet_ctor_refs(&this->facet
, refs
);
1568 this->facet
.vtable
= &ctype_base_vtable
;
1572 /* ??_Fctype_base@std@@QAEXXZ */
1573 /* ??_Fctype_base@std@@QEAAXXZ */
1574 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1575 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1577 TRACE("(%p)\n", this);
1578 locale_facet_ctor_refs(&this->facet
, 0);
1579 this->facet
.vtable
= &ctype_base_vtable
;
1583 /* ??1ctype_base@std@@UAE@XZ */
1584 /* ??1ctype_base@std@@UEAA@XZ */
1585 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1586 void __thiscall
ctype_base_dtor(ctype_base
*this)
1588 TRACE("(%p)\n", this);
1591 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1592 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1594 TRACE("(%p %x)\n", this, flags
);
1596 /* we have an array, with the number of elements stored before the first object */
1597 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1599 for(i
=*ptr
-1; i
>=0; i
--)
1600 ctype_base_dtor(this+i
);
1601 MSVCRT_operator_delete(ptr
);
1603 ctype_base_dtor(this);
1605 MSVCRT_operator_delete(this);
1611 /* ?_Xran@ctype_base@std@@KAXXZ */
1612 void __cdecl
ctype_base__Xran(void)
1614 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1617 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1618 locale_id ctype_char_id
= {0};
1619 /* ?table_size@?$ctype@D@std@@2IB */
1620 /* ?table_size@?$ctype@D@std@@2_KB */
1621 size_t ctype_char_table_size
= 256;
1623 /* ??_7?$ctype@D@std@@6B@ */
1624 extern const vtable_ptr ctype_char_vtable
;
1626 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1627 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1628 locale_id
* __cdecl
ctype_char__Id_func(void)
1631 return &ctype_char_id
;
1634 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1635 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1636 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1637 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1639 TRACE("(%p %p)\n", this, locinfo
);
1640 _Locinfo__Getctype(locinfo
, &this->ctype
);
1643 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1644 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1645 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1646 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1648 TRACE("(%p)\n", this);
1650 if(this->ctype
.delfl
)
1651 free((short*)this->ctype
.table
);
1652 #if _MSVCP_VER >= 110
1653 free(this->ctype
.name
);
1657 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1658 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1659 const short* __cdecl
ctype_char_classic_table(void)
1664 ctype
= ctype_char_use_facet( locale_classic() );
1665 return ctype
->ctype
.table
;
1668 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1669 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1670 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1671 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1672 const _Locinfo
*locinfo
, size_t refs
)
1674 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
1675 ctype_base_ctor_refs(&this->base
, refs
);
1676 this->base
.facet
.vtable
= &ctype_char_vtable
;
1677 ctype_char__Init(this, locinfo
);
1681 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1682 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1683 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1684 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1685 const short *table
, bool delete, size_t refs
)
1689 TRACE("(%p %p %d %Iu)\n", this, table
, delete, refs
);
1691 ctype_base_ctor_refs(&this->base
, refs
);
1692 this->base
.facet
.vtable
= &ctype_char_vtable
;
1694 _Locinfo_ctor(&locinfo
);
1695 ctype_char__Init(this, &locinfo
);
1696 _Locinfo_dtor(&locinfo
);
1699 ctype_char__Tidy(this);
1700 this->ctype
.table
= table
;
1701 this->ctype
.delfl
= delete;
1706 /* ??_F?$ctype@D@std@@QAEXXZ */
1707 /* ??_F?$ctype@D@std@@QEAAXXZ */
1708 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1709 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1711 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1714 /* ??1?$ctype@D@std@@UAE@XZ */
1715 /* ??1?$ctype@D@std@@UEAA@XZ */
1716 /* ??1?$ctype@D@std@@MAE@XZ */
1717 /* ??1?$ctype@D@std@@MEAA@XZ */
1718 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1719 void __thiscall
ctype_char_dtor(ctype_char
*this)
1721 TRACE("(%p)\n", this);
1722 ctype_char__Tidy(this);
1725 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1726 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1728 TRACE("(%p %x)\n", this, flags
);
1730 /* we have an array, with the number of elements stored before the first object */
1731 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1733 for(i
=*ptr
-1; i
>=0; i
--)
1734 ctype_char_dtor(this+i
);
1735 MSVCRT_operator_delete(ptr
);
1737 ctype_char_dtor(this);
1739 MSVCRT_operator_delete(this);
1745 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1746 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1747 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1748 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1749 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1750 char, (const ctype_char*, char, char), (this, ch, unused))
1751 #elif _MSVCP_VER <= 100
1752 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1753 char, (const ctype_char*, char, char), (this, ch, unused))
1755 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 40, \
1756 char, (const ctype_char*, char, char), (this, ch, unused))
1758 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1760 TRACE("(%p %c %c)\n", this, ch
, unused
);
1764 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1765 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1766 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1767 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1768 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1769 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1770 (this, first, last, unused, dest))
1771 #elif _MSVCP_VER <= 100
1772 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1773 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1774 (this, first, last, unused, dest))
1776 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 36, \
1777 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1778 (this, first, last, unused, dest))
1780 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1781 const char *first
, const char *last
, char unused
, char *dest
)
1783 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1784 memcpy(dest
, first
, last
-first
);
1788 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1789 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1790 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1791 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1792 const char*, (const ctype_char*, const char*, const char*, char, char*, size_t), \
1793 (this, first, last, unused, dest, size))
1794 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1795 const char *last
, char unused
, char *dest
, size_t size
)
1797 TRACE("(%p %p %p %p %Iu)\n", this, first
, last
, dest
, size
);
1798 memcpy_s(dest
, size
, first
, last
-first
);
1802 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1803 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1804 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1805 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1807 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1808 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1811 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1812 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1813 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1814 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1815 const char *first
, const char *last
, char dflt
, char *dest
)
1817 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1818 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1821 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1822 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1823 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1824 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1825 const char *last
, char dflt
, char *dest
, size_t size
)
1827 TRACE("(%p %p %p %p %Iu)\n", this, first
, last
, dest
, size
);
1828 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1831 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1832 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1833 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1834 #if _MSVCP_VER <= 100
1835 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1836 char, (const ctype_char*, char), (this, ch))
1838 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
1839 char, (const ctype_char*, char), (this, ch))
1841 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1843 TRACE("(%p %c)\n", this, ch
);
1847 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1848 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1849 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1850 #if _MSVCP_VER <= 100
1851 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1852 const char*, (const ctype_char*, const char*, const char*, char*), \
1853 (this, first, last, dest))
1855 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 28, \
1856 const char*, (const ctype_char*, const char*, const char*, char*), \
1857 (this, first, last, dest))
1859 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1860 const char *first
, const char *last
, char *dest
)
1862 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1863 memcpy(dest
, first
, last
-first
);
1867 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1868 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1869 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1870 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1871 const char*, (const ctype_char*, const char*, const char*, char*, size_t), \
1872 (this, first, last, dest, size))
1873 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1874 const char *first
, const char *last
, char *dest
, size_t size
)
1876 TRACE("(%p %p %p %p %Iu)\n", this, first
, last
, dest
, size
);
1877 memcpy_s(dest
, size
, first
, last
-first
);
1881 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1882 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1883 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1884 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1886 TRACE("(%p %c)\n", this, ch
);
1887 return call_ctype_char_do_widen_ch(this, ch
);
1890 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1891 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1892 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1893 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1894 const char *first
, const char *last
, char *dest
)
1896 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1897 return call_ctype_char_do_widen(this, first
, last
, dest
);
1900 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1901 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1902 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1903 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1904 const char *first
, const char *last
, char *dest
, size_t size
)
1906 TRACE("(%p %p %p %p %Iu)\n", this, first
, last
, dest
, size
);
1907 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1910 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1911 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1912 size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1914 TRACE("(%p %p)\n", facet
, loc
);
1916 if(facet
&& !*facet
) {
1919 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1921 ERR("Out of memory\n");
1922 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1926 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
1927 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1928 _Locinfo_dtor(&locinfo
);
1934 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1935 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1936 size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1938 return ctype_char__Getcat(facet
, locale_classic());
1941 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1943 static ctype_char
*obj
= NULL
;
1946 const locale_facet
*fac
;
1948 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1949 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1951 _Lockit_dtor(&lock
);
1952 return (ctype_char
*)fac
;
1956 _Lockit_dtor(&lock
);
1960 ctype_char__Getcat(&fac
, loc
);
1961 obj
= (ctype_char
*)fac
;
1962 call_locale_facet__Incref(&obj
->base
.facet
);
1963 locale_facet_register(&obj
->base
.facet
);
1964 _Lockit_dtor(&lock
);
1970 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1974 TRACE("%d %p\n", ch
, ctype
);
1979 cp
= ___lc_codepage_func();
1981 /* Don't convert to unicode in case of C locale */
1983 if(ch
>='A' && ch
<='Z')
1992 str
[0] = (ch
>>8) & 255;
2000 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
2003 lower
= towlower(wide
);
2007 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
2009 return str
[0] + (str
[1]<<8);
2013 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
2014 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
2015 #if _MSVCP_VER <= 100
2016 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
2017 char, (const ctype_char*, char), (this, ch))
2019 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
2020 char, (const ctype_char*, char), (this, ch))
2022 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
2023 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
2025 TRACE("(%p %c)\n", this, ch
);
2026 return _Tolower(ch
, &this->ctype
);
2029 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
2030 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2031 #if _MSVCP_VER <= 100
2032 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
2033 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2035 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 12, \
2036 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2038 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
2039 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
2041 TRACE("(%p %p %p)\n", this, first
, last
);
2042 for(; first
<last
; first
++)
2043 *first
= _Tolower(*first
, &this->ctype
);
2047 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
2048 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
2049 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
2050 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
2052 TRACE("(%p %c)\n", this, ch
);
2053 return call_ctype_char_do_tolower_ch(this, ch
);
2056 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
2057 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2058 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
2059 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
2061 TRACE("(%p %p %p)\n", this, first
, last
);
2062 return call_ctype_char_do_tolower(this, first
, last
);
2066 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
2070 TRACE("%d %p\n", ch
, ctype
);
2075 cp
= ___lc_codepage_func();
2077 /* Don't convert to unicode in case of C locale */
2079 if(ch
>='a' && ch
<='z')
2088 str
[0] = (ch
>>8) & 255;
2096 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
2099 upper
= towupper(wide
);
2103 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
2105 return str
[0] + (str
[1]<<8);
2109 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
2110 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
2111 #if _MSVCP_VER <= 100
2112 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
2113 char, (const ctype_char*, char), (this, ch))
2115 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2116 char, (const ctype_char*, char), (this, ch))
2118 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
2119 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
2121 TRACE("(%p %c)\n", this, ch
);
2122 return _Toupper(ch
, &this->ctype
);
2125 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
2126 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2127 #if _MSVCP_VER <= 100
2128 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
2129 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2131 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 20, \
2132 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2134 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
2135 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
2136 char *first
, const char *last
)
2138 TRACE("(%p %p %p)\n", this, first
, last
);
2139 for(; first
<last
; first
++)
2140 *first
= _Toupper(*first
, &this->ctype
);
2144 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
2145 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
2146 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
2147 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
2149 TRACE("(%p %c)\n", this, ch
);
2150 return call_ctype_char_do_toupper_ch(this, ch
);
2153 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
2154 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2155 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
2156 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
2158 TRACE("(%p %p %p)\n", this, first
, last
);
2159 return call_ctype_char_do_toupper(this, first
, last
);
2162 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
2163 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
2164 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
2165 bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
2167 TRACE("(%p %x %c)\n", this, mask
, ch
);
2168 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
2171 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
2172 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
2173 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
2174 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
2176 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2177 for(; first
<last
; first
++)
2178 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
2182 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
2183 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2184 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
2185 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2187 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2188 for(; first
<last
; first
++)
2189 if(!ctype_char_is_ch(this, mask
, *first
))
2194 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
2195 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2196 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
2197 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2199 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2200 for(; first
<last
; first
++)
2201 if(ctype_char_is_ch(this, mask
, *first
))
2206 /* ?table@?$ctype@D@std@@IBEPBFXZ */
2207 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
2208 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
2209 const short* __thiscall
ctype_char_table(const ctype_char
*this)
2211 TRACE("(%p)\n", this);
2212 return this->ctype
.table
;
2215 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
2216 locale_id ctype_wchar_id
= {0};
2217 /* ?id@?$ctype@G@std@@2V0locale@2@A */
2218 locale_id ctype_short_id
= {0};
2220 /* ??_7?$ctype@_W@std@@6B@ */
2221 extern const vtable_ptr ctype_wchar_vtable
;
2222 /* ??_7?$ctype@G@std@@6B@ */
2223 extern const vtable_ptr ctype_short_vtable
;
2225 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
2226 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
2227 locale_id
* __cdecl
ctype_wchar__Id_func(void)
2230 return &ctype_wchar_id
;
2233 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
2234 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
2235 locale_id
* __cdecl
ctype_short__Id_func(void)
2238 return &ctype_short_id
;
2241 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
2242 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
2243 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
2244 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
2245 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
2246 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
2248 TRACE("(%p %p)\n", this, locinfo
);
2249 _Locinfo__Getctype(locinfo
, &this->ctype
);
2250 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2253 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
2254 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2255 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
2256 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
2257 const _Locinfo
*locinfo
, size_t refs
)
2259 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
2260 ctype_base_ctor_refs(&this->base
, refs
);
2261 this->base
.facet
.vtable
= &ctype_wchar_vtable
;
2262 ctype_wchar__Init(this, locinfo
);
2266 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
2267 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2268 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
2269 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
2270 const _Locinfo
*locinfo
, size_t refs
)
2272 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
2273 this->base
.facet
.vtable
= &ctype_short_vtable
;
2277 /* ??0?$ctype@_W@std@@QAE@I@Z */
2278 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
2279 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
2280 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, size_t refs
)
2284 TRACE("(%p %Iu)\n", this, refs
);
2286 ctype_base_ctor_refs(&this->base
, refs
);
2287 this->base
.facet
.vtable
= &ctype_wchar_vtable
;
2289 _Locinfo_ctor(&locinfo
);
2290 ctype_wchar__Init(this, &locinfo
);
2291 _Locinfo_dtor(&locinfo
);
2295 /* ??0?$ctype@G@std@@QAE@I@Z */
2296 /* ??0?$ctype@G@std@@QEAA@_K@Z */
2297 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
2298 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, size_t refs
)
2300 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
2301 this->base
.facet
.vtable
= &ctype_short_vtable
;
2305 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
2306 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
2307 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
2308 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
2309 const char *name
, size_t refs
)
2313 TRACE("(%p %s %Iu)\n", this, debugstr_a(name
), refs
);
2315 ctype_base_ctor_refs(&this->base
, refs
);
2316 this->base
.facet
.vtable
= &ctype_short_vtable
;
2318 _Locinfo_ctor_cstr(&locinfo
, name
);
2319 ctype_wchar__Init(this, &locinfo
);
2320 _Locinfo_dtor(&locinfo
);
2324 /* ??_F?$ctype@_W@std@@QAEXXZ */
2325 /* ??_F?$ctype@_W@std@@QEAAXXZ */
2326 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
2327 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
2329 TRACE("(%p)\n", this);
2330 return ctype_short_ctor_refs(this, 0);
2333 /* ??_F?$ctype@G@std@@QAEXXZ */
2334 /* ??_F?$ctype@G@std@@QEAAXXZ */
2335 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
2336 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
2338 ctype_wchar
*ret
= ctype_wchar_ctor(this);
2339 this->base
.facet
.vtable
= &ctype_short_vtable
;
2343 /* ??1?$ctype@G@std@@UAE@XZ */
2344 /* ??1?$ctype@G@std@@UEAA@XZ */
2345 /* ??1?$ctype@_W@std@@MAE@XZ */
2346 /* ??1?$ctype@_W@std@@MEAA@XZ */
2347 /* ??1?$ctype@G@std@@MAE@XZ */
2348 /* ??1?$ctype@G@std@@MEAA@XZ */
2349 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
2350 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
2352 TRACE("(%p)\n", this);
2353 if(this->ctype
.delfl
)
2354 free((void*)this->ctype
.table
);
2355 #if _MSVCP_VER >= 110
2356 free(this->ctype
.name
);
2360 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
2361 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
2363 TRACE("(%p %x)\n", this, flags
);
2365 /* we have an array, with the number of elements stored before the first object */
2366 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2368 for(i
=*ptr
-1; i
>=0; i
--)
2369 ctype_wchar_dtor(this+i
);
2370 MSVCRT_operator_delete(ptr
);
2372 ctype_wchar_dtor(this);
2374 MSVCRT_operator_delete(this);
2381 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, _Mbstatet
*state
, const _Cvtvec
*cvt
)
2386 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
2391 cp
= ___lc_codepage_func();
2403 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
2412 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
2413 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
2414 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
2415 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
2416 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
2417 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2419 char buf
[MB_LEN_MAX
];
2421 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2423 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
2426 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
2427 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
2428 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
2429 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
2430 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
2431 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2432 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
2433 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2434 #elif _MSVCP_VER <= 100
2435 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
2436 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2438 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 56, \
2439 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2441 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2443 return ctype_wchar__Donarrow(this, ch
, dflt
);
2446 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
2447 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2448 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2449 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2450 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2451 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2452 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
2453 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2454 (this, first, last, dflt, dest))
2455 #elif _MSVCP_VER <= 100
2456 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2457 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2458 (this, first, last, dflt, dest))
2460 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 52, \
2461 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2462 (this, first, last, dflt, dest))
2464 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2465 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2467 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2468 for(; first
<last
; first
++)
2469 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2473 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2474 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2475 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2476 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2477 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2478 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2479 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, size_t), \
2480 (this, first, last, dflt, dest, size))
2481 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2482 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, size_t size
)
2484 TRACE("(%p %p %p %d %p %Iu)\n", this, first
, last
, dflt
, dest
, size
);
2485 /* This function converts all multi-byte characters to dflt,
2486 * thanks to it result size is known before converting */
2487 if(last
-first
> size
)
2489 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2492 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2493 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2494 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2495 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2496 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2497 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2499 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2500 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2503 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2504 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2505 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2506 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2507 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2508 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2509 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2511 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2512 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2515 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2516 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2517 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2518 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2519 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2520 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2521 const wchar_t *last
, char dflt
, char *dest
, size_t size
)
2523 TRACE("(%p %p %p %d %p %Iu)\n", this, first
, last
, dflt
, dest
, size
);
2524 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2528 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, size_t len
, _Mbstatet
*state
, const _Cvtvec
*cvt
)
2534 TRACE("(%p %p %Iu %p %p)\n", out
, in
, len
, state
, cvt
);
2542 cp
= ___lc_codepage_func();
2546 *out
= (unsigned char)*in
;
2548 memset(state
, 0, sizeof(*state
));
2552 if(MBSTATET_TO_INT(state
)) {
2553 ((char*)&MBSTATET_TO_INT(state
))[1] = *in
;
2555 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)&MBSTATET_TO_INT(state
), 2, out
, out
? 1 : 0)) {
2556 memset(state
, 0, sizeof(*state
));
2561 memset(state
, 0, sizeof(*state
));
2565 GetCPInfo(cp
, &cp_info
);
2567 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2568 if(!cp_info
.LeadByte
[i
+1])
2570 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2578 MBSTATET_TO_INT(state
) = (unsigned char)*in
;
2582 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2589 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2596 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
2601 memset(&state
, 0, sizeof(state
));
2602 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
2605 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2606 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2607 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2608 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2609 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2610 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2615 TRACE("(%p %d)\n", this, ch
);
2617 memset(&state
, 0, sizeof(state
));
2618 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2621 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2622 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2623 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2624 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2625 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2626 #if _MSVCP_VER <= 100
2627 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2628 wchar_t, (const ctype_wchar*, char), (this, ch))
2630 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 48, \
2631 wchar_t, (const ctype_wchar*, char), (this, ch))
2633 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2635 return ctype_wchar__Dowiden(this, ch
);
2638 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2639 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2640 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2641 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2642 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2643 #if _MSVCP_VER <= 100
2644 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2645 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2646 (this, first, last, dest))
2648 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 44, \
2649 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2650 (this, first, last, dest))
2652 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2653 const char *first
, const char *last
, wchar_t *dest
)
2655 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2656 for(; first
<last
; first
++)
2657 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2661 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2662 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2663 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2664 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2665 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2666 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2667 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, size_t), \
2668 (this, first, last, dest, size))
2669 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2670 const char *first
, const char *last
, wchar_t *dest
, size_t size
)
2672 TRACE("(%p %p %p %p %Iu)\n", this, first
, last
, dest
, size
);
2673 /* This function converts all multi-byte characters to WEOF,
2674 * thanks to it result size is known before converting */
2675 if(size
< last
-first
)
2677 return ctype_wchar_do_widen(this, first
, last
, dest
);
2680 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2681 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2682 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2683 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2684 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2685 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2687 TRACE("(%p %d)\n", this, ch
);
2688 return call_ctype_wchar_do_widen_ch(this, ch
);
2691 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2692 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2693 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2694 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2695 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2696 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2697 const char *first
, const char *last
, wchar_t *dest
)
2699 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2700 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2703 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2704 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2705 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2706 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2707 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2708 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2709 const char *first
, const char *last
, wchar_t *dest
, size_t size
)
2711 TRACE("(%p %p %p %p %Iu)\n", this, first
, last
, dest
, size
);
2712 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2715 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2716 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2717 size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2719 TRACE("(%p %p)\n", facet
, loc
);
2721 if(facet
&& !*facet
) {
2724 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2726 ERR("Out of memory\n");
2727 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2731 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
2732 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2733 _Locinfo_dtor(&locinfo
);
2739 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2740 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2741 size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2743 return ctype_wchar__Getcat(facet
, locale_classic());
2746 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2747 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2748 size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2750 if(facet
&& !*facet
) {
2751 ctype_wchar__Getcat(facet
, loc
);
2752 (*(locale_facet
**)facet
)->vtable
= &ctype_short_vtable
;
2758 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2759 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2760 size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2762 return ctype_short__Getcat(facet
, locale_classic());
2766 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2768 TRACE("(%d %p)\n", ch
, ctype
);
2769 return towlower(ch
);
2772 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2774 static ctype_wchar
*obj
= NULL
;
2777 const locale_facet
*fac
;
2779 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2780 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2782 _Lockit_dtor(&lock
);
2783 return (ctype_wchar
*)fac
;
2787 _Lockit_dtor(&lock
);
2791 ctype_wchar__Getcat(&fac
, loc
);
2792 obj
= (ctype_wchar
*)fac
;
2793 call_locale_facet__Incref(&obj
->base
.facet
);
2794 locale_facet_register(&obj
->base
.facet
);
2795 _Lockit_dtor(&lock
);
2800 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2802 static ctype_wchar
*obj
= NULL
;
2805 const locale_facet
*fac
;
2807 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2808 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2810 _Lockit_dtor(&lock
);
2811 return (ctype_wchar
*)fac
;
2815 _Lockit_dtor(&lock
);
2819 ctype_short__Getcat(&fac
, loc
);
2820 obj
= (ctype_wchar
*)fac
;
2821 call_locale_facet__Incref(&obj
->base
.facet
);
2822 locale_facet_register(&obj
->base
.facet
);
2823 _Lockit_dtor(&lock
);
2828 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2829 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2830 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2831 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2832 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2833 #if _MSVCP_VER <= 100
2834 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2835 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2837 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2838 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2840 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2842 return _Towlower(ch
, &this->ctype
);
2845 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2846 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2847 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2848 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2849 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2850 #if _MSVCP_VER <= 100
2851 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2852 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2853 (this, first, last))
2855 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 28, \
2856 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2857 (this, first, last))
2859 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2860 wchar_t *first
, const wchar_t *last
)
2862 TRACE("(%p %p %p)\n", this, first
, last
);
2863 for(; first
<last
; first
++)
2864 *first
= _Towlower(*first
, &this->ctype
);
2868 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2869 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2870 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2871 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2872 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2873 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2875 TRACE("(%p %d)\n", this, ch
);
2876 return call_ctype_wchar_do_tolower_ch(this, ch
);
2879 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2880 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2881 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2882 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2883 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2884 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2885 wchar_t *first
, const wchar_t *last
)
2887 TRACE("(%p %p %p)\n", this, first
, last
);
2888 return call_ctype_wchar_do_tolower(this, first
, last
);
2892 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2894 TRACE("(%d %p)\n", ch
, ctype
);
2895 return towupper(ch
);
2898 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2899 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2900 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2901 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2902 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2903 #if _MSVCP_VER <= 100
2904 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2905 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2907 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2908 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2910 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2912 return _Towupper(ch
, &this->ctype
);
2915 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2916 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2917 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2918 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2919 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2920 #if _MSVCP_VER <= 100
2921 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2922 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2923 (this, first, last))
2925 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 36, \
2926 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2927 (this, first, last))
2929 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2930 wchar_t *first
, const wchar_t *last
)
2932 TRACE("(%p %p %p)\n", this, first
, last
);
2933 for(; first
<last
; first
++)
2934 *first
= _Towupper(*first
, &this->ctype
);
2938 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2939 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2940 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2941 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2942 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2943 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2945 TRACE("(%p %d)\n", this, ch
);
2946 return call_ctype_wchar_do_toupper_ch(this, ch
);
2949 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2950 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2951 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2952 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2953 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2954 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2955 wchar_t *first
, const wchar_t *last
)
2957 TRACE("(%p %p %p)\n", this, first
, last
);
2958 return call_ctype_wchar_do_toupper(this, first
, last
);
2962 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2963 short *mask
, const _Ctypevec
*ctype
)
2965 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2966 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2971 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2974 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2978 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2979 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2980 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2981 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2982 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2983 #if _MSVCP_VER <= 100
2984 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2985 bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2987 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 16, \
2988 bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2990 bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2992 TRACE("(%p %x %d)\n", this, mask
, ch
);
2993 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2996 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2997 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2998 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2999 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
3000 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
3001 #if _MSVCP_VER <= 100
3002 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
3003 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
3004 (this, first, last, dest))
3006 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 12, \
3007 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
3008 (this, first, last, dest))
3010 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
3011 const wchar_t *first
, const wchar_t *last
, short *dest
)
3013 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
3014 return _Getwctypes(first
, last
, dest
, &this->ctype
);
3017 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
3018 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
3019 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
3020 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
3021 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
3022 bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
3024 TRACE("(%p %x %d)\n", this, mask
, ch
);
3025 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
3028 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
3029 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
3030 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
3031 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
3032 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
3033 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
3034 const wchar_t *first
, const wchar_t *last
, short *dest
)
3036 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
3037 return call_ctype_wchar_do_is(this, first
, last
, dest
);
3040 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3041 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3042 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
3043 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3044 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
3045 #if _MSVCP_VER <= 100
3046 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
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_is(this, mask, first, last) CALL_VTBL_FUNC(this, 20, \
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_is(const ctype_wchar
*this,
3055 short mask
, const wchar_t *first
, const wchar_t *last
)
3057 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
3058 for(; first
<last
; first
++)
3059 if(!ctype_wchar_is_ch(this, mask
, *first
))
3064 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3065 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3066 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
3067 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3068 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
3069 const wchar_t* __thiscall
ctype_wchar_scan_is(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_is(this, mask
, first
, last
);
3076 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3077 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3078 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
3079 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3080 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
3081 #if _MSVCP_VER <= 100
3082 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
3083 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3084 (this, mask, first, last))
3086 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 24, \
3087 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3088 (this, mask, first, last))
3090 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
3091 short mask
, const wchar_t *first
, const wchar_t *last
)
3093 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3094 for(; first
<last
; first
++)
3095 if(ctype_wchar_is_ch(this, mask
, *first
))
3100 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3101 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3102 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
3103 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3104 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
3105 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
3106 short mask
, const wchar_t *first
, const wchar_t *last
)
3108 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3109 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
3112 /* ??_7codecvt_base@std@@6B@ */
3113 extern const vtable_ptr codecvt_base_vtable
;
3115 /* ??0codecvt_base@std@@QAE@I@Z */
3116 /* ??0codecvt_base@std@@QEAA@_K@Z */
3117 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
3118 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, size_t refs
)
3120 TRACE("(%p %Iu)\n", this, refs
);
3121 locale_facet_ctor_refs(&this->facet
, refs
);
3122 this->facet
.vtable
= &codecvt_base_vtable
;
3126 /* ??_Fcodecvt_base@std@@QAEXXZ */
3127 /* ??_Fcodecvt_base@std@@QEAAXXZ */
3128 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
3129 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
3131 return codecvt_base_ctor_refs(this, 0);
3134 /* ??1codecvt_base@std@@UAE@XZ */
3135 /* ??1codecvt_base@std@@UEAA@XZ */
3136 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
3137 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
3139 TRACE("(%p)\n", this);
3140 locale_facet_dtor(&this->facet
);
3143 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
3144 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
3146 TRACE("(%p %x)\n", this, flags
);
3148 /* we have an array, with the number of elements stored before the first object */
3149 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3151 for(i
=*ptr
-1; i
>=0; i
--)
3152 codecvt_base_dtor(this+i
);
3153 MSVCRT_operator_delete(ptr
);
3155 codecvt_base_dtor(this);
3157 MSVCRT_operator_delete(this);
3163 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
3164 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
3165 #if _MSVCP_VER <= 100
3166 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
3167 bool, (const codecvt_base*), (this))
3169 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 12, \
3170 bool, (const codecvt_base*), (this))
3172 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
3173 bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
3175 TRACE("(%p)\n", this);
3176 return _MSVCP_VER
<= 100;
3179 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
3180 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
3181 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
3182 bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
3184 TRACE("(%p)\n", this);
3185 return call_codecvt_base_do_always_noconv(this);
3188 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
3189 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
3190 #if _MSVCP_VER <= 100
3191 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
3192 int, (const codecvt_base*), (this))
3194 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 16, \
3195 int, (const codecvt_base*), (this))
3197 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
3198 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
3200 TRACE("(%p)\n", this);
3204 /* ?max_length@codecvt_base@std@@QBEHXZ */
3205 /* ?max_length@codecvt_base@std@@QEBAHXZ */
3206 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
3207 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
3209 TRACE("(%p)\n", this);
3210 return call_codecvt_base_do_max_length(this);
3213 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
3214 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
3215 #if _MSVCP_VER <= 100
3216 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
3217 int, (const codecvt_base*), (this))
3219 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 20, \
3220 int, (const codecvt_base*), (this))
3222 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
3223 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
3225 TRACE("(%p)\n", this);
3229 /* ?encoding@codecvt_base@std@@QBEHXZ */
3230 /* ?encoding@codecvt_base@std@@QEBAHXZ */
3231 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
3232 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
3234 TRACE("(%p)\n", this);
3235 return call_codecvt_base_do_encoding(this);
3238 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
3239 locale_id codecvt_char_id
= {0};
3241 /* ??_7?$codecvt@DDH@std@@6B@ */
3242 extern const vtable_ptr codecvt_char_vtable
;
3244 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
3245 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3246 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
3247 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
3249 TRACE("(%p %p)\n", this, locinfo
);
3252 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
3253 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3254 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
3255 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, size_t refs
)
3257 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
3258 codecvt_base_ctor_refs(&this->base
, refs
);
3259 this->base
.facet
.vtable
= &codecvt_char_vtable
;
3263 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
3264 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
3265 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
3266 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, size_t refs
)
3268 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
3271 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
3272 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
3273 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
3274 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
3276 return codecvt_char_ctor_locinfo(this, NULL
, 0);
3279 /* ??1?$codecvt@DDH@std@@UAE@XZ */
3280 /* ??1?$codecvt@DDH@std@@UEAA@XZ */
3281 /* ??1?$codecvt@DDH@std@@MAE@XZ */
3282 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
3283 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
3284 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
3286 TRACE("(%p)\n", this);
3287 codecvt_base_dtor(&this->base
);
3290 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
3291 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
3293 TRACE("(%p %x)\n", this, flags
);
3295 /* we have an array, with the number of elements stored before the first object */
3296 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3298 for(i
=*ptr
-1; i
>=0; i
--)
3299 codecvt_char_dtor(this+i
);
3300 MSVCRT_operator_delete(ptr
);
3302 codecvt_char_dtor(this);
3304 MSVCRT_operator_delete(this);
3310 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3311 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3312 size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3314 TRACE("(%p %p)\n", facet
, loc
);
3316 if(facet
&& !*facet
) {
3317 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
3319 ERR("Out of memory\n");
3320 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3323 codecvt_char_ctor((codecvt_char
*)*facet
);
3329 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
3330 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3331 size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
3333 return codecvt_char__Getcat(facet
, locale_classic());
3336 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
3338 static codecvt_char
*obj
= NULL
;
3341 const locale_facet
*fac
;
3343 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3344 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
3346 _Lockit_dtor(&lock
);
3347 return (codecvt_char
*)fac
;
3351 _Lockit_dtor(&lock
);
3355 codecvt_char__Getcat(&fac
, loc
);
3356 obj
= (codecvt_char
*)fac
;
3357 call_locale_facet__Incref(&obj
->base
.facet
);
3358 locale_facet_register(&obj
->base
.facet
);
3359 _Lockit_dtor(&lock
);
3364 /* ?do_always_noconv@?$codecvt@DDH@std@@MBE_NXZ */
3365 /* ?do_always_noconv@?$codecvt@DDH@std@@MEBA_NXZ */
3366 DEFINE_THISCALL_WRAPPER(codecvt_char_do_always_noconv
, 4)
3367 bool __thiscall
codecvt_char_do_always_noconv(const codecvt_char
*this)
3369 TRACE("(%p)\n", this);
3373 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3374 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3375 #if _MSVCP_VER <= 100
3376 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3377 CALL_VTBL_FUNC(this, 16, int, \
3378 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3379 (this, state, from, from_end, from_next, to, to_end, to_next))
3381 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3382 CALL_VTBL_FUNC(this, 24, int, \
3383 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3384 (this, state, from, from_end, from_next, to, to_end, to_next))
3386 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
3387 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, _Mbstatet
*state
,
3388 const char *from
, const char *from_end
, const char **from_next
,
3389 char *to
, char *to_end
, char **to_next
)
3391 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3392 from_next
, to
, to_end
, to_next
);
3395 return CODECVT_noconv
;
3398 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3399 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3400 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
3401 int __thiscall
codecvt_char_in(const codecvt_char
*this, _Mbstatet
*state
,
3402 const char *from
, const char *from_end
, const char **from_next
,
3403 char *to
, char *to_end
, char **to_next
)
3405 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3406 from_next
, to
, to_end
, to_next
);
3407 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
3408 to
, to_end
, to_next
);
3411 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3412 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3413 #if _MSVCP_VER <= 100
3414 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3415 CALL_VTBL_FUNC(this, 20, int, \
3416 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3417 (this, state, from, from_end, from_next, to, to_end, to_next))
3419 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3420 CALL_VTBL_FUNC(this, 28, int, \
3421 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3422 (this, state, from, from_end, from_next, to, to_end, to_next))
3424 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
3425 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, _Mbstatet
*state
,
3426 const char *from
, const char *from_end
, const char **from_next
,
3427 char *to
, char *to_end
, char **to_next
)
3429 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3430 from_end
, from_next
, to
, to_end
, to_next
);
3433 return CODECVT_noconv
;
3436 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3437 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3438 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
3439 int __thiscall
codecvt_char_out(const codecvt_char
*this, _Mbstatet
*state
,
3440 const char *from
, const char *from_end
, const char **from_next
,
3441 char *to
, char *to_end
, char **to_next
)
3443 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3444 from_next
, to
, to_end
, to_next
);
3445 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
3446 to
, to_end
, to_next
);
3449 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
3450 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3451 #if _MSVCP_VER <= 100
3452 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3453 int, (const codecvt_char*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3455 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3456 int, (const codecvt_char*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3458 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
3459 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
3460 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3462 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3464 return CODECVT_noconv
;
3467 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
3468 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3469 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
3470 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
3471 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3473 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3474 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
3477 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
3478 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
3479 #if _MSVCP_VER <= 100
3480 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3481 int, (const codecvt_char*, const _Mbstatet*, const char*, const char*, size_t), \
3482 (this, state, from, from_end, max))
3484 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3485 int, (const codecvt_char*, const _Mbstatet*, const char*, const char*, size_t), \
3486 (this, state, from, from_end, max))
3488 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
3489 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const _Mbstatet
*state
,
3490 const char *from
, const char *from_end
, size_t max
)
3492 TRACE("(%p %p %p %p %Iu)\n", this, state
, from
, from_end
, max
);
3493 return (from_end
-from
> max
? max
: from_end
-from
);
3496 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
3497 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
3498 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
3499 int __thiscall
codecvt_char_length(const codecvt_char
*this, const _Mbstatet
*state
,
3500 const char *from
, const char *from_end
, size_t max
)
3502 TRACE("(%p %p %p %p %Iu)\n", this, state
, from
, from_end
, max
);
3503 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
3506 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
3507 locale_id codecvt_wchar_id
= {0};
3508 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
3509 locale_id codecvt_short_id
= {0};
3511 /* ??_7?$codecvt@_WDH@std@@6B@ */
3512 extern const vtable_ptr codecvt_wchar_vtable
;
3513 /* ??_7?$codecvt@GDH@std@@6B@ */
3514 extern const vtable_ptr codecvt_short_vtable
;
3516 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
3517 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3518 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
3519 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3520 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
3521 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
3523 TRACE("(%p %p)\n", this, locinfo
);
3524 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3527 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
3528 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3529 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
3530 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, size_t refs
)
3532 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
3534 codecvt_base_ctor_refs(&this->base
, refs
);
3535 this->base
.facet
.vtable
= &codecvt_wchar_vtable
;
3537 codecvt_wchar__Init(this, locinfo
);
3541 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
3542 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3543 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
3544 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, size_t refs
)
3546 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
3548 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
3549 this->base
.facet
.vtable
= &codecvt_short_vtable
;
3553 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
3554 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
3555 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
3556 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, size_t refs
)
3560 TRACE("(%p %Iu)\n", this, refs
);
3562 _Locinfo_ctor(&locinfo
);
3563 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
3564 _Locinfo_dtor(&locinfo
);
3568 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
3569 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
3570 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
3571 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, size_t refs
)
3575 TRACE("(%p %Iu)\n", this, refs
);
3577 _Locinfo_ctor(&locinfo
);
3578 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3579 _Locinfo_dtor(&locinfo
);
3583 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
3584 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
3585 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
3586 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, size_t refs
)
3590 TRACE("(%p %s %Iu)\n", this, name
, refs
);
3592 _Locinfo_ctor_cstr(&locinfo
, name
);
3593 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3594 _Locinfo_dtor(&locinfo
);
3598 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3599 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3600 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3601 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3603 return codecvt_wchar_ctor_refs(this, 0);
3606 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3607 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3608 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3609 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3611 return codecvt_short_ctor_refs(this, 0);
3614 /* ??1?$codecvt@GDH@std@@UAE@XZ */
3615 /* ??1?$codecvt@GDH@std@@UEAA@XZ */
3616 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3617 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3618 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3619 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3620 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3621 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3623 TRACE("(%p)\n", this);
3624 codecvt_base_dtor(&this->base
);
3627 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3628 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3630 TRACE("(%p %x)\n", this, flags
);
3632 /* we have an array, with the number of elements stored before the first object */
3633 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3635 for(i
=*ptr
-1; i
>=0; i
--)
3636 codecvt_wchar_dtor(this+i
);
3637 MSVCRT_operator_delete(ptr
);
3639 codecvt_wchar_dtor(this);
3641 MSVCRT_operator_delete(this);
3647 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3648 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3649 size_t __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3651 TRACE("(%p %p)\n", facet
, loc
);
3653 if(facet
&& !*facet
) {
3656 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3658 ERR("Out of memory\n");
3659 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3663 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3664 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3665 _Locinfo_dtor(&locinfo
);
3671 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
3672 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3673 size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
3675 return codecvt_wchar__Getcat(facet
, locale_classic());
3678 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3680 static codecvt_wchar
*obj
= NULL
;
3683 const locale_facet
*fac
;
3685 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3686 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3688 _Lockit_dtor(&lock
);
3689 return (codecvt_wchar
*)fac
;
3693 _Lockit_dtor(&lock
);
3697 codecvt_wchar__Getcat(&fac
, loc
);
3698 obj
= (codecvt_wchar
*)fac
;
3699 call_locale_facet__Incref(&obj
->base
.facet
);
3700 locale_facet_register(&obj
->base
.facet
);
3701 _Lockit_dtor(&lock
);
3706 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3707 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3708 size_t __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3710 TRACE("(%p %p)\n", facet
, loc
);
3712 if(facet
&& !*facet
) {
3715 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3717 ERR("Out of memory\n");
3718 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3722 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3723 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3724 _Locinfo_dtor(&locinfo
);
3730 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
3731 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3732 size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
3734 return codecvt_short__Getcat(facet
, locale_classic());
3737 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3739 static codecvt_wchar
*obj
= NULL
;
3742 const locale_facet
*fac
;
3744 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3745 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3747 _Lockit_dtor(&lock
);
3748 return (codecvt_wchar
*)fac
;
3752 _Lockit_dtor(&lock
);
3756 codecvt_short__Getcat(&fac
, loc
);
3757 obj
= (codecvt_wchar
*)fac
;
3758 call_locale_facet__Incref(&obj
->base
.facet
);
3759 locale_facet_register(&obj
->base
.facet
);
3760 _Lockit_dtor(&lock
);
3765 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3766 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3767 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3770 return &codecvt_wchar_id
;
3773 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3774 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3775 locale_id
* __cdecl
codecvt_short__Id_func(void)
3778 return &codecvt_short_id
;
3781 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3782 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3783 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3784 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3785 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3786 bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3788 TRACE("(%p)\n", this);
3792 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3793 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3794 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3795 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3796 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3797 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3799 TRACE("(%p)\n", this);
3803 /* ?do_encoding@?$codecvt@GDH@std@@MBEHXZ */
3804 /* ?do_encoding@?$codecvt@GDH@std@@MEBAHXZ */
3805 /* ?do_encoding@?$codecvt@_WDH@std@@MBEHXZ */
3806 /* ?do_encoding@?$codecvt@_WDH@std@@MEBAHXZ */
3807 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_encoding
, 4)
3808 int __thiscall
codecvt_wchar_do_encoding(const codecvt_wchar
*this)
3810 TRACE("(%p)\n", this);
3814 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3815 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3816 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3817 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3818 #if _MSVCP_VER <= 100
3819 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3820 CALL_VTBL_FUNC(this, 16, int, \
3821 (const codecvt_wchar*, _Mbstatet*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3822 (this, state, from, from_end, from_next, to, to_end, to_next))
3824 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3825 CALL_VTBL_FUNC(this, 24, int, \
3826 (const codecvt_wchar*, _Mbstatet*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3827 (this, state, from, from_end, from_next, to, to_end, to_next))
3829 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3830 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, _Mbstatet
*state
,
3831 const char *from
, const char *from_end
, const char **from_next
,
3832 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3834 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3835 from_end
, from_next
, to
, to_end
, to_next
);
3840 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3841 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3843 *from_next
= from_end
;
3844 return CODECVT_partial
;
3846 return CODECVT_error
;
3860 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3861 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3862 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3863 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3864 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3865 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, _Mbstatet
*state
,
3866 const char *from
, const char *from_end
, const char **from_next
,
3867 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3869 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3870 from_end
, from_next
, to
, to_end
, to_next
);
3871 return call_codecvt_wchar_do_in(this, state
, from
,
3872 from_end
, from_next
, to
, to_end
, to_next
);
3875 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3876 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3877 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3878 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3879 #if _MSVCP_VER <= 100
3880 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3881 CALL_VTBL_FUNC(this, 20, int, \
3882 (const codecvt_wchar*, _Mbstatet*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3883 (this, state, from, from_end, from_next, to, to_end, to_next))
3885 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3886 CALL_VTBL_FUNC(this, 28, int, \
3887 (const codecvt_wchar*, _Mbstatet*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3888 (this, state, from, from_end, from_next, to, to_end, to_next))
3890 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3891 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, _Mbstatet
*state
,
3892 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3893 char *to
, char *to_end
, char **to_next
)
3895 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3896 from_end
, from_next
, to
, to_end
, to_next
);
3901 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3902 _Mbstatet old_state
= *state
;
3904 char buf
[MB_LEN_MAX
];
3906 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3908 return CODECVT_error
;
3910 if(size
> from_end
-*from_next
) {
3912 return CODECVT_partial
;
3916 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
3924 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3925 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3926 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3927 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3928 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3929 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, _Mbstatet
*state
,
3930 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3931 char *to
, char *to_end
, char **to_next
)
3933 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3934 from_end
, from_next
, to
, to_end
, to_next
);
3935 return call_codecvt_wchar_do_out(this, state
, from
,
3936 from_end
, from_next
, to
, to_end
, to_next
);
3939 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3940 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3941 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3942 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3943 #if _MSVCP_VER <= 100
3944 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3945 int, (const codecvt_wchar*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3947 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3948 int, (const codecvt_wchar*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3950 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3951 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3952 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3954 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3955 if(MBSTATET_TO_INT(state
))
3956 WARN("unexpected state: %x\n", MBSTATET_TO_INT(state
));
3962 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3963 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3964 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3965 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3966 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3967 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3968 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3970 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3971 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3974 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3975 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3976 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3977 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3978 #if _MSVCP_VER <= 100
3979 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3980 int, (const codecvt_wchar*, const _Mbstatet*, const char*, const char*, size_t), \
3981 (this, state, from, from_end, max))
3983 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3984 int, (const codecvt_wchar*, const _Mbstatet*, const char*, const char*, size_t), \
3985 (this, state, from, from_end, max))
3987 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3988 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const _Mbstatet
*state
,
3989 const char *from
, const char *from_end
, size_t max
)
3991 _Mbstatet tmp_state
= *state
;
3994 TRACE("(%p %p %p %p %Iu)\n", this, state
, from
, from_end
, max
);
3996 while(ret
<max
&& from
!=from_end
) {
3997 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
4014 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
4015 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
4016 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
4017 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
4018 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
4019 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const _Mbstatet
*state
,
4020 const char *from
, const char *from_end
, size_t max
)
4022 TRACE("(%p %p %p %p %Iu)\n", this, state
, from
, from_end
, max
);
4023 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
4026 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
4027 locale_id numpunct_char_id
= {0};
4029 /* ??_7?$numpunct@D@std@@6B@ */
4030 extern const vtable_ptr numpunct_char_vtable
;
4032 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
4033 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4034 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
4035 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, bool isdef
)
4039 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4041 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
4042 this->false_name
= MSVCRT_operator_new(len
);
4043 if(this->false_name
)
4044 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
4046 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
4047 this->true_name
= MSVCRT_operator_new(len
);
4049 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
4052 this->grouping
= MSVCRT_operator_new(1);
4054 *(char*)this->grouping
= 0;
4059 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4061 len
= strlen(lc
->grouping
)+1;
4062 this->grouping
= MSVCRT_operator_new(len
);
4064 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4066 this->dp
= lc
->decimal_point
[0];
4067 this->sep
= lc
->thousands_sep
[0];
4070 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4071 MSVCRT_operator_delete((char*)this->grouping
);
4072 MSVCRT_operator_delete((char*)this->false_name
);
4073 MSVCRT_operator_delete((char*)this->true_name
);
4075 ERR("Out of memory\n");
4076 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4080 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
4081 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
4082 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
4083 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
4085 TRACE("(%p)\n", this);
4087 MSVCRT_operator_delete((char*)this->grouping
);
4088 MSVCRT_operator_delete((char*)this->false_name
);
4089 MSVCRT_operator_delete((char*)this->true_name
);
4092 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
4093 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4094 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
4095 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
4096 const _Locinfo
*locinfo
, size_t refs
, bool usedef
)
4098 TRACE("(%p %p %Iu %d)\n", this, locinfo
, refs
, usedef
);
4099 locale_facet_ctor_refs(&this->facet
, refs
);
4100 this->facet
.vtable
= &numpunct_char_vtable
;
4101 numpunct_char__Init(this, locinfo
, usedef
);
4105 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
4106 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
4107 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
4108 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
4109 const char *name
, size_t refs
, bool usedef
)
4113 TRACE("(%p %s %Iu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4114 locale_facet_ctor_refs(&this->facet
, refs
);
4115 this->facet
.vtable
= &numpunct_char_vtable
;
4117 _Locinfo_ctor_cstr(&locinfo
, name
);
4118 numpunct_char__Init(this, &locinfo
, usedef
);
4119 _Locinfo_dtor(&locinfo
);
4123 /* ??0?$numpunct@D@std@@QAE@I@Z */
4124 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
4125 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
4126 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, size_t refs
)
4128 TRACE("(%p %Iu)\n", this, refs
);
4129 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
4132 /* ??_F?$numpunct@D@std@@QAEXXZ */
4133 /* ??_F?$numpunct@D@std@@QEAAXXZ */
4134 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
4135 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
4137 return numpunct_char_ctor_refs(this, 0);
4140 /* ??1?$numpunct@D@std@@UAE@XZ */
4141 /* ??1?$numpunct@D@std@@UEAA@XZ */
4142 /* ??1?$numpunct@D@std@@MAE@XZ */
4143 /* ??1?$numpunct@D@std@@MEAA@XZ */
4144 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
4145 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
4147 TRACE("(%p)\n", this);
4148 numpunct_char__Tidy(this);
4151 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
4152 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
4154 TRACE("(%p %x)\n", this, flags
);
4156 /* we have an array, with the number of elements stored before the first object */
4157 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4159 for(i
=*ptr
-1; i
>=0; i
--)
4160 numpunct_char_dtor(this+i
);
4161 MSVCRT_operator_delete(ptr
);
4163 numpunct_char_dtor(this);
4165 MSVCRT_operator_delete(this);
4171 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4172 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4173 size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
4175 TRACE("(%p %p)\n", facet
, loc
);
4177 if(facet
&& !*facet
) {
4178 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
4180 ERR("Out of memory\n");
4181 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4184 numpunct_char_ctor_name((numpunct_char
*)*facet
,
4185 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4191 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
4192 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4193 size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
4195 return numpunct_char__Getcat(facet
, locale_classic());
4198 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
4200 static numpunct_char
*obj
= NULL
;
4203 const locale_facet
*fac
;
4205 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4206 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
4208 _Lockit_dtor(&lock
);
4209 return (numpunct_char
*)fac
;
4213 _Lockit_dtor(&lock
);
4217 numpunct_char__Getcat(&fac
, loc
);
4218 obj
= (numpunct_char
*)fac
;
4219 call_locale_facet__Incref(&obj
->facet
);
4220 locale_facet_register(&obj
->facet
);
4221 _Lockit_dtor(&lock
);
4226 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
4227 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
4228 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
4229 #if _MSVCP_VER <= 100
4230 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4231 char, (const numpunct_char *this), (this))
4233 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4234 char, (const numpunct_char *this), (this))
4236 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
4238 TRACE("(%p)\n", this);
4242 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
4243 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
4244 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
4245 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
4247 TRACE("(%p)\n", this);
4248 return call_numpunct_char_do_decimal_point(this);
4251 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
4252 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
4253 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
4254 #if _MSVCP_VER <= 100
4255 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4256 char, (const numpunct_char*), (this))
4258 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4259 char, (const numpunct_char*), (this))
4261 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
4263 TRACE("(%p)\n", this);
4267 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
4268 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
4269 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
4270 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
4272 TRACE("(%p)\n", this);
4273 return call_numpunct_char_do_thousands_sep(this);
4276 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4277 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4278 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
4279 #if _MSVCP_VER <= 100
4280 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4281 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4283 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4284 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4286 basic_string_char
* __thiscall
numpunct_char_do_grouping(
4287 const numpunct_char
*this, basic_string_char
*ret
)
4289 TRACE("(%p)\n", this);
4290 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4293 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4294 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4295 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
4296 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
4298 TRACE("(%p)\n", this);
4299 return call_numpunct_char_do_grouping(this, ret
);
4302 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4303 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4304 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
4305 #if _MSVCP_VER <= 100
4306 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4307 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4309 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4310 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4312 basic_string_char
* __thiscall
numpunct_char_do_falsename(
4313 const numpunct_char
*this, basic_string_char
*ret
)
4315 TRACE("(%p)\n", this);
4316 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
4319 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4320 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4321 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
4322 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
4324 TRACE("(%p)\n", this);
4325 return call_numpunct_char_do_falsename(this, ret
);
4328 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4329 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4330 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
4331 #if _MSVCP_VER <= 100
4332 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4333 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4335 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4336 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4338 basic_string_char
* __thiscall
numpunct_char_do_truename(
4339 const numpunct_char
*this, basic_string_char
*ret
)
4341 TRACE("(%p)\n", this);
4342 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
4345 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4346 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4347 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
4348 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
4350 TRACE("(%p)\n", this);
4351 return call_numpunct_char_do_truename(this, ret
);
4354 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
4355 locale_id numpunct_wchar_id
= {0};
4356 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
4357 locale_id numpunct_short_id
= {0};
4359 /* ??_7?$numpunct@_W@std@@6B@ */
4360 extern const vtable_ptr numpunct_wchar_vtable
;
4361 /* ??_7?$numpunct@G@std@@6B@ */
4362 extern const vtable_ptr numpunct_short_vtable
;
4364 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
4365 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4366 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
4367 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4368 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
4369 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
4370 const _Locinfo
*locinfo
, bool isdef
)
4372 const char *to_convert
;
4376 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4378 _Locinfo__Getcvt(locinfo
, &cvt
);
4380 to_convert
= _Locinfo__Getfalse(locinfo
);
4381 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4382 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4383 if(this->false_name
)
4384 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4385 (wchar_t*)this->false_name
, len
);
4387 to_convert
= _Locinfo__Gettrue(locinfo
);
4388 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4389 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4391 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4392 (wchar_t*)this->true_name
, len
);
4395 this->grouping
= MSVCRT_operator_new(1);
4397 *(char*)this->grouping
= 0;
4402 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4404 len
= strlen(lc
->grouping
)+1;
4405 this->grouping
= MSVCRT_operator_new(len
);
4407 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4409 this->dp
= mb_to_wc(lc
->decimal_point
[0], &cvt
);
4410 this->sep
= mb_to_wc(lc
->thousands_sep
[0], &cvt
);
4413 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4414 MSVCRT_operator_delete((char*)this->grouping
);
4415 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4416 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4418 ERR("Out of memory\n");
4419 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4423 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
4424 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
4425 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
4426 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
4427 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
4428 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
4430 TRACE("(%p)\n", this);
4432 MSVCRT_operator_delete((char*)this->grouping
);
4433 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4434 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4437 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
4438 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4439 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
4440 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
4441 const _Locinfo
*locinfo
, size_t refs
, bool usedef
)
4443 TRACE("(%p %p %Iu %d)\n", this, locinfo
, refs
, usedef
);
4444 locale_facet_ctor_refs(&this->facet
, refs
);
4445 this->facet
.vtable
= &numpunct_wchar_vtable
;
4446 numpunct_wchar__Init(this, locinfo
, usedef
);
4450 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
4451 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4452 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
4453 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
4454 const _Locinfo
*locinfo
, size_t refs
, bool usedef
)
4456 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
4457 this->facet
.vtable
= &numpunct_short_vtable
;
4461 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
4462 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
4463 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
4464 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
4465 const char *name
, size_t refs
, bool usedef
)
4469 TRACE("(%p %s %Iu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4470 locale_facet_ctor_refs(&this->facet
, refs
);
4471 this->facet
.vtable
= &numpunct_wchar_vtable
;
4473 _Locinfo_ctor_cstr(&locinfo
, name
);
4474 numpunct_wchar__Init(this, &locinfo
, usedef
);
4475 _Locinfo_dtor(&locinfo
);
4479 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
4480 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
4481 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
4482 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
4483 const char *name
, size_t refs
, bool usedef
)
4485 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
4486 this->facet
.vtable
= &numpunct_short_vtable
;
4490 /* ??0?$numpunct@_W@std@@QAE@I@Z */
4491 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
4492 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
4493 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, size_t refs
)
4495 TRACE("(%p %Iu)\n", this, refs
);
4496 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
4499 /* ??0?$numpunct@G@std@@QAE@I@Z */
4500 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
4501 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
4502 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, size_t refs
)
4504 numpunct_wchar_ctor_refs(this, refs
);
4505 this->facet
.vtable
= &numpunct_short_vtable
;
4509 /* ??_F?$numpunct@_W@std@@QAEXXZ */
4510 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
4511 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
4512 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
4514 return numpunct_wchar_ctor_refs(this, 0);
4517 /* ??_F?$numpunct@G@std@@QAEXXZ */
4518 /* ??_F?$numpunct@G@std@@QEAAXXZ */
4519 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
4520 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
4522 return numpunct_short_ctor_refs(this, 0);
4525 /* ??1?$numpunct@G@std@@UAE@XZ */
4526 /* ??1?$numpunct@G@std@@UEAA@XZ */
4527 /* ??1?$numpunct@_W@std@@MAE@XZ */
4528 /* ??1?$numpunct@_W@std@@MEAA@XZ */
4529 /* ??1?$numpunct@G@std@@MAE@XZ */
4530 /* ??1?$numpunct@G@std@@MEAA@XZ */
4531 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
4532 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
4534 TRACE("(%p)\n", this);
4535 numpunct_wchar__Tidy(this);
4538 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
4539 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
4541 TRACE("(%p %x)\n", this, flags
);
4543 /* we have an array, with the number of elements stored before the first object */
4544 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4546 for(i
=*ptr
-1; i
>=0; i
--)
4547 numpunct_wchar_dtor(this+i
);
4548 MSVCRT_operator_delete(ptr
);
4550 numpunct_wchar_dtor(this);
4552 MSVCRT_operator_delete(this);
4558 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4559 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4560 size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4562 TRACE("(%p %p)\n", facet
, loc
);
4564 if(facet
&& !*facet
) {
4565 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4567 ERR("Out of memory\n");
4568 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4571 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
4572 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4578 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
4579 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4580 size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
4582 return numpunct_wchar__Getcat(facet
, locale_classic());
4585 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
4587 static numpunct_wchar
*obj
= NULL
;
4590 const locale_facet
*fac
;
4592 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4593 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
4595 _Lockit_dtor(&lock
);
4596 return (numpunct_wchar
*)fac
;
4600 _Lockit_dtor(&lock
);
4604 numpunct_wchar__Getcat(&fac
, loc
);
4605 obj
= (numpunct_wchar
*)fac
;
4606 call_locale_facet__Incref(&obj
->facet
);
4607 locale_facet_register(&obj
->facet
);
4608 _Lockit_dtor(&lock
);
4613 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4614 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4615 size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4617 TRACE("(%p %p)\n", facet
, loc
);
4619 if(facet
&& !*facet
) {
4620 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4622 ERR("Out of memory\n");
4623 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4626 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
4627 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4633 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
4634 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4635 size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
4637 return numpunct_short__Getcat(facet
, locale_classic());
4640 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
4642 static numpunct_wchar
*obj
= NULL
;
4645 const locale_facet
*fac
;
4647 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4648 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
4650 _Lockit_dtor(&lock
);
4651 return (numpunct_wchar
*)fac
;
4655 _Lockit_dtor(&lock
);
4659 numpunct_short__Getcat(&fac
, loc
);
4660 obj
= (numpunct_wchar
*)fac
;
4661 call_locale_facet__Incref(&obj
->facet
);
4662 locale_facet_register(&obj
->facet
);
4663 _Lockit_dtor(&lock
);
4668 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
4669 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
4670 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
4671 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
4672 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
4673 #if _MSVCP_VER <= 100
4674 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4675 wchar_t, (const numpunct_wchar *this), (this))
4677 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4678 wchar_t, (const numpunct_wchar *this), (this))
4680 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
4682 TRACE("(%p)\n", this);
4686 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
4687 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
4688 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
4689 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
4690 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
4691 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
4693 TRACE("(%p)\n", this);
4694 return call_numpunct_wchar_do_decimal_point(this);
4697 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
4698 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
4699 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
4700 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
4701 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
4702 #if _MSVCP_VER <= 100
4703 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4704 wchar_t, (const numpunct_wchar *this), (this))
4706 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4707 wchar_t, (const numpunct_wchar *this), (this))
4709 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
4711 TRACE("(%p)\n", this);
4715 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4716 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4717 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4718 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4719 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4720 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4722 TRACE("(%p)\n", this);
4723 return call_numpunct_wchar_do_thousands_sep(this);
4726 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4727 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4728 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4729 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4730 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4731 #if _MSVCP_VER <= 100
4732 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4733 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4735 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4736 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4738 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4740 TRACE("(%p)\n", this);
4741 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4744 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4745 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4746 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4747 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4748 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4749 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4751 TRACE("(%p)\n", this);
4752 return call_numpunct_wchar_do_grouping(this, ret
);
4755 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4756 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4757 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4758 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4759 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4760 #if _MSVCP_VER <= 100
4761 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4762 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4764 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4765 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4767 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4769 TRACE("(%p)\n", this);
4770 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4773 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4774 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4775 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4776 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4777 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4778 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4780 TRACE("(%p)\n", this);
4781 return call_numpunct_wchar_do_falsename(this, ret
);
4784 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4785 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4786 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4787 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4788 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4789 #if _MSVCP_VER <= 100
4790 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4791 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4793 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4794 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4796 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4798 TRACE("(%p)\n", this);
4799 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4802 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4803 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4804 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4805 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4806 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4807 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4809 TRACE("(%p)\n", this);
4810 return call_numpunct_wchar_do_truename(this, ret
);
4813 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4815 double ret
= strtod(buf
, buf_end
);
4818 ret
*= pow(10, exp
);
4822 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4828 ret
= _Stod(buf
, buf_end
, exp
);
4838 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4840 return _Stod(buf
, buf_end
, exp
);
4843 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4845 return _Stodx(buf
, buf_end
, exp
, err
);
4848 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4850 return _strtoi64(buf
, buf_end
, base
);
4853 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4859 ret
= _strtoi64(buf
, buf_end
, base
);
4869 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4871 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4872 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4877 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4879 return _strtoui64(buf
, buf_end
, base
);
4882 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4884 unsigned __int64 ret
;
4888 ret
= _strtoui64(buf
, buf_end
, base
);
4898 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4901 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4902 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4904 return buf
[0]=='-' ? -i
: i
;
4907 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4909 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4910 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4912 return buf
[0]=='-' ? -i
: i
;
4915 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4916 locale_id num_get_wchar_id
= {0};
4917 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4918 locale_id num_get_short_id
= {0};
4920 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4921 extern const vtable_ptr num_get_wchar_vtable
;
4922 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4923 extern const vtable_ptr num_get_short_vtable
;
4925 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4926 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4927 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4928 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4929 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4930 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4932 TRACE("(%p %p)\n", this, locinfo
);
4933 #if _MSVCP_VER <= 100
4934 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4938 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4939 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4940 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4941 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4942 const _Locinfo
*locinfo
, size_t refs
)
4944 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
4946 locale_facet_ctor_refs(&this->facet
, refs
);
4947 this->facet
.vtable
= &num_get_wchar_vtable
;
4949 num_get_wchar__Init(this, locinfo
);
4953 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4954 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4955 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4956 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4957 const _Locinfo
*locinfo
, size_t refs
)
4959 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4960 this->facet
.vtable
= &num_get_short_vtable
;
4964 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4965 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4966 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4967 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, size_t refs
)
4971 TRACE("(%p %Iu)\n", this, refs
);
4973 _Locinfo_ctor(&locinfo
);
4974 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4975 _Locinfo_dtor(&locinfo
);
4979 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4980 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4981 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4982 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, size_t refs
)
4984 num_get_wchar_ctor_refs(this, refs
);
4985 this->facet
.vtable
= &num_get_short_vtable
;
4989 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4990 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4991 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4992 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4994 return num_get_wchar_ctor_refs(this, 0);
4997 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4998 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4999 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
5000 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
5002 return num_get_short_ctor_refs(this, 0);
5005 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
5006 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
5007 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
5008 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
5009 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
5010 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
5011 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
5012 void __thiscall
num_get_wchar_dtor(num_get
*this)
5014 TRACE("(%p)\n", this);
5015 locale_facet_dtor(&this->facet
);
5018 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
5019 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
5021 TRACE("(%p %x)\n", this, flags
);
5023 /* we have an array, with the number of elements stored before the first object */
5024 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5026 for(i
=*ptr
-1; i
>=0; i
--)
5027 num_get_wchar_dtor(this+i
);
5028 MSVCRT_operator_delete(ptr
);
5030 num_get_wchar_dtor(this);
5032 MSVCRT_operator_delete(this);
5038 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5039 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5040 size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
5042 TRACE("(%p %p)\n", facet
, loc
);
5044 if(facet
&& !*facet
) {
5047 *facet
= MSVCRT_operator_new(sizeof(num_get
));
5049 ERR("Out of memory\n");
5050 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5054 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
5055 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
5056 _Locinfo_dtor(&locinfo
);
5062 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5063 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5064 size_t __cdecl
num_get_wchar__Getcat_old(const locale_facet
**facet
)
5066 return num_get_wchar__Getcat(facet
, locale_classic());
5069 num_get
* num_get_wchar_use_facet(const locale
*loc
)
5071 static num_get
*obj
= NULL
;
5074 const locale_facet
*fac
;
5076 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5077 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
5079 _Lockit_dtor(&lock
);
5080 return (num_get
*)fac
;
5084 _Lockit_dtor(&lock
);
5088 num_get_wchar__Getcat(&fac
, loc
);
5089 obj
= (num_get
*)fac
;
5090 call_locale_facet__Incref(&obj
->facet
);
5091 locale_facet_register(&obj
->facet
);
5092 _Lockit_dtor(&lock
);
5097 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5098 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5099 size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
5101 if(facet
&& !*facet
) {
5102 num_get_wchar__Getcat(facet
, loc
);
5103 (*(locale_facet
**)facet
)->vtable
= &num_get_short_vtable
;
5109 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5110 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5111 size_t __cdecl
num_get_short__Getcat_old(const locale_facet
**facet
)
5113 return num_get_short__Getcat(facet
, locale_classic());
5116 num_get
* num_get_short_use_facet(const locale
*loc
)
5118 static num_get
*obj
= NULL
;
5121 const locale_facet
*fac
;
5123 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5124 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
5126 _Lockit_dtor(&lock
);
5127 return (num_get
*)fac
;
5131 _Lockit_dtor(&lock
);
5135 num_get_short__Getcat(&fac
, loc
);
5136 obj
= (num_get
*)fac
;
5137 call_locale_facet__Incref(&obj
->facet
);
5138 locale_facet_register(&obj
->facet
);
5139 _Lockit_dtor(&lock
);
5144 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5145 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
5147 basic_string_char grouping_bstr
;
5148 basic_string_char groups_found
;
5149 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
5150 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
5151 wchar_t sep
= 0, digits
[11], *digits_pos
;
5152 const char *grouping
, *groups
;
5153 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
5156 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5158 #if _MSVCP_VER <= 100
5161 cvt
= &ctype_wchar_use_facet(loc
)->cvt
;
5165 digits
[i
] = mb_to_wc('0'+i
, cvt
);
5168 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5169 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5170 #if _MSVCP_VER >= 70
5171 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5175 MSVCP_basic_string_char_ctor(&groups_found
);
5177 istreambuf_iterator_wchar_val(first
);
5179 if(first
->strbuf
&& first
->val
==mb_to_wc('-', cvt
)) {
5181 istreambuf_iterator_wchar_inc(first
);
5182 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', cvt
)) {
5184 istreambuf_iterator_wchar_inc(first
);
5187 /* read possibly grouped numbers before decimal */
5188 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5189 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5190 if(sep
&& first
->val
==sep
) {
5191 if(!groups_no
) break; /* empty group - stop parsing */
5192 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5199 got_digit
= TRUE
; /* found a digit, zero or non-zero */
5200 /* write digit to dest if not a leading zero (to not waste dest buffer) */
5201 if(!got_nonzero
&& first
->val
== digits
[0])
5208 *dest
++ = '0'+digits_pos
-digits
;
5210 exp
++; /* too many digits, just multiply by 10 */
5211 if(sep
&& groups_no
<CHAR_MAX
)
5216 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
5217 if(got_digit
&& !got_nonzero
)
5220 /* get decimal, if any */
5221 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
5223 *dest
++ = *localeconv()->decimal_point
;
5224 istreambuf_iterator_wchar_inc(first
);
5227 /* read non-grouped after decimal */
5228 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5229 if(!(digits_pos
= wcschr(digits
, first
->val
)))
5231 else if(dest
<num_end
) {
5233 *dest
++ = '0'+digits_pos
-digits
;
5237 /* read exponent, if any */
5238 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', cvt
) || first
->val
==mb_to_wc('E', cvt
))) {
5240 istreambuf_iterator_wchar_inc(first
);
5242 if(first
->strbuf
&& first
->val
==mb_to_wc('-', cvt
)) {
5244 istreambuf_iterator_wchar_inc(first
);
5245 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', cvt
)) {
5247 istreambuf_iterator_wchar_inc(first
);
5250 got_digit
= got_nonzero
= FALSE
;
5252 /* skip any leading zeroes */
5253 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
5256 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
5257 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5260 *dest
++ = '0'+digits_pos
-digits
;
5263 /* if just found zeroes for exponent, use that */
5264 if(got_digit
&& !got_nonzero
)
5272 if(sep
&& groups_no
)
5273 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5275 if(!cur_group
) /* no groups, skip loop */
5277 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
5278 error
= TRUE
; /* trailing empty */
5280 for(; cur_group
>=0 && !error
; cur_group
--) {
5281 if(*grouping
== CHAR_MAX
) {
5285 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5286 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5289 }else if(grouping
[1]) {
5293 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5295 MSVCP_basic_string_char_dtor(&groups_found
);
5305 /* ?_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 */
5306 /* ?_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 */
5307 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5308 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5310 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
5313 /* ?_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 */
5314 /* ?_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 */
5315 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5316 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5318 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
5321 /* ?_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 */
5322 /* ?_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 */
5323 /* ?_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 */
5324 /* ?_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 */
5325 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5326 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
5328 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5332 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5333 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
5335 wchar_t digits
[23], *digits_pos
, sep
= 0;
5336 basic_string_char grouping_bstr
;
5337 basic_string_char groups_found
;
5338 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
5339 char *dest_beg
= dest
, *dest_end
= dest
+24;
5340 const char *grouping
, *groups
;
5341 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5344 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5346 #if _MSVCP_VER <= 100
5349 cvt
= &ctype_wchar_use_facet(loc
)->cvt
;
5353 digits
[i
] = mb_to_wc('0'+i
, cvt
);
5354 for(i
=0; i
<6; i
++) {
5355 digits
[10+i
] = mb_to_wc('a'+i
, cvt
);
5356 digits
[16+i
] = mb_to_wc('A'+i
, cvt
);
5359 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5360 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5361 #if _MSVCP_VER >= 70
5362 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5365 basefield
= fmtflags
& FMTFLAG_basefield
;
5366 if(basefield
== FMTFLAG_oct
)
5368 else if(basefield
== FMTFLAG_hex
)
5369 base
= 22; /* equal to the size of digits buffer */
5375 istreambuf_iterator_wchar_val(first
);
5376 if(first
->strbuf
&& first
->val
==mb_to_wc('-', cvt
)) {
5378 istreambuf_iterator_wchar_inc(first
);
5379 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', cvt
)) {
5381 istreambuf_iterator_wchar_inc(first
);
5384 if(first
->strbuf
&& first
->val
==digits
[0]) {
5386 istreambuf_iterator_wchar_inc(first
);
5387 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', cvt
) || first
->val
==mb_to_wc('X', cvt
))) {
5388 if(!base
|| base
== 22) {
5390 istreambuf_iterator_wchar_inc(first
);
5400 if(!base
) base
= 10;
5405 MSVCP_basic_string_char_ctor(&groups_found
);
5406 if(found_zero
) ++groups_no
;
5409 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5410 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5411 if(sep
&& first
->val
==sep
) {
5412 if(!groups_no
) break; /* empty group - stop parsing */
5413 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5421 if(dest_empty
&& first
->val
== digits
[0]) {
5427 /* skip digits that can't be copied to dest buffer, other
5428 * functions are responsible for detecting overflows */
5430 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
5431 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
5432 'A'+digits_pos
-digits
-16));
5433 if(sep
&& groups_no
<CHAR_MAX
)
5438 if(sep
&& groups_no
)
5439 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5441 if(!cur_group
) { /* no groups, skip loop */
5443 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
5444 error
= TRUE
; /* trailing empty */
5448 for(; cur_group
>=0 && !error
; cur_group
--) {
5449 if(*grouping
== CHAR_MAX
) {
5453 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5454 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5457 }else if(grouping
[1]) {
5462 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5464 MSVCP_basic_string_char_dtor(&groups_found
);
5471 }else if(dest_empty
)
5475 return (base
==22 ? 16 : base
);
5478 /* ?_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 */
5479 /* ?_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 */
5480 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5481 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5483 return num_get__Getifld(this, dest
, first
, last
,
5484 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
5487 /* ?_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 */
5488 /* ?_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 */
5489 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5490 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5492 return num_get__Getifld(this, dest
, first
, last
,
5493 fmtflags
, loc
, numpunct_short_use_facet(loc
));
5496 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
5497 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
5498 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
5499 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
5500 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
5501 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
5503 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5507 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
5508 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5509 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5510 void **pval
, numpunct_wchar
*numpunct
)
5516 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5518 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5519 &last
, FMTFLAG_hex
, IOS_LOCALE(base
), numpunct
), &err
);
5520 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5521 *state
|= IOSTATE_failbit
;
5522 else if(end
!=tmp
&& !err
)
5523 *pval
= (void*)((INT_PTR
)v
);
5525 *state
|= IOSTATE_failbit
;
5528 *state
|= IOSTATE_eofbit
;
5534 /* ?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 */
5535 /* ?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 */
5536 #if _MSVCP_VER <= 100
5537 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
5538 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5539 (this, ret, first, last, base, state, pval))
5541 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5542 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5543 (this, ret, first, last, base, state, pval))
5545 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
5546 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5547 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5549 return num_get_do_get_void(this, ret
, first
, last
, base
,
5550 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5553 /* ?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 */
5554 /* ?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 */
5555 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
5556 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5557 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5559 return num_get_do_get_void(this, ret
, first
, last
, base
,
5560 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5563 /* ?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 */
5564 /* ?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 */
5565 /* ?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 */
5566 /* ?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 */
5567 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
5568 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5569 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5571 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5572 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5575 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
5576 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5577 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5578 double *pval
, numpunct_wchar
*numpunct
)
5584 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5586 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
), numpunct
), &err
);
5587 if(end
!=tmp
&& !err
)
5590 *state
|= IOSTATE_failbit
;
5593 *state
|= IOSTATE_eofbit
;
5599 /* ?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 */
5600 /* ?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 */
5601 /* ?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 */
5602 /* ?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 */
5603 #if _MSVCP_VER <= 100
5604 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
5605 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5606 (this, ret, first, last, base, state, pval))
5607 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5608 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5609 (this, ret, first, last, base, state, pval))
5611 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5612 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5613 (this, ret, first, last, base, state, pval))
5614 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5615 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5616 (this, ret, first, last, base, state, pval))
5618 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
5619 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5620 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5622 return num_get_do_get_double(this, ret
, first
, last
, base
,
5623 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5626 /* ?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 */
5627 /* ?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 */
5628 /* ?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 */
5629 /* ?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 */
5630 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
5631 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5632 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5634 return num_get_do_get_double(this, ret
, first
, last
, base
,
5635 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5638 /* ?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 */
5639 /* ?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 */
5640 /* ?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 */
5641 /* ?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 */
5642 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
5643 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5644 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5646 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5647 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5650 /* ?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 */
5651 /* ?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 */
5652 /* ?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 */
5653 /* ?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 */
5654 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
5655 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5656 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5658 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5659 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5662 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
5663 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5664 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5665 float *pval
, numpunct_wchar
*numpunct
)
5671 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5673 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
5674 &last
, IOS_LOCALE(base
), numpunct
), &err
);
5675 if(end
!=tmp
&& !err
)
5678 *state
|= IOSTATE_failbit
;
5681 *state
|= IOSTATE_eofbit
;
5687 /* ?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 */
5688 /* ?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 */
5689 #if _MSVCP_VER <= 100
5690 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5691 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5692 (this, ret, first, last, base, state, pval))
5694 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5695 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5696 (this, ret, first, last, base, state, pval))
5698 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
5699 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5700 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5702 return num_get_do_get_float(this, ret
, first
, last
, base
,
5703 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5706 /* ?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 */
5707 /* ?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 */
5708 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
5709 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5710 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5712 return num_get_do_get_float(this, ret
, first
, last
, base
,
5713 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5716 /* ?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 */
5717 /* ?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 */
5718 /* ?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 */
5719 /* ?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 */
5720 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
5721 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5722 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5724 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5725 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5728 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
5729 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5730 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5731 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
5737 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5739 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5740 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5741 if(end
!=tmp
&& !err
)
5744 *state
|= IOSTATE_failbit
;
5747 *state
|= IOSTATE_eofbit
;
5753 /* ?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 */
5754 /* ?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 */
5755 #if _MSVCP_VER <= 100
5756 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5757 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5758 (this, ret, first, last, base, state, pval))
5760 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5761 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5762 (this, ret, first, last, base, state, pval))
5764 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
5765 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5766 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5768 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5769 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5772 /* ?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 */
5773 /* ?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 */
5774 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
5775 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5776 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5778 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5779 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5782 /* ?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 */
5783 /* ?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 */
5784 /* ?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 */
5785 /* ?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 */
5786 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
5787 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5788 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5790 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5791 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5794 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5795 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5796 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5797 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5803 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5805 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5806 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5807 if(end
!=tmp
&& !err
)
5810 *state
|= IOSTATE_failbit
;
5813 *state
|= IOSTATE_eofbit
;
5819 /* ?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 */
5820 /* ?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 */
5821 #if _MSVCP_VER <= 100
5822 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5823 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5824 (this, ret, first, last, base, state, pval))
5826 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5827 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5828 (this, ret, first, last, base, state, pval))
5830 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5831 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5832 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5834 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5835 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5838 /* ?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 */
5839 /* ?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 */
5840 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5841 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5842 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5844 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5845 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5848 /* ?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 */
5849 /* ?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 */
5850 /* ?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 */
5851 /* ?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 */
5852 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5853 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5854 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5856 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5857 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5860 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5861 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5862 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5863 ULONG
*pval
, numpunct_wchar
*numpunct
)
5869 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5871 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5872 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5873 if(end
!=tmp
&& !err
)
5876 *state
|= IOSTATE_failbit
;
5879 *state
|= IOSTATE_eofbit
;
5885 /* ?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 */
5886 /* ?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 */
5887 #if _MSVCP_VER <= 100
5888 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5889 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5890 (this, ret, first, last, base, state, pval))
5892 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5893 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5894 (this, ret, first, last, base, state, pval))
5896 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5897 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5898 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5900 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5901 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5904 /* ?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 */
5905 /* ?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 */
5906 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5907 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5908 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5910 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5911 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5914 /* ?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 */
5915 /* ?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 */
5916 /* ?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 */
5917 /* ?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 */
5918 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5919 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5920 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5922 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5923 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5926 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5927 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5928 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5929 LONG
*pval
, numpunct_wchar
*numpunct
)
5935 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5937 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5938 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5939 if(end
!=tmp
&& !err
)
5942 *state
|= IOSTATE_failbit
;
5945 *state
|= IOSTATE_eofbit
;
5951 /* ?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 */
5952 /* ?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 */
5953 #if _MSVCP_VER <= 100
5954 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5955 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5956 (this, ret, first, last, base, state, pval))
5958 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5959 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5960 (this, ret, first, last, base, state, pval))
5962 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5963 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5964 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5966 return num_get_do_get_long(this, ret
, first
, last
, base
,
5967 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5970 /* ?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 */
5971 /* ?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 */
5972 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5973 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5974 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5976 return num_get_do_get_long(this, ret
, first
, last
, base
,
5977 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5980 /* ?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 */
5981 /* ?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 */
5982 /* ?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 */
5983 /* ?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 */
5984 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5985 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5986 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5988 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5989 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5992 /* ?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 */
5993 /* ?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 */
5994 #if _MSVCP_VER <= 100
5995 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5996 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5997 (this, ret, first, last, base, state, pval))
5999 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
6000 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
6001 (this, ret, first, last, base, state, pval))
6003 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
6004 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6005 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
6007 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6008 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6011 /* ?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 */
6012 /* ?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 */
6013 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
6014 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6015 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
6017 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6018 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6021 /* ?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 */
6022 /* ?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 */
6023 /* ?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 */
6024 /* ?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 */
6025 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
6026 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6027 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
6029 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6030 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6033 /* ?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 */
6034 /* ?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 */
6035 #if _MSVCP_VER <= 100
6036 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
6037 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
6038 (this, ret, first, last, base, state, pval))
6040 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_wchar*, \
6041 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
6042 (this, ret, first, last, base, state, pval))
6044 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
6045 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6046 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6049 char tmp
[25], *beg
, *end
;
6052 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6054 b
= num_get_wchar__Getifld(this, tmp
,
6055 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
6056 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6057 v
= _Stoulx(beg
, &end
, b
, &err
);
6059 if(v
!= (ULONG
)((unsigned short)v
))
6060 *state
|= IOSTATE_failbit
;
6061 else if(end
!=beg
&& !err
)
6062 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6064 *state
|= IOSTATE_failbit
;
6067 *state
|= IOSTATE_eofbit
;
6073 /* ?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 */
6074 /* ?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 */
6075 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
6076 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6077 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6079 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
6083 /* ?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 */
6084 /* ?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 */
6085 /* ?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@ */
6086 /* ?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 */
6087 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
6088 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6089 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6091 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6092 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6095 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
6096 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
6097 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
6098 bool *pval
, numpunct_wchar
*numpunct
)
6100 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6102 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6103 basic_string_wchar false_bstr
, true_bstr
;
6104 const wchar_t *pfalse
, *ptrue
;
6106 numpunct_wchar_falsename(numpunct
, &false_bstr
);
6107 numpunct_wchar_truename(numpunct
, &true_bstr
);
6108 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
6109 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
6111 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;) {
6112 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6114 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6117 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6119 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6128 istreambuf_iterator_wchar_inc(&first
);
6130 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6139 *state
|= IOSTATE_failbit
;
6141 MSVCP_basic_string_wchar_dtor(&false_bstr
);
6142 MSVCP_basic_string_wchar_dtor(&true_bstr
);
6146 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
6147 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
6149 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6152 *state
|= IOSTATE_failbit
;
6156 *state
|= IOSTATE_eofbit
;
6157 memcpy(ret
, &first
, sizeof(first
));
6161 /* ?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 */
6162 /* ?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 */
6163 #if _MSVCP_VER <= 100
6164 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
6165 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, bool*), \
6166 (this, ret, first, last, base, state, pval))
6168 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_wchar*, \
6169 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, bool*), \
6170 (this, ret, first, last, base, state, pval))
6172 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
6173 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6174 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, bool *pval
)
6176 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6177 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
6180 /* ?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 */
6181 /* ?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 */
6182 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
6183 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6184 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, bool *pval
)
6186 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6187 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
6190 /* ?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 */
6191 /* ?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 */
6192 /* ?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 */
6193 /* ?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 */
6194 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
6195 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6196 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, bool *pval
)
6198 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6199 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6202 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6203 locale_id num_get_char_id
= {0};
6205 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6206 extern const vtable_ptr num_get_char_vtable
;
6208 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6209 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6210 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
6211 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
6213 TRACE("(%p %p)\n", this, locinfo
);
6214 #if _MSVCP_VER <= 100
6215 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6219 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6220 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6221 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
6222 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
6223 const _Locinfo
*locinfo
, size_t refs
)
6225 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
6227 locale_facet_ctor_refs(&this->facet
, refs
);
6228 this->facet
.vtable
= &num_get_char_vtable
;
6230 num_get_char__Init(this, locinfo
);
6234 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6235 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6236 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
6237 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, size_t refs
)
6241 TRACE("(%p %Iu)\n", this, refs
);
6243 _Locinfo_ctor(&locinfo
);
6244 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
6245 _Locinfo_dtor(&locinfo
);
6249 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6250 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6251 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
6252 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
6254 return num_get_char_ctor_refs(this, 0);
6257 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
6258 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
6259 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6260 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6261 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
6262 void __thiscall
num_get_char_dtor(num_get
*this)
6264 TRACE("(%p)\n", this);
6265 locale_facet_dtor(&this->facet
);
6268 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
6269 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
6271 TRACE("(%p %x)\n", this, flags
);
6273 /* we have an array, with the number of elements stored before the first object */
6274 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6276 for(i
=*ptr
-1; i
>=0; i
--)
6277 num_get_char_dtor(this+i
);
6278 MSVCRT_operator_delete(ptr
);
6280 num_get_char_dtor(this);
6282 MSVCRT_operator_delete(this);
6288 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6289 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6290 size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6292 TRACE("(%p %p)\n", facet
, loc
);
6294 if(facet
&& !*facet
) {
6297 *facet
= MSVCRT_operator_new(sizeof(num_get
));
6299 ERR("Out of memory\n");
6300 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6304 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6305 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
6306 _Locinfo_dtor(&locinfo
);
6312 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6313 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6314 size_t __cdecl
num_get_char__Getcat_old(const locale_facet
**facet
)
6316 return num_get_char__Getcat(facet
, locale_classic());
6319 num_get
* num_get_char_use_facet(const locale
*loc
)
6321 static num_get
*obj
= NULL
;
6324 const locale_facet
*fac
;
6326 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6327 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
6329 _Lockit_dtor(&lock
);
6330 return (num_get
*)fac
;
6334 _Lockit_dtor(&lock
);
6338 num_get_char__Getcat(&fac
, loc
);
6339 obj
= (num_get
*)fac
;
6340 call_locale_facet__Incref(&obj
->facet
);
6341 locale_facet_register(&obj
->facet
);
6342 _Lockit_dtor(&lock
);
6347 /* ?_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 */
6348 /* ?_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 */
6349 /* Copies number to dest buffer, validates grouping and skips separators.
6350 * Updates first so it points past the number, all digits are skipped.
6351 * Returns how exponent needs to changed.
6352 * Size of dest buffer is not specified, assuming it's not smaller than 32:
6353 * strlen(+0.e+) + 22(digits) + 4(exponent) + 1(nullbyte)
6355 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6356 istreambuf_iterator_char
*last
, const locale
*loc
)
6358 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6359 basic_string_char grouping_bstr
;
6360 basic_string_char groups_found
;
6361 int groups_no
= 0, cur_group
= 0, exp
= 0;
6362 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
= 0;
6363 const char *grouping
, *groups
;
6364 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
6366 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
6368 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6369 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6370 #if _MSVCP_VER >= 70
6371 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6375 MSVCP_basic_string_char_ctor(&groups_found
);
6377 istreambuf_iterator_char_val(first
);
6379 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6380 *dest
++ = first
->val
;
6381 istreambuf_iterator_char_inc(first
);
6384 /* read possibly grouped numbers before decimal */
6385 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6386 if(first
->val
<'0' || first
->val
>'9') {
6387 if(sep
&& first
->val
==sep
) {
6388 if(!groups_no
) break; /* empty group - stop parsing */
6389 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6396 got_digit
= TRUE
; /* found a digit, zero or non-zero */
6397 /* write digit to dest if not a leading zero (to not waste dest buffer) */
6398 if(!got_nonzero
&& first
->val
== '0')
6405 *dest
++ = first
->val
;
6407 exp
++; /* too many digits, just multiply by 10 */
6408 if(sep
&& groups_no
<CHAR_MAX
)
6413 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
6414 if(got_digit
&& !got_nonzero
)
6417 /* get decimal, if any */
6418 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
6420 *dest
++ = *localeconv()->decimal_point
;
6421 istreambuf_iterator_char_inc(first
);
6424 /* read non-grouped after decimal */
6425 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6426 if(first
->val
<'0' || first
->val
>'9')
6428 else if(dest
<num_end
) {
6430 *dest
++ = first
->val
;
6434 /* read exponent, if any */
6435 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
6436 *dest
++ = first
->val
;
6437 istreambuf_iterator_char_inc(first
);
6439 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6440 *dest
++ = first
->val
;
6441 istreambuf_iterator_char_inc(first
);
6444 got_digit
= got_nonzero
= FALSE
;
6446 /* skip any leading zeroes */
6447 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
6450 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
6451 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
6454 *dest
++ = first
->val
;
6457 /* if just found zeroes for exponent, use that */
6458 if(got_digit
&& !got_nonzero
)
6466 if(sep
&& groups_no
)
6467 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6469 if(!cur_group
) /* no groups, skip loop */
6471 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
6472 error
= TRUE
; /* trailing empty */
6474 for(; cur_group
>=0 && !error
; cur_group
--) {
6475 if(*grouping
== CHAR_MAX
) {
6479 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6480 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6483 }else if(grouping
[1]) {
6487 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6489 MSVCP_basic_string_char_dtor(&groups_found
);
6499 /* ?_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 */
6500 /* ?_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 */
6501 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6502 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
6504 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
6508 /* ?_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 */
6509 /* ?_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 */
6510 /* Copies number to dest buffer, validates grouping and skips separators.
6511 * Updates first so it points past the number, all digits are skipped.
6512 * Returns number base (8, 10 or 16).
6513 * Size of dest buffer is not specified, assuming it's not smaller than 25:
6514 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
6516 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6517 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
6519 static const char digits
[] = "0123456789abcdefABCDEF";
6521 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6522 basic_string_char grouping_bstr
;
6523 basic_string_char groups_found
;
6524 int basefield
, base
, groups_no
= 0, cur_group
= 0;
6525 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
= 0;
6526 const char *grouping
, *groups
;
6527 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
6529 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
6531 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6532 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6533 #if _MSVCP_VER >= 70
6534 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6537 basefield
= fmtflags
& FMTFLAG_basefield
;
6538 if(basefield
== FMTFLAG_oct
)
6540 else if(basefield
== FMTFLAG_hex
)
6541 base
= 22; /* equal to the size of digits buffer */
6547 istreambuf_iterator_char_val(first
);
6548 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6549 *dest
++ = first
->val
;
6550 istreambuf_iterator_char_inc(first
);
6553 if(first
->strbuf
&& first
->val
=='0') {
6555 istreambuf_iterator_char_inc(first
);
6556 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
6557 if(!base
|| base
== 22) {
6559 istreambuf_iterator_char_inc(first
);
6569 if (!base
) base
= 10;
6574 MSVCP_basic_string_char_ctor(&groups_found
);
6575 if(found_zero
) ++groups_no
;
6578 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6579 if(!memchr(digits
, first
->val
, base
)) {
6580 if(sep
&& first
->val
==sep
) {
6581 if(!groups_no
) break; /* empty group - stop parsing */
6582 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6590 if(dest_empty
&& first
->val
== '0')
6597 /* skip digits that can't be copied to dest buffer, other
6598 * functions are responsible for detecting overflows */
6600 *dest
++ = first
->val
;
6601 if(sep
&& groups_no
<CHAR_MAX
)
6606 if(sep
&& groups_no
)
6607 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6609 if(!cur_group
) { /* no groups, skip loop */
6611 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
6612 error
= TRUE
; /* trailing empty */
6616 for(; cur_group
>=0 && !error
; cur_group
--) {
6617 if(*grouping
== CHAR_MAX
) {
6621 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6622 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6625 }else if(grouping
[1]) {
6630 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6632 MSVCP_basic_string_char_dtor(&groups_found
);
6639 }else if(dest_empty
)
6643 return (base
==22 ? 16 : base
);
6646 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
6647 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
6648 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
6649 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
6651 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
6655 /* ?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 */
6656 /* ?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 */
6657 #if _MSVCP_VER <= 100
6658 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
6659 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6660 (this, ret, first, last, base, state, pval))
6662 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6663 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6664 (this, ret, first, last, base, state, pval))
6666 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
6667 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6668 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6674 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6676 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6677 &first
, &last
, FMTFLAG_hex
, IOS_LOCALE(base
)), &err
);
6678 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
6679 *state
|= IOSTATE_failbit
;
6680 else if(end
!=tmp
&& !err
)
6681 *pval
= (void*)((INT_PTR
)v
);
6683 *state
|= IOSTATE_failbit
;
6686 *state
|= IOSTATE_eofbit
;
6692 /* ?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 */
6693 /* ?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 */
6694 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
6695 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6696 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6698 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6699 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
6702 /* ?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 */
6703 /* ?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 */
6704 /* ?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 */
6705 /* ?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 */
6706 #if _MSVCP_VER <= 100
6707 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
6708 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6709 (this, ret, first, last, base, state, pval))
6710 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6711 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6712 (this, ret, first, last, base, state, pval))
6714 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6715 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6716 (this, ret, first, last, base, state, pval))
6717 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6718 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6719 (this, ret, first, last, base, state, pval))
6721 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
6722 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6723 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6729 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6731 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6732 if(end
!=tmp
&& !err
)
6735 *state
|= IOSTATE_failbit
;
6738 *state
|= IOSTATE_eofbit
;
6744 /* ?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 */
6745 /* ?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 */
6746 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
6747 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
6748 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6750 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6751 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
6754 /* ?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 */
6755 /* ?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 */
6756 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
6757 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6758 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6760 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6761 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
6764 /* ?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 */
6765 /* ?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 */
6766 #if _MSVCP_VER <= 100
6767 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6768 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6769 (this, ret, first, last, base, state, pval))
6771 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6772 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6773 (this, ret, first, last, base, state, pval))
6775 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
6776 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6777 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6783 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6785 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6786 if(end
!=tmp
&& !err
)
6789 *state
|= IOSTATE_failbit
;
6792 *state
|= IOSTATE_eofbit
;
6798 /* ?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 */
6799 /* ?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 */
6800 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
6801 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6802 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6804 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6805 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
6808 /* ?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 */
6809 /* ?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 */
6810 #if _MSVCP_VER <= 100
6811 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6812 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6813 (this, ret, first, last, base, state, pval))
6815 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6816 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6817 (this, ret, first, last, base, state, pval))
6819 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
6820 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6821 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6827 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6829 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6830 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6831 if(end
!=tmp
&& !err
)
6834 *state
|= IOSTATE_failbit
;
6837 *state
|= IOSTATE_eofbit
;
6843 /* ?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 */
6844 /* ?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 */
6845 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
6846 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6847 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6849 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6850 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
6853 /* ?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 */
6854 /* ?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 */
6855 #if _MSVCP_VER <= 100
6856 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6857 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6858 (this, ret, first, last, base, state, pval))
6860 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6861 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6862 (this, ret, first, last, base, state, pval))
6864 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
6865 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6866 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6872 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6874 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6875 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6876 if(end
!=tmp
&& !err
)
6879 *state
|= IOSTATE_failbit
;
6882 *state
|= IOSTATE_eofbit
;
6888 /* ?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 */
6889 /* ?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 */
6890 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6891 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6892 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6894 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6895 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
6898 /* ?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 */
6899 /* ?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 */
6900 #if _MSVCP_VER <= 100
6901 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6902 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6903 (this, ret, first, last, base, state, pval))
6905 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6906 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6907 (this, ret, first, last, base, state, pval))
6909 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6910 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6911 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6917 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6919 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6920 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6921 if(end
!=tmp
&& !err
)
6924 *state
|= IOSTATE_failbit
;
6927 *state
|= IOSTATE_eofbit
;
6933 /* ?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 */
6934 /* ?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 */
6935 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6936 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6937 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6939 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6940 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6943 /* ?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 */
6944 /* ?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 */
6945 #if _MSVCP_VER <= 100
6946 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6947 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6948 (this, ret, first, last, base, state, pval))
6950 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6951 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6952 (this, ret, first, last, base, state, pval))
6954 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6955 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6956 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6962 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6964 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6965 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6966 if(end
!=tmp
&& !err
)
6969 *state
|= IOSTATE_failbit
;
6972 *state
|= IOSTATE_eofbit
;
6978 /* ?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 */
6979 /* ?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 */
6980 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6981 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6982 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6984 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6985 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6988 /* ?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 */
6989 /* ?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 */
6990 #if _MSVCP_VER <= 100
6991 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6992 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6993 (this, ret, first, last, base, state, pval))
6995 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6996 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6997 (this, ret, first, last, base, state, pval))
6999 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
7000 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
7001 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
7003 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7004 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
7007 /* ?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 */
7008 /* ?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 */
7009 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
7010 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
7011 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
7013 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7014 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
7017 /* ?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 */
7018 /* ?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 */
7019 #if _MSVCP_VER <= 100
7020 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
7021 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
7022 (this, ret, first, last, base, state, pval))
7024 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_char*, \
7025 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
7026 (this, ret, first, last, base, state, pval))
7028 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
7029 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
7030 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
7033 char tmp
[25], *beg
, *end
;
7036 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7038 b
= num_get_char__Getifld(this, tmp
,
7039 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
7040 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
7041 v
= _Stoulx(beg
, &end
, b
, &err
);
7043 if(v
!= (ULONG
)((unsigned short)v
))
7044 *state
|= IOSTATE_failbit
;
7045 else if(end
!=beg
&& !err
)
7046 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
7048 *state
|= IOSTATE_failbit
;
7051 *state
|= IOSTATE_eofbit
;
7057 /* ?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 */
7058 /* ?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 */
7059 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
7060 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
7061 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
7063 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7064 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
7067 /* ?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 */
7068 /* ?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 */
7069 #if _MSVCP_VER <= 100
7070 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
7071 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, bool*), \
7072 (this, ret, first, last, base, state, pval))
7074 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_char*, \
7075 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, bool*), \
7076 (this, ret, first, last, base, state, pval))
7078 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
7079 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7080 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, bool *pval
)
7082 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7084 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7085 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7086 basic_string_char false_bstr
, true_bstr
;
7087 const char *pfalse
, *ptrue
;
7089 numpunct_char_falsename(numpunct
, &false_bstr
);
7090 numpunct_char_truename(numpunct
, &true_bstr
);
7091 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
7092 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
7094 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;) {
7095 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
7097 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
7100 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
7102 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
7111 istreambuf_iterator_char_inc(&first
);
7113 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
7122 *state
|= IOSTATE_failbit
;
7124 MSVCP_basic_string_char_dtor(&false_bstr
);
7125 MSVCP_basic_string_char_dtor(&true_bstr
);
7129 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
7130 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
7132 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
7135 *state
|= IOSTATE_failbit
;
7139 *state
|= IOSTATE_eofbit
;
7140 memcpy(ret
, &first
, sizeof(first
));
7144 /* ?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 */
7145 /* ?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 */
7146 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
7147 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7148 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, bool *pval
)
7150 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7151 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
7154 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
7155 locale_id num_put_char_id
= {0};
7157 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
7158 extern const vtable_ptr num_put_char_vtable
;
7160 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7161 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7162 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
7163 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
7165 TRACE("(%p %p)\n", this, locinfo
);
7166 #if _MSVCP_VER < 110
7167 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7171 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7172 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7173 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
7174 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, size_t refs
)
7176 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
7178 locale_facet_ctor_refs(&this->facet
, refs
);
7179 this->facet
.vtable
= &num_put_char_vtable
;
7181 num_put_char__Init(this, locinfo
);
7185 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
7186 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
7187 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
7188 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, size_t refs
)
7192 TRACE("(%p %Iu)\n", this, refs
);
7194 _Locinfo_ctor(&locinfo
);
7195 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
7196 _Locinfo_dtor(&locinfo
);
7200 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
7201 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
7202 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
7203 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
7205 return num_put_char_ctor_refs(this, 0);
7208 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
7209 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
7210 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
7211 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
7212 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
7213 void __thiscall
num_put_char_dtor(num_put
*this)
7215 TRACE("(%p)\n", this);
7216 locale_facet_dtor(&this->facet
);
7219 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
7220 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
7222 TRACE("(%p %x)\n", this, flags
);
7224 /* we have an array, with the number of elements stored before the first object */
7225 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7227 for(i
=*ptr
-1; i
>=0; i
--)
7228 num_put_char_dtor(this+i
);
7229 MSVCRT_operator_delete(ptr
);
7231 num_put_char_dtor(this);
7233 MSVCRT_operator_delete(this);
7239 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7240 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7241 size_t __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
7243 TRACE("(%p %p)\n", facet
, loc
);
7245 if(facet
&& !*facet
) {
7248 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7250 ERR("Out of memory\n");
7251 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7255 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7256 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7257 _Locinfo_dtor(&locinfo
);
7263 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7264 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7265 size_t __cdecl
num_put_char__Getcat_old(const locale_facet
**facet
)
7267 return num_put_char__Getcat(facet
, locale_classic());
7270 num_put
* num_put_char_use_facet(const locale
*loc
)
7272 static num_put
*obj
= NULL
;
7275 const locale_facet
*fac
;
7277 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7278 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
7280 _Lockit_dtor(&lock
);
7281 return (num_put
*)fac
;
7285 _Lockit_dtor(&lock
);
7289 num_put_char__Getcat(&fac
, loc
);
7290 obj
= (num_put
*)fac
;
7291 call_locale_facet__Incref(&obj
->facet
);
7292 locale_facet_register(&obj
->facet
);
7293 _Lockit_dtor(&lock
);
7298 /* ?_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 */
7299 /* ?_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 */
7300 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
7301 ostreambuf_iterator_char dest
, const char *ptr
, size_t count
)
7303 TRACE("(%p %p %p %Iu)\n", this, ret
, ptr
, count
);
7305 for(; count
>0; count
--)
7306 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7312 /* ?_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 */
7313 /* ?_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 */
7314 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
7315 ostreambuf_iterator_char dest
, const char *ptr
, size_t count
)
7317 TRACE("(%p %p %p %Iu)\n", this, ret
, ptr
, count
);
7319 for(; count
>0; count
--)
7320 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7326 /* ?_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 */
7327 /* ?_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 */
7328 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
7329 ostreambuf_iterator_char dest
, const char *ptr
, size_t count
, char delim
)
7331 FIXME("(%p %p %p %Iu %d) stub\n", this, ret
, ptr
, count
, delim
);
7335 /* ?_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 */
7336 /* ?_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 */
7337 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
7338 ostreambuf_iterator_char dest
, char c
, size_t count
)
7340 TRACE("(%p %p %d %Iu)\n", this, ret
, c
, count
);
7342 for(; count
>0; count
--)
7343 ostreambuf_iterator_char_put(&dest
, c
);
7349 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
7350 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7351 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7353 int type
= fmtfl
& FMTFLAG_floatfield
;
7356 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7359 if(fmtfl
& FMTFLAG_showpos
)
7361 if(fmtfl
& FMTFLAG_showpoint
)
7368 if(type
== FMTFLAG_fixed
)
7370 else if(type
== FMTFLAG_scientific
)
7371 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7372 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7373 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7375 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7381 /* ?_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 */
7382 /* ?_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 */
7383 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7384 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, size_t bef_point
,
7385 size_t aft_point
, size_t trailing
, size_t count
)
7387 FIXME("(%p %p %p %d %p %Iu %Iu %Iu %Iu) stub\n", this, ret
, base
,
7388 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7392 /* TODO: This function should be removed when num_put_char__Fput is implemented */
7393 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7394 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, size_t count
)
7396 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7397 basic_string_char grouping_bstr
;
7398 const char *grouping
;
7399 char *p
, sep
= 0, dec_point
= *localeconv()->decimal_point
;
7400 int cur_group
= 0, group_size
= 0;
7401 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7404 TRACE("(%p %p %p %d %s %Iu)\n", this, ret
, base
, fill
, buf
, count
);
7406 /* Change decimal point */
7407 for(p
=buf
; p
<buf
+count
; p
++) {
7408 if(*p
== dec_point
) {
7409 *p
= numpunct_char_decimal_point(numpunct
);
7415 /* Add separators to number */
7416 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7417 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7418 #if _MSVCP_VER >= 70
7419 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7422 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7424 if(group_size
== grouping
[cur_group
]) {
7426 if(grouping
[cur_group
+1])
7429 memmove(p
+1, p
, buf
+count
-p
);
7434 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7436 /* Display number with padding */
7437 if(count
>= base
->wide
)
7440 pad
= base
->wide
-count
;
7443 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7444 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7447 if(adjustfield
!= FMTFLAG_left
) {
7448 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7451 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7452 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7455 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
7456 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7457 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7459 int base
= fmtfl
& FMTFLAG_basefield
;
7462 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7465 if(fmtfl
& FMTFLAG_showpos
)
7467 if(fmtfl
& FMTFLAG_showbase
)
7474 if(base
== FMTFLAG_oct
)
7476 else if(base
== FMTFLAG_hex
)
7477 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7485 /* ?_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 */
7486 /* ?_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 */
7487 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7488 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, size_t count
)
7490 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7491 basic_string_char grouping_bstr
;
7492 const char *grouping
;
7494 int cur_group
= 0, group_size
= 0;
7495 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7498 TRACE("(%p %p %p %d %s %Iu)\n", this, ret
, base
, fill
, buf
, count
);
7500 /* Add separators to number */
7501 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7502 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7503 #if _MSVCP_VER >= 70
7504 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7507 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7509 if(group_size
== grouping
[cur_group
]) {
7511 if(grouping
[cur_group
+1])
7514 memmove(p
+1, p
, buf
+count
-p
);
7519 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7521 /* Display number with padding */
7522 if(count
>= base
->wide
)
7525 pad
= base
->wide
-count
;
7528 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7529 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7531 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7532 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
7535 if(adjustfield
!= FMTFLAG_left
) {
7536 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7539 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7540 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7543 /* ?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 */
7544 /* ?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 */
7545 #if _MSVCP_VER <= 100
7546 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7547 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7548 (this, ret, dest, base, fill, v))
7550 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_char*, \
7551 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7552 (this, ret, dest, base, fill, v))
7554 #if _MSVCP_VER != 80
7555 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
7557 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 32)
7559 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7560 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7562 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
7563 char fmt
[7]; /* strlen("%+#lld")+1 */
7565 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7567 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7568 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7571 /* ?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 */
7572 /* ?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 */
7573 #if _MSVCP_VER != 80
7574 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
7576 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 32)
7578 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7579 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7581 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7582 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
7585 /* ?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 */
7586 /* ?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 */
7587 #if _MSVCP_VER <= 100
7588 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7589 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7590 (this, ret, dest, base, fill, v))
7592 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7593 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7594 (this, ret, dest, base, fill, v))
7596 #if _MSVCP_VER != 80
7597 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
7599 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 32)
7601 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7602 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7604 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
7605 char fmt
[7]; /* strlen("%+#lld")+1 */
7607 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7609 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7610 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7613 /* ?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 */
7614 /* ?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 */
7615 #if _MSVCP_VER != 80
7616 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
7618 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 32)
7620 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7621 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7623 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7624 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7627 static inline unsigned get_precision(const ios_base
*base
)
7629 streamsize ret
= base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
7635 /* ?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 */
7636 /* ?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 */
7637 /* ?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 */
7638 /* ?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 */
7639 #if _MSVCP_VER <= 100
7640 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7641 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7642 (this, ret, dest, base, fill, v))
7643 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
7644 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7645 (this, ret, dest, base, fill, v))
7647 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7648 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7649 (this, ret, dest, base, fill, v))
7650 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7651 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7652 (this, ret, dest, base, fill, v))
7654 #if _MSVCP_VER != 80
7655 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
7657 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 36)
7659 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7660 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7663 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7667 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7669 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7670 prec
= get_precision(base
);
7671 size
= _scprintf(fmt
, prec
, v
);
7673 /* TODO: don't use dynamic allocation */
7674 tmp
= MSVCRT_operator_new(size
*2);
7676 ERR("Out of memory\n");
7677 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7679 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
7680 MSVCRT_operator_delete(tmp
);
7684 /* ?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 */
7685 /* ?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 */
7686 #if _MSVCP_VER != 80
7687 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
7689 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 36)
7691 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7692 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7694 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7695 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
7698 /* ?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 */
7699 /* ?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 */
7700 #if _MSVCP_VER != 80
7701 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
7703 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 36)
7705 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
7706 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7708 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7709 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7712 /* ?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 */
7713 /* ?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 */
7714 #if _MSVCP_VER <= 100
7715 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
7716 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7717 (this, ret, dest, base, fill, v))
7719 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7720 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7721 (this, ret, dest, base, fill, v))
7723 #if _MSVCP_VER != 80
7724 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
7726 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 32)
7728 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7729 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7731 char tmp
[17]; /* 8(16^8==2^64)*2(separators between every digit) + 1 */
7733 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7735 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7738 /* ?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 */
7739 /* ?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 */
7740 #if _MSVCP_VER != 80
7741 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
7743 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 32)
7745 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7746 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7748 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7749 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7752 /* ?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 */
7753 /* ?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 */
7754 #if _MSVCP_VER <= 100
7755 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7756 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7757 (this, ret, dest, base, fill, v))
7759 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7760 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7761 (this, ret, dest, base, fill, v))
7763 #if _MSVCP_VER != 80
7764 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
7766 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 36)
7768 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7769 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7771 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
7772 char fmt
[7]; /* strlen("%+#lld")+1 */
7774 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7776 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7777 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7780 /* ?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 */
7781 /* ?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 */
7782 #if _MSVCP_VER != 80
7783 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
7785 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 36)
7787 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7788 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7790 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7791 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7794 /* ?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 */
7795 /* ?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 */
7796 #if _MSVCP_VER <= 100
7797 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7798 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7799 (this, ret, dest, base, fill, v))
7801 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7802 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7803 (this, ret, dest, base, fill, v))
7805 #if _MSVCP_VER != 80
7806 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
7808 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 36)
7810 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7811 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7813 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
7814 char fmt
[7]; /* strlen("%+#lld")+1 */
7816 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7818 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7819 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7822 /* ?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 */
7823 /* ?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 */
7824 #if _MSVCP_VER != 80
7825 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
7827 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 36)
7829 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7830 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7832 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7833 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7836 /* ?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 */
7837 /* ?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 */
7838 #if _MSVCP_VER <= 100
7839 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7840 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, bool), \
7841 (this, ret, dest, base, fill, v))
7843 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_char*, \
7844 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, bool), \
7845 (this, ret, dest, base, fill, v))
7847 #if _MSVCP_VER != 80
7848 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
7850 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 32)
7852 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7853 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, bool v
)
7855 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7857 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7858 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7859 basic_string_char str
;
7863 numpunct_char_truename(numpunct
, &str
);
7865 numpunct_char_falsename(numpunct
, &str
);
7867 len
= MSVCP_basic_string_char_length(&str
);
7868 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7871 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7872 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
7875 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
7876 MSVCP_basic_string_char_dtor(&str
);
7877 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7880 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
7883 /* ?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 */
7884 /* ?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 */
7885 #if _MSVCP_VER != 80
7886 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
7888 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 32)
7890 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7891 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, bool v
)
7893 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7894 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7897 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
7898 locale_id num_put_wchar_id
= {0};
7899 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
7900 locale_id num_put_short_id
= {0};
7902 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
7903 extern const vtable_ptr num_put_wchar_vtable
;
7904 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
7905 extern const vtable_ptr num_put_short_vtable
;
7907 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7908 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7909 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
7910 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
7912 TRACE("(%p %p)\n", this, locinfo
);
7913 #if _MSVCP_VER < 110
7914 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7918 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7919 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7920 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
7921 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, size_t refs
)
7923 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
7925 locale_facet_ctor_refs(&this->facet
, refs
);
7926 this->facet
.vtable
= &num_put_wchar_vtable
;
7928 num_put_wchar__Init(this, locinfo
);
7932 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7933 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7934 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
7935 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, size_t refs
)
7937 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
7938 this->facet
.vtable
= &num_put_short_vtable
;
7942 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
7943 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
7944 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
7945 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, size_t refs
)
7949 TRACE("(%p %Iu)\n", this, refs
);
7951 _Locinfo_ctor(&locinfo
);
7952 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
7953 _Locinfo_dtor(&locinfo
);
7957 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
7958 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
7959 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
7960 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, size_t refs
)
7962 num_put_wchar_ctor_refs(this, refs
);
7963 this->facet
.vtable
= &num_put_short_vtable
;
7967 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
7968 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
7969 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
7970 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
7972 return num_put_wchar_ctor_refs(this, 0);
7975 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
7976 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
7977 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
7978 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
7980 return num_put_short_ctor_refs(this, 0);
7983 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
7984 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
7985 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
7986 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
7987 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
7988 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
7989 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
7990 void __thiscall
num_put_wchar_dtor(num_put
*this)
7992 TRACE("(%p)\n", this);
7993 locale_facet_dtor(&this->facet
);
7996 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
7997 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
7999 TRACE("(%p %x)\n", this, flags
);
8001 /* we have an array, with the number of elements stored before the first object */
8002 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8004 for(i
=*ptr
-1; i
>=0; i
--)
8005 num_put_wchar_dtor(this+i
);
8006 MSVCRT_operator_delete(ptr
);
8008 num_put_wchar_dtor(this);
8010 MSVCRT_operator_delete(this);
8016 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8017 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8018 size_t __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
8020 TRACE("(%p %p)\n", facet
, loc
);
8022 if(facet
&& !*facet
) {
8025 *facet
= MSVCRT_operator_new(sizeof(num_put
));
8027 ERR("Out of memory\n");
8028 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8032 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8033 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
8034 _Locinfo_dtor(&locinfo
);
8040 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8041 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8042 size_t __cdecl
num_put_wchar__Getcat_old(const locale_facet
**facet
)
8044 return num_put_wchar__Getcat(facet
, locale_classic());
8047 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8048 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8049 size_t __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
8051 TRACE("(%p %p)\n", facet
, loc
);
8053 if(facet
&& !*facet
) {
8056 *facet
= MSVCRT_operator_new(sizeof(num_put
));
8058 ERR("Out of memory\n");
8059 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8063 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8064 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
8065 _Locinfo_dtor(&locinfo
);
8071 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8072 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8073 size_t __cdecl
num_put_short__Getcat_old(const locale_facet
**facet
)
8075 return num_put_short__Getcat(facet
, locale_classic());
8078 num_put
* num_put_wchar_use_facet(const locale
*loc
)
8080 static num_put
*obj
= NULL
;
8083 const locale_facet
*fac
;
8085 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8086 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
8088 _Lockit_dtor(&lock
);
8089 return (num_put
*)fac
;
8093 _Lockit_dtor(&lock
);
8097 num_put_wchar__Getcat(&fac
, loc
);
8098 obj
= (num_put
*)fac
;
8099 call_locale_facet__Incref(&obj
->facet
);
8100 locale_facet_register(&obj
->facet
);
8101 _Lockit_dtor(&lock
);
8106 num_put
* num_put_short_use_facet(const locale
*loc
)
8108 static num_put
*obj
= NULL
;
8111 const locale_facet
*fac
;
8113 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8114 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
8116 _Lockit_dtor(&lock
);
8117 return (num_put
*)fac
;
8121 _Lockit_dtor(&lock
);
8125 num_put_short__Getcat(&fac
, loc
);
8126 obj
= (num_put
*)fac
;
8127 call_locale_facet__Incref(&obj
->facet
);
8128 locale_facet_register(&obj
->facet
);
8129 _Lockit_dtor(&lock
);
8134 /* ?_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 */
8135 /* ?_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 */
8136 /* ?_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 */
8137 /* ?_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 */
8138 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8139 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, size_t count
)
8141 TRACE("(%p %p %s %Iu)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
8143 for(; count
>0; count
--)
8144 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
8150 #if _MSVCP_VER < 110
8151 /* ?_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 */
8152 /* ?_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 */
8153 /* ?_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 */
8154 /* ?_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 */
8155 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8156 ostreambuf_iterator_wchar dest
, const char *ptr
, size_t count
)
8161 TRACE("(%p %p %s %Iu)\n", this, ret
, debugstr_an(ptr
, count
), count
);
8163 memset(&state
, 0, sizeof(state
));
8164 for(; count
>0; count
--) {
8165 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
8166 ostreambuf_iterator_wchar_put(&dest
, ch
);
8174 /* ?_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 */
8175 /* ?_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 */
8176 /* ?_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 */
8177 /* ?_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 */
8178 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8179 ostreambuf_iterator_wchar dest
, const char *ptr
, size_t count
, wchar_t delim
)
8181 FIXME("(%p %p %p %Iu %d) stub\n", this, ret
, ptr
, count
, delim
);
8185 /* ?_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 */
8186 /* ?_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 */
8187 /* ?_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 */
8188 /* ?_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 */
8189 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8190 ostreambuf_iterator_wchar dest
, wchar_t c
, size_t count
)
8192 TRACE("(%p %p %d %Iu)\n", this, ret
, c
, count
);
8194 for(; count
>0; count
--)
8195 ostreambuf_iterator_wchar_put(&dest
, c
);
8201 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
8202 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8203 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
8204 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8205 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
8207 int type
= fmtfl
& FMTFLAG_floatfield
;
8210 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
8213 if(fmtfl
& FMTFLAG_showpos
)
8215 if(fmtfl
& FMTFLAG_showbase
)
8222 if(type
== FMTFLAG_fixed
)
8224 else if(type
== FMTFLAG_scientific
)
8225 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
8226 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
8227 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
8229 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
8235 /* ?_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 */
8236 /* ?_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 */
8237 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8238 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, size_t bef_point
,
8239 size_t aft_point
, size_t trailing
, size_t count
)
8241 FIXME("(%p %p %p %d %p %Iu %Iu %Iu %Iu) stub\n", this, ret
, base
,
8242 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8246 /* ?_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 */
8247 /* ?_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 */
8248 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8249 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, size_t bef_point
,
8250 size_t aft_point
, size_t trailing
, size_t count
)
8252 FIXME("(%p %p %p %d %p %Iu %Iu %Iu %Iu) stub\n", this, ret
, base
,
8253 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8257 #if _MSVCP_VER < 110
8258 static void num_put_wchar_wide_put(const num_put
*this,
8259 ostreambuf_iterator_wchar
*dest
, ios_base
*base
,
8260 const char *buf
, size_t count
)
8262 num_put_wchar__Putc(this, dest
, *dest
, buf
, count
);
8265 static void num_put_wchar_wide_put(const num_put
*this,
8266 ostreambuf_iterator_wchar
*dest
, ios_base
*base
,
8267 const char *buf
, size_t count
)
8272 ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
));
8273 for(i
=0; i
<count
; i
++)
8274 ostreambuf_iterator_wchar_put(dest
, ctype_wchar_widen_ch(ctype
, buf
[i
]));
8278 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
8279 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8280 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8281 size_t count
, numpunct_wchar
*numpunct
)
8283 basic_string_char grouping_bstr
;
8284 const char *grouping
;
8285 char *p
, dec_point
= *localeconv()->decimal_point
;
8287 int cur_group
= 0, group_size
= 0;
8288 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8291 TRACE("(%p %p %p %d %s %Iu)\n", this, ret
, base
, fill
, buf
, count
);
8293 for(p
=buf
; p
<buf
+count
; p
++) {
8299 /* Add separators to number */
8300 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8301 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8302 #if _MSVCP_VER >= 70
8303 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
8306 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8308 if(group_size
== grouping
[cur_group
]) {
8310 if(grouping
[cur_group
+1])
8313 memmove(p
+1, p
, buf
+count
-p
);
8314 *p
= '\0'; /* mark thousands separator positions */
8318 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8320 /* Display number with padding */
8321 if(count
>= base
->wide
)
8324 pad
= base
->wide
-count
;
8327 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8328 num_put_wchar_wide_put(this, &dest
, base
, buf
, 1);
8331 if(adjustfield
!= FMTFLAG_left
) {
8332 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8336 for(i
=0; i
<count
; i
++) {
8337 if(buf
[i
] == dec_point
)
8338 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
8340 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8342 num_put_wchar_wide_put(this, &dest
, base
, buf
+i
, 1);
8345 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8348 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
8349 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8350 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
8351 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8352 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
8354 int base
= fmtfl
& FMTFLAG_basefield
;
8357 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
8360 if(fmtfl
& FMTFLAG_showpos
)
8362 if(fmtfl
& FMTFLAG_showbase
)
8369 if(base
== FMTFLAG_oct
)
8371 else if(base
== FMTFLAG_hex
)
8372 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
8380 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8381 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8382 size_t count
, numpunct_wchar
*numpunct
)
8384 basic_string_char grouping_bstr
;
8385 const char *grouping
;
8388 int cur_group
= 0, group_size
= 0;
8389 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8392 TRACE("(%p %p %p %d %s %Iu)\n", this, ret
, base
, fill
, buf
, count
);
8394 /* Add separators to number */
8395 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8396 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8397 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8399 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8401 if(group_size
== grouping
[cur_group
]) {
8403 if(grouping
[cur_group
+1])
8406 memmove(p
+1, p
, buf
+count
-p
);
8407 *p
= '\0'; /* mark thousands separator positions */
8411 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8413 /* Display number with padding */
8414 if(count
>= base
->wide
)
8417 pad
= base
->wide
-count
;
8420 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8421 num_put_wchar_wide_put(this, &dest
, base
, buf
, 1);
8423 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
8424 num_put_wchar_wide_put(this, &dest
, base
, buf
, 2);
8427 if(adjustfield
!= FMTFLAG_left
) {
8428 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8432 for(i
=0; i
<count
; i
++) {
8434 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8436 num_put_wchar_wide_put(this, &dest
, base
, buf
+i
, 1);
8439 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8442 /* ?_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 */
8443 /* ?_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 */
8444 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8445 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, size_t count
)
8447 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8450 /* ?_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 */
8451 /* ?_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 */
8452 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8453 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, size_t count
)
8455 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(IOS_LOCALE(base
)));
8458 /* ?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 */
8459 /* ?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 */
8460 #if _MSVCP_VER <= 100
8461 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8462 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8463 (this, ret, dest, base, fill, v))
8465 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_wchar*, \
8466 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8467 (this, ret, dest, base, fill, v))
8469 #if _MSVCP_VER != 80
8470 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
8472 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 32)
8474 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8475 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8477 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8478 char fmt
[7]; /* strlen("%+#lld")+1 */
8480 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8482 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8483 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8486 /* ?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 */
8487 /* ?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 */
8488 #if _MSVCP_VER != 80
8489 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
8491 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 32)
8493 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8494 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8496 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8497 char fmt
[7]; /* strlen("%+#lld")+1 */
8499 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8501 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8502 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8505 /* ?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 */
8506 /* ?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 */
8507 /* ?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 */
8508 /* ?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 */
8509 #if _MSVCP_VER != 80
8510 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
8512 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 32)
8514 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8515 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8517 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8518 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
8521 /* ?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 */
8522 /* ?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 */
8523 #if _MSVCP_VER <= 100
8524 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8525 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8526 (this, ret, dest, base, fill, v))
8528 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8529 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8530 (this, ret, dest, base, fill, v))
8532 #if _MSVCP_VER != 80
8533 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
8535 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 32)
8537 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8538 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8540 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8541 char fmt
[7]; /* strlen("%+#lld")+1 */
8543 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8545 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8546 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8549 /* ?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 */
8550 /* ?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 */
8551 #if _MSVCP_VER != 80
8552 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
8554 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 32)
8556 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8557 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8559 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8560 char fmt
[7]; /* strlen("%+#lld")+1 */
8562 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8564 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8565 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8568 /* ?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 */
8569 /* ?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 */
8570 /* ?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 */
8571 /* ?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 */
8572 #if _MSVCP_VER != 80
8573 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
8575 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 32)
8577 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8578 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8580 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8581 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
8584 /* ?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 */
8585 /* ?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 */
8586 /* ?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 */
8587 /* ?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 */
8588 #if _MSVCP_VER <= 100
8589 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8590 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8591 (this, ret, dest, base, fill, v))
8592 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
8593 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8594 (this, ret, dest, base, fill, v))
8596 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8597 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8598 (this, ret, dest, base, fill, v))
8599 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8600 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8601 (this, ret, dest, base, fill, v))
8603 #if _MSVCP_VER != 80
8604 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
8606 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 36)
8608 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8609 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8612 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8616 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8618 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8619 prec
= get_precision(base
);
8620 size
= _scprintf(fmt
, prec
, v
);
8622 /* TODO: don't use dynamic allocation */
8623 tmp
= MSVCRT_operator_new(size
*2);
8625 ERR("Out of memory\n");
8626 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8628 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8629 numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8630 MSVCRT_operator_delete(tmp
);
8634 /* ?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 */
8635 /* ?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 */
8636 /* ?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 */
8637 /* ?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 */
8638 #if _MSVCP_VER != 80
8639 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
8641 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 36)
8643 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8644 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8647 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8651 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8653 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8654 prec
= get_precision(base
);
8655 size
= _scprintf(fmt
, prec
, v
);
8657 /* TODO: don't use dynamic allocation */
8658 tmp
= MSVCRT_operator_new(size
*2);
8660 ERR("Out of memory\n");
8661 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8663 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8664 numpunct_short_use_facet(IOS_LOCALE(base
)));
8665 MSVCRT_operator_delete(tmp
);
8669 /* ?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 */
8670 /* ?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 */
8671 /* ?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 */
8672 /* ?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 */
8673 #if _MSVCP_VER != 80
8674 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
8676 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 36)
8678 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8679 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8681 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8682 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
8685 /* ?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 */
8686 /* ?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 */
8687 /* ?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 */
8688 /* ?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 */
8689 #if _MSVCP_VER != 80
8690 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
8692 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 36)
8694 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8695 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8697 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8698 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
8701 /* ?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 */
8702 /* ?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 */
8703 #if _MSVCP_VER <= 100
8704 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
8705 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8706 (this, ret, dest, base, fill, v))
8708 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8709 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8710 (this, ret, dest, base, fill, v))
8712 #if _MSVCP_VER != 80
8713 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
8715 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 32)
8717 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8718 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8720 char tmp
[17]; /* 8(16^8==2^64)*2(separators between every digit) + 1 */
8722 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8724 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8727 /* ?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 */
8728 /* ?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 */
8729 #if _MSVCP_VER != 80
8730 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
8732 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 32)
8734 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8735 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8737 char tmp
[17]; /* 8(16^8==2^64)*2(separators between every digit) + 1 */
8739 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8741 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8744 /* ?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 */
8745 /* ?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 */
8746 /* ?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 */
8747 /* ?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 */
8748 #if _MSVCP_VER != 80
8749 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
8751 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 32)
8753 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8754 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8756 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8757 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
8760 /* ?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 */
8761 /* ?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 */
8762 #if _MSVCP_VER <= 100
8763 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8764 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8765 (this, ret, dest, base, fill, v))
8767 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8768 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8769 (this, ret, dest, base, fill, v))
8771 #if _MSVCP_VER != 80
8772 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
8774 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 36)
8776 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8777 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8779 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8780 char fmt
[7]; /* strlen("%+#lld")+1 */
8782 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8784 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8785 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8788 /* ?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 */
8789 /* ?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 */
8790 #if _MSVCP_VER != 80
8791 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
8793 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 36)
8795 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8796 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8798 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8799 char fmt
[7]; /* strlen("%+#lld")+1 */
8801 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8803 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8804 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8807 /* ?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 */
8808 /* ?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 */
8809 /* ?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 */
8810 /* ?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 */
8811 #if _MSVCP_VER != 80
8812 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
8814 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 36)
8816 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8817 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8819 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8820 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
8823 /* ?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 */
8824 /* ?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 */
8825 #if _MSVCP_VER <= 100
8826 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8827 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8828 (this, ret, dest, base, fill, v))
8830 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8831 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8832 (this, ret, dest, base, fill, v))
8834 #if _MSVCP_VER != 80
8835 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
8837 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 36)
8839 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8840 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8842 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8843 char fmt
[7]; /* strlen("%+#lld")+1 */
8845 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8847 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8848 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8851 /* ?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 */
8852 /* ?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 */
8853 #if _MSVCP_VER != 80
8854 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
8856 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 36)
8858 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8859 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8861 char tmp
[48]; /* 22(8^22>2^64)*2(separators between every digit) + 3(strlen("+0x"))+1 */
8862 char fmt
[7]; /* strlen("%+#lld")+1 */
8864 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8866 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8867 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8870 /* ?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 */
8871 /* ?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 */
8872 /* ?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 */
8873 /* ?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 */
8874 #if _MSVCP_VER != 80
8875 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
8877 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 36)
8879 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8880 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8882 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8883 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
8886 /* ?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 */
8887 /* ?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 */
8888 #if _MSVCP_VER <= 100
8889 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8890 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, bool), \
8891 (this, ret, dest, base, fill, v))
8893 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_wchar*, \
8894 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, bool), \
8895 (this, ret, dest, base, fill, v))
8897 #if _MSVCP_VER != 80
8898 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
8900 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 32)
8902 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8903 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, bool v
)
8905 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8907 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8908 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(IOS_LOCALE(base
));
8909 basic_string_wchar str
;
8913 numpunct_wchar_truename(numpunct
, &str
);
8915 numpunct_wchar_falsename(numpunct
, &str
);
8917 len
= MSVCP_basic_string_wchar_length(&str
);
8918 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8921 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8922 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8925 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8926 MSVCP_basic_string_wchar_dtor(&str
);
8927 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8930 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8933 /* ?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 */
8934 /* ?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 */
8935 #if _MSVCP_VER != 80
8936 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
8938 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 32)
8940 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8941 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, bool v
)
8943 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8945 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8946 numpunct_wchar
*numpunct
= numpunct_short_use_facet(IOS_LOCALE(base
));
8947 basic_string_wchar str
;
8951 numpunct_wchar_truename(numpunct
, &str
);
8953 numpunct_wchar_falsename(numpunct
, &str
);
8955 len
= MSVCP_basic_string_wchar_length(&str
);
8956 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8959 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8960 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8963 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8964 MSVCP_basic_string_wchar_dtor(&str
);
8965 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8968 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8971 /* ?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 */
8972 /* ?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 */
8973 /* ?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 */
8974 /* ?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 */
8975 #if _MSVCP_VER != 80
8976 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
8978 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 32)
8980 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8981 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, bool v
)
8983 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8984 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
8987 /* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
8988 locale_id time_put_char_id
= {0};
8990 /* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
8991 extern const vtable_ptr time_put_char_vtable
;
8993 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8994 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8995 DEFINE_THISCALL_WRAPPER(time_put_char__Init
, 8)
8996 void __thiscall
time_put_char__Init(time_put
*this, const _Locinfo
*locinfo
)
8998 TRACE("(%p %p)\n", this, locinfo
);
8999 _Locinfo__Gettnames(locinfo
, &this->time
);
9000 #if _MSVCP_VER <= 100
9001 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9005 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9006 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9007 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo
, 12)
9008 time_put
* __thiscall
time_put_char_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, size_t refs
)
9010 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
9011 locale_facet_ctor_refs(&this->facet
, refs
);
9012 this->facet
.vtable
= &time_put_char_vtable
;
9013 time_put_char__Init(this, locinfo
);
9017 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
9018 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
9019 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs
, 8)
9020 time_put
* __thiscall
time_put_char_ctor_refs(time_put
*this, size_t refs
)
9024 TRACE("(%p %Iu)\n", this, refs
);
9026 _Locinfo_ctor(&locinfo
);
9027 time_put_char_ctor_locinfo(this, &locinfo
, refs
);
9028 _Locinfo_dtor(&locinfo
);
9032 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9033 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9034 DEFINE_THISCALL_WRAPPER(time_put_char_ctor
, 4)
9035 time_put
* __thiscall
time_put_char_ctor(time_put
*this)
9037 return time_put_char_ctor_refs(this, 0);
9040 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9041 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9042 DEFINE_THISCALL_WRAPPER(time_put_char_dtor
, 4)
9043 void __thiscall
time_put_char_dtor(time_put
*this)
9045 TRACE("(%p)\n", this);
9046 _Timevec_dtor(&this->time
);
9049 DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor
, 8)
9050 time_put
* __thiscall
time_put_char_vector_dtor(time_put
*this, unsigned int flags
)
9052 TRACE("(%p %x)\n", this, flags
);
9054 /* we have an array, with the number of elements stored before the first object */
9055 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9057 for(i
=*ptr
-1; i
>=0; i
--)
9058 time_put_char_dtor(this+i
);
9059 MSVCRT_operator_delete(ptr
);
9061 time_put_char_dtor(this);
9063 MSVCRT_operator_delete(this);
9069 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9070 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9071 size_t __cdecl
time_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9073 TRACE("(%p %p)\n", facet
, loc
);
9075 if(facet
&& !*facet
) {
9078 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9080 ERR("Out of memory\n");
9081 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9085 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9086 time_put_char_ctor_locinfo((time_put
*)*facet
, &locinfo
, 0);
9087 _Locinfo_dtor(&locinfo
);
9093 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9094 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9095 size_t __cdecl
time_put_char__Getcat_old(const locale_facet
**facet
)
9097 return time_put_char__Getcat(facet
, locale_classic());
9100 static time_put
* time_put_char_use_facet(const locale
*loc
)
9102 static time_put
*obj
= NULL
;
9105 const locale_facet
*fac
;
9107 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9108 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_char_id
));
9110 _Lockit_dtor(&lock
);
9111 return (time_put
*)fac
;
9115 _Lockit_dtor(&lock
);
9119 time_put_char__Getcat(&fac
, loc
);
9120 obj
= (time_put
*)fac
;
9121 call_locale_facet__Incref(&obj
->facet
);
9122 locale_facet_register(&obj
->facet
);
9123 _Lockit_dtor(&lock
);
9128 #if _MSVCP_VER >= 70
9130 /* ?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 */
9131 /* ?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 */
9132 #if _MSVCP_VER != 80
9133 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 36)
9135 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 40)
9137 #if _MSVCP_VER <= 100
9138 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9139 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9140 (this, ret, dest, base, fill, t, spec, mod))
9142 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
9143 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9144 (this, ret, dest, base, fill, t, spec, mod))
9146 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9147 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9149 char buf
[64], fmt
[4], *p
= fmt
;
9152 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9160 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9161 for(i
=0; i
<len
; i
++)
9162 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9168 /* ?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 */
9169 /* ?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 */
9170 #if _MSVCP_VER != 80
9171 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 36)
9173 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 40)
9175 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9176 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9178 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9179 return call_time_put_char_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9182 /* ?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 */
9183 /* ?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 */
9184 #if _MSVCP_VER != 80
9185 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 36)
9187 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 40)
9189 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9190 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9192 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_an(pat
, pat_end
-pat
));
9194 while(pat
< pat_end
) {
9196 ostreambuf_iterator_char_put(&dest
, *pat
++);
9197 }else if(++pat
== pat_end
) {
9198 ostreambuf_iterator_char_put(&dest
, '%');
9199 }else if(*pat
=='#' && pat
+1==pat_end
) {
9200 ostreambuf_iterator_char_put(&dest
, '%');
9201 ostreambuf_iterator_char_put(&dest
, *pat
++);
9212 time_put_char_put(this, &dest
, dest
, base
, fill
, t
, *pat
++, mod
);
9220 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9222 /* ?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 */
9223 /* ?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 */
9224 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 32)
9225 #define call_time_put_char_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9226 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, const struct tm*, char, char), \
9227 (this, ret, dest, base, t, spec, mod))
9228 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9229 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9231 char buf
[64], fmt
[4], *p
= fmt
;
9234 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9242 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9243 for(i
=0; i
<len
; i
++)
9244 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9250 /* ?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 */
9251 /* ?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 */
9252 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 32)
9253 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9254 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9256 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9257 return call_time_put_char_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9260 /* ?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 */
9261 /* ?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 */
9262 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 32)
9263 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9264 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9266 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_an(pat
, pat_end
-pat
));
9268 while(pat
< pat_end
) {
9270 ostreambuf_iterator_char_put(&dest
, *pat
++);
9271 }else if(++pat
== pat_end
) {
9272 ostreambuf_iterator_char_put(&dest
, '%');
9273 }else if(*pat
=='#' && pat
+1==pat_end
) {
9274 ostreambuf_iterator_char_put(&dest
, '%');
9275 ostreambuf_iterator_char_put(&dest
, *pat
++);
9286 time_put_char_put(this, &dest
, dest
, base
, t
, *pat
++, mod
);
9294 #endif /* MSVCP_VER >= 70 */
9296 /* ?id@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
9297 locale_id time_put_wchar_id
= {0};
9298 /* ?id@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
9299 locale_id time_put_short_id
= {0};
9301 /* ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
9302 extern const vtable_ptr time_put_wchar_vtable
;
9303 /* ??_7?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
9304 extern const vtable_ptr time_put_short_vtable
;
9306 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9307 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9308 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9309 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9310 DEFINE_THISCALL_WRAPPER(time_put_wchar__Init
, 8)
9311 void __thiscall
time_put_wchar__Init(time_put
*this, const _Locinfo
*locinfo
)
9313 TRACE("(%p %p)\n", this, locinfo
);
9314 _Locinfo__Gettnames(locinfo
, &this->time
);
9315 #if _MSVCP_VER <= 100
9316 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9320 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9321 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9322 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo
, 12)
9323 time_put
* __thiscall
time_put_wchar_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, size_t refs
)
9325 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
9326 locale_facet_ctor_refs(&this->facet
, refs
);
9327 this->facet
.vtable
= &time_put_wchar_vtable
;
9328 time_put_wchar__Init(this, locinfo
);
9332 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9333 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9334 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo
, 12)
9335 time_put
* __thiscall
time_put_short_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, size_t refs
)
9337 time_put_wchar_ctor_locinfo(this, locinfo
, refs
);
9338 this->facet
.vtable
= &time_put_short_vtable
;
9342 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
9343 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
9344 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name
, 12)
9345 time_put
* __thiscall
time_put_wchar_ctor_name(time_put
*this, const char *name
, size_t refs
)
9349 TRACE("(%p %s %Iu)\n", this, debugstr_a(name
), refs
);
9351 _Locinfo_ctor_cstr(&locinfo
, name
);
9352 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9353 _Locinfo_dtor(&locinfo
);
9357 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */
9358 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */
9359 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name
, 12)
9360 time_put
* __thiscall
time_put_short_ctor_name(time_put
*this, const char *name
, size_t refs
)
9362 time_put_wchar_ctor_name(this, name
, refs
);
9363 this->facet
.vtable
= &time_put_short_vtable
;
9367 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
9368 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
9369 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs
, 8)
9370 time_put
* __thiscall
time_put_wchar_ctor_refs(time_put
*this, size_t refs
)
9374 TRACE("(%p %Iu)\n", this, refs
);
9376 _Locinfo_ctor(&locinfo
);
9377 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9378 _Locinfo_dtor(&locinfo
);
9382 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
9383 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
9384 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs
, 8)
9385 time_put
* __thiscall
time_put_short_ctor_refs(time_put
*this, size_t refs
)
9387 time_put_wchar_ctor_refs(this, refs
);
9388 this->facet
.vtable
= &time_put_short_vtable
;
9392 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
9393 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
9394 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor
, 4)
9395 time_put
* __thiscall
time_put_wchar_ctor(time_put
*this)
9397 return time_put_wchar_ctor_refs(this, 0);
9400 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
9401 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
9402 DEFINE_THISCALL_WRAPPER(time_put_short_ctor
, 4)
9403 time_put
* __thiscall
time_put_short_ctor(time_put
*this)
9405 time_put_wchar_ctor(this);
9406 this->facet
.vtable
= &time_put_short_vtable
;
9410 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
9411 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
9412 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
9413 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
9414 DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor
, 4)
9415 void __thiscall
time_put_wchar_dtor(time_put
*this)
9417 TRACE("(%p)\n", this);
9418 _Timevec_dtor(&this->time
);
9421 DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor
, 8)
9422 time_put
* __thiscall
time_put_wchar_vector_dtor(time_put
*this, unsigned int flags
)
9424 TRACE("(%p %x)\n", this, flags
);
9426 /* we have an array, with the number of elements stored before the first object */
9427 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9429 for(i
=*ptr
-1; i
>=0; i
--)
9430 time_put_wchar_dtor(this+i
);
9431 MSVCRT_operator_delete(ptr
);
9433 time_put_wchar_dtor(this);
9435 MSVCRT_operator_delete(this);
9441 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9442 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9443 size_t __cdecl
time_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
9445 TRACE("(%p %p)\n", facet
, loc
);
9447 if(facet
&& !*facet
) {
9448 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9450 ERR("Out of memory\n");
9451 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9454 time_put_wchar_ctor_name((time_put
*)*facet
,
9455 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9461 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9462 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9463 size_t __cdecl
time_put_wchar__Getcat_old(const locale_facet
**facet
)
9465 return time_put_wchar__Getcat(facet
, locale_classic());
9468 static time_put
* time_put_wchar_use_facet(const locale
*loc
)
9470 static time_put
*obj
= NULL
;
9473 const locale_facet
*fac
;
9475 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9476 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_wchar_id
));
9478 _Lockit_dtor(&lock
);
9479 return (time_put
*)fac
;
9483 _Lockit_dtor(&lock
);
9487 time_put_wchar__Getcat(&fac
, loc
);
9488 obj
= (time_put
*)fac
;
9489 call_locale_facet__Incref(&obj
->facet
);
9490 locale_facet_register(&obj
->facet
);
9491 _Lockit_dtor(&lock
);
9496 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9497 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9498 size_t __cdecl
time_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
9500 TRACE("(%p %p)\n", facet
, loc
);
9502 if(facet
&& !*facet
) {
9503 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9505 ERR("Out of memory\n");
9506 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9509 time_put_short_ctor_name((time_put
*)*facet
,
9510 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9516 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9517 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9518 size_t __cdecl
time_put_short__Getcat_old(const locale_facet
**facet
)
9520 return time_put_short__Getcat(facet
, locale_classic());
9523 static time_put
* time_put_short_use_facet(const locale
*loc
)
9525 static time_put
*obj
= NULL
;
9528 const locale_facet
*fac
;
9530 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9531 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_short_id
));
9533 _Lockit_dtor(&lock
);
9534 return (time_put
*)fac
;
9538 _Lockit_dtor(&lock
);
9542 time_put_short__Getcat(&fac
, loc
);
9543 obj
= (time_put
*)fac
;
9544 call_locale_facet__Incref(&obj
->facet
);
9545 locale_facet_register(&obj
->facet
);
9546 _Lockit_dtor(&lock
);
9551 #if _MSVCP_VER >= 70
9553 /* ?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 */
9554 /* ?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 */
9555 /* ?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 */
9556 /* ?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 */
9557 #if _MSVCP_VER != 80
9558 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 36)
9560 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 40)
9562 #if _MSVCP_VER <= 100
9563 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9564 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9565 (this, ret, dest, base, fill, t, spec, mod))
9567 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
9568 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9569 (this, ret, dest, base, fill, t, spec, mod))
9571 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9572 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9573 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9575 char buf
[64], fmt
[4], *p
= fmt
;
9580 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9588 #if _MSVCP_VER <= 100
9591 cvt
= &ctype_wchar_use_facet(base
->loc
)->cvt
;
9594 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9595 for(i
=0; i
<len
; i
++) {
9596 c
= mb_to_wc(buf
[i
], cvt
);
9597 ostreambuf_iterator_wchar_put(&dest
, c
);
9604 /* ?put@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBUtm@@DD@Z */
9605 /* ?put@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEBUtm@@DD@Z */
9606 /* ?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 */
9607 /* ?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 */
9608 #if _MSVCP_VER != 80
9609 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 36)
9611 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 40)
9613 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9614 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9615 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9617 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9618 return call_time_put_wchar_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9621 /* ?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 */
9622 /* ?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 */
9623 /* ?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 */
9624 /* ?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 */
9625 #if _MSVCP_VER != 80
9626 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 36)
9628 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 40)
9630 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9631 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9632 wchar_t fill
, const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9638 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_wn(pat
, pat_end
-pat
));
9640 #if _MSVCP_VER <= 100
9643 cvt
= &ctype_wchar_use_facet(base
->loc
)->cvt
;
9646 percent
= mb_to_wc('%', cvt
);
9647 while(pat
< pat_end
) {
9648 if(*pat
!= percent
) {
9649 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9650 }else if(++pat
== pat_end
) {
9651 ostreambuf_iterator_wchar_put(&dest
, percent
);
9652 }else if(_Wcrtomb(c
, *pat
, NULL
, cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9653 ostreambuf_iterator_wchar_put(&dest
, percent
);
9654 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9658 if(_Wcrtomb(c
, *pat
++, NULL
, cvt
) != 1) {
9659 ostreambuf_iterator_wchar_put(&dest
, percent
);
9660 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9661 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9663 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, '#');
9666 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, 0);
9675 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9677 /* ?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 */
9678 /* ?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 */
9679 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 32)
9680 #define call_time_put_wchar_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9681 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, const struct tm*, char, char), \
9682 (this, ret, dest, base, t, spec, mod))
9683 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9684 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9685 const struct tm
*t
, char spec
, char mod
)
9687 char buf
[64], fmt
[4], *p
= fmt
;
9691 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9699 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9700 for(i
=0; i
<len
; i
++) {
9701 c
= mb_to_wc(buf
[i
], &this->cvt
);
9702 ostreambuf_iterator_wchar_put(&dest
, c
);
9709 /* ?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 */
9710 /* ?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 */
9711 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 32)
9712 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9713 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9714 const struct tm
*t
, char spec
, char mod
)
9716 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9717 return call_time_put_wchar_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9720 /* ?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 */
9721 /* ?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 */
9722 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 32)
9723 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9724 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9725 const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9727 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9730 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_wn(pat
, pat_end
-pat
));
9732 while(pat
< pat_end
) {
9733 if(*pat
!= percent
) {
9734 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9735 }else if(++pat
== pat_end
) {
9736 ostreambuf_iterator_wchar_put(&dest
, percent
);
9737 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9738 ostreambuf_iterator_wchar_put(&dest
, percent
);
9739 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9743 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9744 ostreambuf_iterator_wchar_put(&dest
, percent
);
9745 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9746 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9748 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, '#');
9751 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, 0);
9760 #endif /* _MSVCP_VER >= 70 */
9762 /* ?id@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
9763 locale_id time_get_char_id
= {0};
9765 /* ??_7?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
9766 extern const vtable_ptr time_get_char_vtable
;
9768 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9769 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9770 DEFINE_THISCALL_WRAPPER(time_get_char__Init
, 8)
9771 void __thiscall
time_get_char__Init(time_get_char
*this, const _Locinfo
*locinfo
)
9777 TRACE("(%p %p)\n", this, locinfo
);
9779 days
= _Locinfo__Getdays(locinfo
);
9780 len
= strlen(days
)+1;
9781 this->days
= MSVCRT_operator_new(len
);
9784 ERR("Out of memory\n");
9785 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9787 memcpy((char*)this->days
, days
, len
);
9789 months
= _Locinfo__Getmonths(locinfo
);
9790 len
= strlen(months
)+1;
9791 this->months
= MSVCRT_operator_new(len
);
9794 MSVCRT_operator_delete((char*)this->days
);
9796 ERR("Out of memory\n");
9797 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9799 memcpy((char*)this->months
, months
, len
);
9801 this->dateorder
= _Locinfo__Getdateorder(locinfo
);
9802 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9805 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9806 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9807 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_locinfo
, 12)
9808 time_get_char
* __thiscall
time_get_char_ctor_locinfo(time_get_char
*this,
9809 const _Locinfo
*locinfo
, size_t refs
)
9811 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
9812 locale_facet_ctor_refs(&this->facet
, refs
);
9813 this->facet
.vtable
= &time_get_char_vtable
;
9814 time_get_char__Init(this, locinfo
);
9818 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAE@PBDI@Z */
9819 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAA@PEBD_K@Z */
9820 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_name
, 12)
9821 time_get_char
* __thiscall
time_get_char_ctor_name(time_get_char
*this, const char *name
, size_t refs
)
9825 TRACE("(%p %s %Iu)\n", this, name
, refs
);
9827 _Locinfo_ctor_cstr(&locinfo
, name
);
9828 time_get_char_ctor_locinfo(this, &locinfo
, refs
);
9829 _Locinfo_dtor(&locinfo
);
9833 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
9834 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
9835 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_refs
, 8)
9836 time_get_char
* __thiscall
time_get_char_ctor_refs(time_get_char
*this, size_t refs
)
9840 TRACE("(%p %Iu)\n", this, refs
);
9842 _Locinfo_ctor(&locinfo
);
9843 time_get_char_ctor_locinfo(this, &locinfo
, refs
);
9844 _Locinfo_dtor(&locinfo
);
9848 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9849 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9850 DEFINE_THISCALL_WRAPPER(time_get_char_ctor
, 4)
9851 time_get_char
* __thiscall
time_get_char_ctor(time_get_char
*this)
9853 return time_get_char_ctor_refs(this, 0);
9856 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AAEXXZ */
9857 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEAAXXZ */
9858 DEFINE_THISCALL_WRAPPER(time_get_char__Tidy
, 4)
9859 void __thiscall
time_get_char__Tidy(time_get_char
*this)
9861 TRACE("(%p)\n", this);
9863 MSVCRT_operator_delete((char*)this->days
);
9864 MSVCRT_operator_delete((char*)this->months
);
9867 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9868 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9869 DEFINE_THISCALL_WRAPPER(time_get_char_dtor
, 4) /* virtual */
9870 void __thiscall
time_get_char_dtor(time_get_char
*this)
9872 TRACE("(%p)\n", this);
9874 time_get_char__Tidy(this);
9877 DEFINE_THISCALL_WRAPPER(time_get_char_vector_dtor
, 8)
9878 time_get_char
* __thiscall
time_get_char_vector_dtor(time_get_char
*this, unsigned int flags
)
9880 TRACE("(%p %x)\n", this, flags
);
9882 /* we have an array, with the number of elements stored before the first object */
9883 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9885 for(i
=*ptr
-1; i
>=0; i
--)
9886 time_get_char_dtor(this+i
);
9887 MSVCRT_operator_delete(ptr
);
9889 time_get_char_dtor(this);
9891 MSVCRT_operator_delete(this);
9897 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9898 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9899 unsigned int __cdecl
time_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9901 TRACE("(%p %p)\n", facet
, loc
);
9903 if(facet
&& !*facet
) {
9906 *facet
= MSVCRT_operator_new(sizeof(time_get_char
));
9908 ERR("Out of memory\n");
9909 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9913 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9914 time_get_char_ctor_locinfo((time_get_char
*)*facet
, &locinfo
, 0);
9915 _Locinfo_dtor(&locinfo
);
9921 static time_get_char
* time_get_char_use_facet(const locale
*loc
)
9923 static time_get_char
*obj
= NULL
;
9926 const locale_facet
*fac
;
9928 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9929 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_get_char_id
));
9931 _Lockit_dtor(&lock
);
9932 return (time_get_char
*)fac
;
9936 _Lockit_dtor(&lock
);
9940 time_get_char__Getcat(&fac
, loc
);
9941 obj
= (time_get_char
*)fac
;
9942 call_locale_facet__Incref(&obj
->facet
);
9943 locale_facet_register(&obj
->facet
);
9944 _Lockit_dtor(&lock
);
9949 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAAH@Z */
9950 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAEAH@Z */
9951 int __cdecl
time_get_char__Getint(const time_get_char
*this,
9952 istreambuf_iterator_char
*b
, istreambuf_iterator_char
*e
,
9953 int min_val
, int max_val
, int *val
)
9955 BOOL got_digit
= FALSE
;
9956 int len
= 0, ret
= 0;
9959 TRACE("(%p %p %p %d %d %p)\n", this, b
, e
, min_val
, max_val
, val
);
9961 istreambuf_iterator_char_val(b
);
9962 if(b
->strbuf
&& (b
->val
== '-' || b
->val
== '+'))
9964 buf
[len
++] = b
->val
;
9965 istreambuf_iterator_char_inc(b
);
9968 if (b
->strbuf
&& b
->val
== '0')
9972 istreambuf_iterator_char_inc(b
);
9974 while (b
->strbuf
&& b
->val
== '0')
9975 istreambuf_iterator_char_inc(b
);
9977 for (; b
->strbuf
&& b
->val
>= '0' && b
->val
<= '9';
9978 istreambuf_iterator_char_inc(b
))
9980 if(len
< ARRAY_SIZE(buf
)-1)
9987 ret
|= IOSTATE_eofbit
;
9988 if (got_digit
&& len
< ARRAY_SIZE(buf
)-1)
9993 v
= _Stolx(buf
, NULL
, 10, &err
);
9994 if(err
|| v
< min_val
|| v
> max_val
)
9995 ret
|= IOSTATE_failbit
;
10000 ret
|= IOSTATE_failbit
;
10004 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AW4dateorder@time_base@2@XZ */
10005 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AW4dateorder@time_base@2@XZ */
10006 DEFINE_THISCALL_WRAPPER(time_get_char_do_date_order
, 4) /* virtual */
10007 #if _MSVCP_VER <= 100
10008 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 4, dateorder, (const time_get_char*), (this))
10010 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 12, dateorder, (const time_get_char*), (this))
10012 dateorder __thiscall
time_get_char_do_date_order(const time_get_char
*this)
10014 TRACE("(%p)\n", this);
10015 return this->dateorder
;
10018 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AW4dateorder@time_base@2@XZ */
10019 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AW4dateorder@time_base@2@XZ */
10020 DEFINE_THISCALL_WRAPPER(time_get_char_date_order
, 4)
10021 dateorder __thiscall
time_get_char_date_order(const time_get_char
*this)
10023 return call_time_get_char_do_date_order(this);
10026 static int find_longest_match_char(istreambuf_iterator_char
*iter
, const char *str
)
10028 int i
, len
= 0, last_match
= -1, match
= -1;
10029 const char *p
, *end
;
10032 for(istreambuf_iterator_char_val(iter
); iter
->strbuf
&& len
<ARRAY_SIZE(buf
);
10033 istreambuf_iterator_char_inc(iter
))
10035 BOOL got_prefix
= FALSE
;
10037 buf
[len
++] = iter
->val
;
10038 last_match
= match
;
10040 for(p
=str
+1, i
=0; *p
; p
= (*end
? end
+1 : end
), i
++)
10042 end
= strchr(p
, ':');
10044 end
= p
+ strlen(p
);
10046 if (end
-p
>= len
&& !memcmp(p
, buf
, len
))
10059 istreambuf_iterator_char_inc(iter
);
10065 if (len
== ARRAY_SIZE(buf
))
10066 FIXME("temporary buffer is too small\n");
10072 /* ?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 */
10073 /* ?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 */
10074 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_monthname
, 36) /* virtual */
10075 #if _MSVCP_VER <= 100
10076 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
10077 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10078 (this, ret, s, e, base, err, t))
10080 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
10081 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10082 (this, ret, s, e, base, err, t))
10084 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_monthname(const time_get_char
*this,
10085 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10086 ios_base
*base
, int *err
, struct tm
*t
)
10090 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
10092 if ((match
= find_longest_match_char(&s
, this->months
)) != -1)
10093 t
->tm_mon
= match
/ 2;
10095 *err
|= IOSTATE_failbit
;
10101 /* ?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 */
10102 /* ?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 */
10103 DEFINE_THISCALL_WRAPPER(time_get_char_get_monthname
, 36)
10104 istreambuf_iterator_char
* __thiscall
time_get_char_get_monthname(const time_get_char
*this,
10105 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10106 ios_base
*base
, int *err
, struct tm
*t
)
10108 return call_time_get_char_do_get_monthname(this, ret
, s
, e
, base
, err
, t
);
10111 /* ?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 */
10112 /* ?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 */
10113 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_time
, 36) /* virtual */
10114 #if _MSVCP_VER <= 100
10115 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
10116 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10117 (this, ret, s, e, base, err, t))
10119 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
10120 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10121 (this, ret, s, e, base, err, t))
10123 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_time(const time_get_char
*this,
10124 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10125 ios_base
*base
, int *err
, struct tm
*t
)
10127 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
10129 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 23, &t
->tm_hour
);
10130 if (*err
|| istreambuf_iterator_char_val(&s
)!=':')
10131 *err
|= IOSTATE_failbit
;
10135 istreambuf_iterator_char_inc(&s
);
10136 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 59, &t
->tm_min
);
10138 if (*err
|| istreambuf_iterator_char_val(&s
)!=':')
10139 *err
|= IOSTATE_failbit
;
10143 istreambuf_iterator_char_inc(&s
);
10144 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 59, &t
->tm_sec
);
10151 /* ?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 */
10152 /* ?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 */
10153 DEFINE_THISCALL_WRAPPER(time_get_char_get_time
, 36)
10154 istreambuf_iterator_char
* __thiscall
time_get_char_get_time(const time_get_char
*this,
10155 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10156 ios_base
*base
, int *err
, struct tm
*t
)
10158 return call_time_get_char_do_get_time(this, ret
, s
, e
, base
, err
, t
);
10161 /* ?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 */
10162 /* ?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 */
10163 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_weekday
, 36) /* virtual */
10164 #if _MSVCP_VER <= 100
10165 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
10166 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10167 (this, ret, s, e, base, err, t))
10169 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
10170 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10171 (this, ret, s, e, base, err, t))
10173 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_weekday(const time_get_char
*this,
10174 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10175 ios_base
*base
, int *err
, struct tm
*t
)
10179 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
10181 if ((match
= find_longest_match_char(&s
, this->days
)) != -1)
10182 t
->tm_wday
= match
/ 2;
10184 *err
|= IOSTATE_failbit
;
10190 /* ?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 */
10191 /* ?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 */
10192 DEFINE_THISCALL_WRAPPER(time_get_char_get_weekday
, 36)
10193 istreambuf_iterator_char
* __thiscall
time_get_char_get_weekday(const time_get_char
*this,
10194 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10195 ios_base
*base
, int *err
, struct tm
*t
)
10197 return call_time_get_char_do_get_weekday(this, ret
, s
, e
, base
, err
, t
);
10200 /* ?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 */
10201 /* ?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 */
10202 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_year
, 36) /* virtual */
10203 #if _MSVCP_VER <= 100
10204 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
10205 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10206 (this, ret, s, e, base, err, t))
10208 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
10209 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10210 (this, ret, s, e, base, err, t))
10212 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_year(const time_get_char
*this,
10213 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10214 ios_base
*base
, int *err
, struct tm
*t
)
10218 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
10220 /* The function supports only dates from [1900-2035] range */
10221 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 2035, &year
);
10222 if (!(*err
& IOSTATE_failbit
))
10227 *err
|= IOSTATE_failbit
;
10236 /* ?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 */
10237 /* ?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 */
10238 DEFINE_THISCALL_WRAPPER(time_get_char_get_year
, 36)
10239 istreambuf_iterator_char
* __thiscall
time_get_char_get_year(const time_get_char
*this,
10240 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10241 ios_base
*base
, int *err
, struct tm
*t
)
10243 return call_time_get_char_do_get_year(this, ret
, s
, e
, base
, err
, t
);
10246 static void skip_ws_char(ctype_char
*ctype
, istreambuf_iterator_char
*iter
)
10248 istreambuf_iterator_char_val(iter
);
10249 while(iter
->strbuf
&& ctype_char_is_ch(ctype
, _SPACE
, iter
->val
))
10250 istreambuf_iterator_char_inc(iter
);
10253 static void skip_date_delim_char(ctype_char
*ctype
, istreambuf_iterator_char
*iter
)
10255 skip_ws_char(ctype
, iter
);
10256 if(iter
->strbuf
&& (iter
->val
== '/' || iter
->val
== ':'))
10257 istreambuf_iterator_char_inc(iter
);
10258 skip_ws_char(ctype
, iter
);
10261 /* ?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 */
10262 /* ?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 */
10263 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_date
, 36) /* virtual */
10264 #if _MSVCP_VER <= 100
10265 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
10266 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10267 (this, ret, s, e, base, err, t))
10269 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
10270 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10271 (this, ret, s, e, base, err, t))
10273 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_date(const time_get_char
*this,
10274 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10275 ios_base
*base
, int *err
, struct tm
*t
)
10280 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
10282 ctype
= ctype_char_use_facet(IOS_LOCALE(base
));
10284 order
= time_get_char_date_order(this);
10285 if(order
== DATEORDER_no_order
)
10286 order
= DATEORDER_mdy
;
10289 case DATEORDER_dmy
:
10290 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
10291 skip_date_delim_char(ctype
, &s
);
10293 *err
|= IOSTATE_failbit
;
10296 if(s
.strbuf
&& ctype_char_is_ch(ctype
, _DIGIT
, s
.val
)) {
10297 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
10300 time_get_char_get_monthname(this, &s
, s
, e
, base
, err
, t
);
10302 skip_date_delim_char(ctype
, &s
);
10304 *err
|= IOSTATE_failbit
;
10307 time_get_char_get_year(this, &s
, s
, e
, base
, err
, t
);
10309 case DATEORDER_mdy
:
10310 istreambuf_iterator_char_val(&s
);
10311 if(s
.strbuf
&& ctype_char_is_ch(ctype
, _DIGIT
, s
.val
)) {
10312 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
10315 time_get_char_get_monthname(this, &s
, s
, e
, base
, err
, t
);
10317 skip_date_delim_char(ctype
, &s
);
10319 *err
|= IOSTATE_failbit
;
10322 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
10323 skip_date_delim_char(ctype
, &s
);
10325 *err
|= IOSTATE_failbit
;
10328 time_get_char_get_year(this, &s
, s
, e
, base
, err
, t
);
10330 case DATEORDER_ymd
:
10331 time_get_char_get_year(this, &s
, s
, e
, base
, err
, t
);
10332 skip_date_delim_char(ctype
, &s
);
10334 *err
|= IOSTATE_failbit
;
10337 if(ctype_char_is_ch(ctype
, _DIGIT
, s
.val
)) {
10338 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
10341 time_get_char_get_monthname(this, &s
, s
, e
, base
, err
, t
);
10343 skip_date_delim_char(ctype
, &s
);
10345 *err
|= IOSTATE_failbit
;
10348 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
10350 case DATEORDER_ydm
:
10351 time_get_char_get_year(this, &s
, s
, e
, base
, err
, t
);
10352 skip_date_delim_char(ctype
, &s
);
10354 *err
|= IOSTATE_failbit
;
10357 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
10358 skip_date_delim_char(ctype
, &s
);
10360 *err
|= IOSTATE_failbit
;
10363 if(ctype_char_is_ch(ctype
, _DIGIT
, s
.val
)) {
10364 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
10367 time_get_char_get_monthname(this, &s
, s
, e
, base
, err
, t
);
10371 ERR("incorrect order value: %d\n", order
);
10376 *err
|= IOSTATE_eofbit
;
10381 /* ?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 */
10382 /* ?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 */
10383 DEFINE_THISCALL_WRAPPER(time_get_char_get_date
, 36)
10384 istreambuf_iterator_char
* __thiscall
time_get_char_get_date(const time_get_char
*this,
10385 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10386 ios_base
*base
, int *err
, struct tm
*t
)
10388 return call_time_get_char_do_get_date(this, ret
, s
, e
, base
, err
, t
);
10391 istreambuf_iterator_char
* __thiscall
time_get_char_get(const time_get_char
*,
10392 istreambuf_iterator_char
*, istreambuf_iterator_char
, istreambuf_iterator_char
,
10393 ios_base
*, int*, struct tm
*, char, char);
10395 /* ?_Getfmt@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHPAUtm@@PBD@Z */
10396 /* ?_Getfmt@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHPEAUtm@@PEBD@Z */
10397 DEFINE_THISCALL_WRAPPER(time_get_char__Getfmt
, 40)
10398 istreambuf_iterator_char
* __thiscall
time_get_char__Getfmt(const time_get_char
*this,
10399 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10400 ios_base
*base
, int *err
, struct tm
*t
, const char *fmt
)
10404 TRACE("(%p %p %p %p %p %s)\n", this, ret
, base
, err
, t
, fmt
);
10406 ctype
= ctype_char_use_facet(IOS_LOCALE(base
));
10407 istreambuf_iterator_char_val(&s
);
10410 if(ctype_char_is_ch(ctype
, _SPACE
, *fmt
)) {
10411 skip_ws_char(ctype
, &s
);
10417 *err
|= IOSTATE_failbit
;
10423 time_get_char_get(this, &s
, s
, e
, base
, err
, t
, *fmt
, 0);
10426 *err
|= IOSTATE_failbit
;
10428 istreambuf_iterator_char_inc(&s
);
10431 if(*err
& IOSTATE_failbit
)
10437 *err
|= IOSTATE_eofbit
;
10442 /* ?do_get@?$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@@DD@Z */
10443 /* ?do_get@?$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@@DD@Z */
10444 DEFINE_THISCALL_WRAPPER(time_get_char_do_get
, 44) /* virtual */
10445 #if _MSVCP_VER <= 100
10446 #define call_time_get_char_do_get(this, ret, s, e, base, err, t, fmt, mod) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
10447 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*, char, char), \
10448 (this, ret, s, e, base, err, t, fmt, mod))
10450 #define call_time_get_char_do_get(this, ret, s, e, base, err, t, fmt, mod) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
10451 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*, char, char), \
10452 (this, ret, s, e, base, err, t, fmt, mod))
10454 istreambuf_iterator_char
* __thiscall
time_get_char_do_get(const time_get_char
*this,
10455 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10456 ios_base
*base
, int *err
, struct tm
*t
, char fmt
, char mod
)
10460 TRACE("(%p %p %p %p %p %c %c)\n", this, ret
, base
, err
, t
, fmt
, mod
);
10462 ctype
= ctype_char_use_facet(IOS_LOCALE(base
));
10467 time_get_char_get_weekday(this, &s
, s
, e
, base
, err
, t
);
10472 time_get_char_get_monthname(this, &s
, s
, e
, base
, err
, t
);
10475 time_get_char__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%b %d %H:%M:%S %Y");
10478 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 99, &t
->tm_year
);
10479 if(!(*err
& IOSTATE_failbit
))
10480 t
->tm_year
= t
->tm_year
* 100 - 1900;
10484 if(fmt
== 'e') skip_ws_char(ctype
, &s
);
10485 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
10488 time_get_char__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%m/%d/%y");
10491 time_get_char__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%Y-%m-%d");
10494 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 23, &t
->tm_hour
);
10497 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 11, &t
->tm_hour
);
10500 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 366, &t
->tm_yday
);
10503 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
10504 if(!(*err
& IOSTATE_failbit
))
10508 *err
= time_get_char__Getint(this, &s
, &e
, 0, 59, &t
->tm_min
);
10512 skip_ws_char(ctype
, &s
);
10517 istreambuf_iterator_char_val(&s
);
10518 if(s
.strbuf
&& (s
.val
=='P' || s
.val
=='p'))
10520 else if (!s
.strbuf
|| (s
.val
!='A' && s
.val
!='a')) {
10521 *err
|= IOSTATE_failbit
;
10524 istreambuf_iterator_char_inc(&s
);
10525 if(!s
.strbuf
|| (s
.val
!='M' && s
.val
!='m')) {
10526 *err
|= IOSTATE_failbit
;
10529 istreambuf_iterator_char_inc(&s
);
10536 time_get_char__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%I:%M:%S %p");
10539 time_get_char__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%H:%M");
10542 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 59, &t
->tm_sec
);
10546 time_get_char__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%H:%M:%S");
10549 *err
|= time_get_char__Getint(this, &s
, &e
, 1, 7, &t
->tm_wday
);
10550 if(!(*err
& IOSTATE_failbit
) && t
->tm_wday
==7)
10554 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 6, &t
->tm_wday
);
10557 time_get_char_get_date(this, &s
, s
, e
, base
, err
, t
);
10560 *err
|= time_get_char__Getint(this, &s
, &e
, 0, 99, &t
->tm_year
);
10561 if(!(*err
& IOSTATE_failbit
) && t
->tm_year
<69)
10565 time_get_char_get_year(this, &s
, s
, e
, base
, err
, t
);
10568 FIXME("unrecognized format: %c\n", fmt
);
10569 *err
|= IOSTATE_failbit
;
10573 *err
|= IOSTATE_eofbit
;
10578 /* ?get@?$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@@DD@Z */
10579 /* ?get@?$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@@DD@Z */
10580 DEFINE_THISCALL_WRAPPER(time_get_char_get
, 44)
10581 istreambuf_iterator_char
* __thiscall
time_get_char_get(const time_get_char
*this,
10582 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10583 ios_base
*base
, int *err
, struct tm
*t
, char fmt
, char mod
)
10585 return call_time_get_char_do_get(this, ret
, s
, e
, base
, err
, t
, fmt
, mod
);
10588 /* ?get@?$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@@PBD4@Z */
10589 /* ?get@?$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@@PEBD4@Z */
10590 DEFINE_THISCALL_WRAPPER(time_get_char_get_fmt
, 44)
10591 istreambuf_iterator_char
* __thiscall
time_get_char_get_fmt(const time_get_char
*this,
10592 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10593 ios_base
*base
, int *err
, struct tm
*t
, const char *fmtstart
, const char *fmtend
)
10597 TRACE("(%p %p %p %p %p %s)\n", this, ret
, base
, err
, t
, wine_dbgstr_an(fmtstart
, fmtend
-fmtstart
));
10599 ctype
= ctype_char_use_facet(IOS_LOCALE(base
));
10600 istreambuf_iterator_char_val(&s
);
10602 while(fmtstart
< fmtend
) {
10603 if(ctype_char_is_ch(ctype
, _SPACE
, *fmtstart
)) {
10604 skip_ws_char(ctype
, &s
);
10610 *err
|= IOSTATE_failbit
;
10614 if(*fmtstart
!= '%' || fmtstart
+1 >= fmtend
|| fmtstart
[1] == '%') {
10615 if(s
.val
!= *fmtstart
)
10616 *err
|= IOSTATE_failbit
;
10618 istreambuf_iterator_char_inc(&s
);
10619 if(*fmtstart
== '%')
10623 time_get_char_get(this, &s
, s
, e
, base
, err
, t
, *fmtstart
, 0);
10626 if(*err
& IOSTATE_failbit
)
10632 *err
|= IOSTATE_eofbit
;
10637 /* ?id@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
10638 locale_id time_get_wchar_id
= {0};
10640 /* ??_7?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
10641 extern const vtable_ptr time_get_wchar_vtable
;
10643 #if _MSVCP_VER >=110
10644 static wchar_t* create_time_get_str(const wchar_t *str
)
10649 len
= lstrlenW(str
)+1;
10650 ret
= MSVCRT_operator_new(len
* sizeof(wchar_t));
10652 memcpy(ret
, str
, len
*sizeof(wchar_t));
10656 static wchar_t* create_time_get_str(const char *str
, const _Locinfo
*locinfo
)
10662 _Locinfo__Getcvt(locinfo
, &cvt
);
10663 len
= MultiByteToWideChar(cvt
.page
, 0, str
, -1, NULL
, 0);
10664 ret
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
10666 MultiByteToWideChar(cvt
.page
, 0, str
, -1, ret
, len
);
10671 /* ?_Init@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
10672 /* ?_Init@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
10673 DEFINE_THISCALL_WRAPPER(time_get_wchar__Init
, 8)
10674 void __thiscall
time_get_wchar__Init(time_get_wchar
*this, const _Locinfo
*locinfo
)
10676 TRACE("(%p %p)\n", this, locinfo
);
10678 #if _MSVCP_VER >=110
10679 this->days
= create_time_get_str(_Locinfo__W_Getdays(locinfo
));
10681 this->days
= create_time_get_str(_Locinfo__Getdays(locinfo
), locinfo
);
10685 ERR("Out of memory\n");
10686 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10689 #if _MSVCP_VER >=110
10690 this->months
= create_time_get_str(_Locinfo__W_Getmonths(locinfo
));
10692 this->months
= create_time_get_str(_Locinfo__Getmonths(locinfo
), locinfo
);
10696 MSVCRT_operator_delete((wchar_t*)this->days
);
10698 ERR("Out of memory\n");
10699 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10702 this->dateorder
= _Locinfo__Getdateorder(locinfo
);
10703 _Locinfo__Getcvt(locinfo
, &this->cvt
);
10706 /* ??0?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
10707 /* ??0?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
10708 DEFINE_THISCALL_WRAPPER(time_get_wchar_ctor_locinfo
, 12)
10709 time_get_wchar
* __thiscall
time_get_wchar_ctor_locinfo(time_get_wchar
*this,
10710 const _Locinfo
*locinfo
, size_t refs
)
10712 TRACE("(%p %p %Iu)\n", this, locinfo
, refs
);
10713 locale_facet_ctor_refs(&this->facet
, refs
);
10714 this->facet
.vtable
= &time_get_wchar_vtable
;
10715 time_get_wchar__Init(this, locinfo
);
10719 /* ??0?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
10720 /* ??0?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
10721 DEFINE_THISCALL_WRAPPER(time_get_wchar_ctor_name
, 12)
10722 time_get_wchar
* __thiscall
time_get_wchar_ctor_name(time_get_wchar
*this, const char *name
, size_t refs
)
10726 TRACE("(%p %s %Iu)\n", this, name
, refs
);
10728 _Locinfo_ctor_cstr(&locinfo
, name
);
10729 time_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
10730 _Locinfo_dtor(&locinfo
);
10734 /* ??0?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
10735 /* ??0?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
10736 DEFINE_THISCALL_WRAPPER(time_get_wchar_ctor_refs
, 8)
10737 time_get_wchar
* __thiscall
time_get_wchar_ctor_refs(time_get_wchar
*this, size_t refs
)
10741 TRACE("(%p %Iu)\n", this, refs
);
10743 _Locinfo_ctor(&locinfo
);
10744 time_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
10745 _Locinfo_dtor(&locinfo
);
10749 /* ??_F?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
10750 /* ??_F?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
10751 DEFINE_THISCALL_WRAPPER(time_get_wchar_ctor
, 4)
10752 time_get_wchar
* __thiscall
time_get_wchar_ctor(time_get_wchar
*this)
10754 return time_get_wchar_ctor_refs(this, 0);
10757 /* ?_Tidy@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AAEXXZ */
10758 /* ?_Tidy@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEAAXXZ */
10759 DEFINE_THISCALL_WRAPPER(time_get_wchar__Tidy
, 4)
10760 void __thiscall
time_get_wchar__Tidy(time_get_wchar
*this)
10762 TRACE("(%p)\n", this);
10764 MSVCRT_operator_delete((wchar_t*)this->days
);
10765 MSVCRT_operator_delete((wchar_t*)this->months
);
10768 /* ??1?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
10769 /* ??1?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
10770 DEFINE_THISCALL_WRAPPER(time_get_wchar_dtor
, 4) /* virtual */
10771 void __thiscall
time_get_wchar_dtor(time_get_wchar
*this)
10773 TRACE("(%p)\n", this);
10775 time_get_wchar__Tidy(this);
10778 DEFINE_THISCALL_WRAPPER(time_get_wchar_vector_dtor
, 8)
10779 time_get_wchar
* __thiscall
time_get_wchar_vector_dtor(time_get_wchar
*this, unsigned int flags
)
10781 TRACE("(%p %x)\n", this, flags
);
10783 /* we have an array, with the number of elements stored before the first object */
10784 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10786 for(i
=*ptr
-1; i
>=0; i
--)
10787 time_get_wchar_dtor(this+i
);
10788 MSVCRT_operator_delete(ptr
);
10790 time_get_wchar_dtor(this);
10792 MSVCRT_operator_delete(this);
10798 /* ?_Getcat@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
10799 /* ?_Getcat@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
10800 unsigned int __cdecl
time_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
10802 TRACE("(%p %p)\n", facet
, loc
);
10804 if(facet
&& !*facet
) {
10807 *facet
= MSVCRT_operator_new(sizeof(time_get_wchar
));
10809 ERR("Out of memory\n");
10810 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10814 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
10815 time_get_wchar_ctor_locinfo((time_get_wchar
*)*facet
, &locinfo
, 0);
10816 _Locinfo_dtor(&locinfo
);
10822 static time_get_wchar
* time_get_wchar_use_facet(const locale
*loc
)
10824 static time_get_wchar
*obj
= NULL
;
10827 const locale_facet
*fac
;
10829 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10830 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_get_wchar_id
));
10832 _Lockit_dtor(&lock
);
10833 return (time_get_wchar
*)fac
;
10837 _Lockit_dtor(&lock
);
10841 time_get_wchar__Getcat(&fac
, loc
);
10842 obj
= (time_get_wchar
*)fac
;
10843 call_locale_facet__Incref(&obj
->facet
);
10844 locale_facet_register(&obj
->facet
);
10845 _Lockit_dtor(&lock
);
10850 /* ?_Getint@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@0HHAAH@Z */
10851 /* ?_Getint@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@0HHAEAH@Z */
10852 int __cdecl
time_get_wchar__Getint(const time_get_wchar
*this,
10853 istreambuf_iterator_wchar
*b
, istreambuf_iterator_wchar
*e
,
10854 int min_val
, int max_val
, int *val
)
10856 BOOL got_digit
= FALSE
;
10857 int len
= 0, ret
= 0;
10860 TRACE("(%p %p %p %d %d %p)\n", this, b
, e
, min_val
, max_val
, val
);
10862 istreambuf_iterator_wchar_val(b
);
10863 if(b
->strbuf
&& (b
->val
== '-' || b
->val
== '+'))
10865 buf
[len
++] = b
->val
;
10866 istreambuf_iterator_wchar_inc(b
);
10869 if (b
->strbuf
&& b
->val
== '0')
10873 istreambuf_iterator_wchar_inc(b
);
10875 while (b
->strbuf
&& b
->val
== '0')
10876 istreambuf_iterator_wchar_inc(b
);
10878 for (; b
->strbuf
&& b
->val
>= '0' && b
->val
<= '9';
10879 istreambuf_iterator_wchar_inc(b
))
10881 if(len
< ARRAY_SIZE(buf
)-1)
10888 ret
|= IOSTATE_eofbit
;
10889 if (got_digit
&& len
< ARRAY_SIZE(buf
)-1)
10894 v
= _Stolx(buf
, NULL
, 10, &err
);
10895 if(err
|| v
< min_val
|| v
> max_val
)
10896 ret
|= IOSTATE_failbit
;
10901 ret
|= IOSTATE_failbit
;
10905 /* ?do_date_order@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AW4dateorder@time_base@2@XZ */
10906 /* ?do_date_order@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AW4dateorder@time_base@2@XZ */
10907 DEFINE_THISCALL_WRAPPER(time_get_wchar_do_date_order
, 4) /* virtual */
10908 #if _MSVCP_VER <= 100
10909 #define call_time_get_wchar_do_date_order(this) CALL_VTBL_FUNC(this, 4, dateorder, (const time_get_wchar*), (this))
10911 #define call_time_get_wchar_do_date_order(this) CALL_VTBL_FUNC(this, 12, dateorder, (const time_get_wchar*), (this))
10913 dateorder __thiscall
time_get_wchar_do_date_order(const time_get_wchar
*this)
10915 TRACE("(%p)\n", this);
10916 return this->dateorder
;
10919 /* ?date_order@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AW4dateorder@time_base@2@XZ */
10920 /* ?date_order@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AW4dateorder@time_base@2@XZ */
10921 DEFINE_THISCALL_WRAPPER(time_get_wchar_date_order
, 4)
10922 dateorder __thiscall
time_get_wchar_date_order(const time_get_wchar
*this)
10924 return call_time_get_wchar_do_date_order(this);
10927 static int find_longest_match_wchar(istreambuf_iterator_wchar
*iter
, const wchar_t *str
)
10929 int i
, len
= 0, last_match
= -1, match
= -1;
10930 const wchar_t *p
, *end
;
10933 for(istreambuf_iterator_wchar_val(iter
); iter
->strbuf
&& len
<ARRAY_SIZE(buf
);
10934 istreambuf_iterator_wchar_inc(iter
))
10936 BOOL got_prefix
= FALSE
;
10938 buf
[len
++] = iter
->val
;
10939 last_match
= match
;
10941 for(p
=str
+1, i
=0; *p
; p
= (*end
? end
+1 : end
), i
++)
10943 end
= wcschr(p
, ':');
10945 end
= p
+ lstrlenW(p
);
10947 if (end
-p
>= len
&& !memcmp(p
, buf
, len
*sizeof(wchar_t)))
10960 istreambuf_iterator_wchar_inc(iter
);
10966 if (len
== ARRAY_SIZE(buf
))
10967 FIXME("temporary buffer is too small\n");
10973 /* ?do_get_monthname@?$time_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@AAHPAUtm@@@Z */
10974 /* ?do_get_monthname@?$time_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@AEAHPEAUtm@@@Z */
10975 DEFINE_THISCALL_WRAPPER(time_get_wchar_do_get_monthname
, 36) /* virtual */
10976 #if _MSVCP_VER <= 100
10977 #define call_time_get_wchar_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
10978 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
10979 (this, ret, s, e, base, err, t))
10981 #define call_time_get_wchar_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
10982 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
10983 (this, ret, s, e, base, err, t))
10985 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_do_get_monthname(const time_get_wchar
*this,
10986 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
10987 ios_base
*base
, int *err
, struct tm
*t
)
10991 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
10993 if ((match
= find_longest_match_wchar(&s
, this->months
)) != -1)
10994 t
->tm_mon
= match
/ 2;
10996 *err
|= IOSTATE_failbit
;
11002 /* ?get_monthname@?$time_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@AAHPAUtm@@@Z */
11003 /* ?get_monthname@?$time_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@AEAHPEAUtm@@@Z */
11004 DEFINE_THISCALL_WRAPPER(time_get_wchar_get_monthname
, 36)
11005 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get_monthname(const time_get_wchar
*this,
11006 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11007 ios_base
*base
, int *err
, struct tm
*t
)
11009 return call_time_get_wchar_do_get_monthname(this, ret
, s
, e
, base
, err
, t
);
11012 /* ?do_get_time@?$time_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@AAHPAUtm@@@Z */
11013 /* ?do_get_time@?$time_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@AEAHPEAUtm@@@Z */
11014 DEFINE_THISCALL_WRAPPER(time_get_wchar_do_get_time
, 36) /* virtual */
11015 #if _MSVCP_VER <= 100
11016 #define call_time_get_wchar_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
11017 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11018 (this, ret, s, e, base, err, t))
11020 #define call_time_get_wchar_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
11021 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11022 (this, ret, s, e, base, err, t))
11024 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_do_get_time(const time_get_wchar
*this,
11025 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11026 ios_base
*base
, int *err
, struct tm
*t
)
11028 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
11030 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 23, &t
->tm_hour
);
11031 if (*err
|| istreambuf_iterator_wchar_val(&s
)!=':')
11032 *err
|= IOSTATE_failbit
;
11036 istreambuf_iterator_wchar_inc(&s
);
11037 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 59, &t
->tm_min
);
11039 if (*err
|| istreambuf_iterator_wchar_val(&s
)!=':')
11040 *err
|= IOSTATE_failbit
;
11044 istreambuf_iterator_wchar_inc(&s
);
11045 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 59, &t
->tm_sec
);
11052 /* ?get_time@?$time_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@AAHPAUtm@@@Z */
11053 /* ?get_time@?$time_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@AEAHPEAUtm@@@Z */
11054 DEFINE_THISCALL_WRAPPER(time_get_wchar_get_time
, 36)
11055 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get_time(const time_get_wchar
*this,
11056 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11057 ios_base
*base
, int *err
, struct tm
*t
)
11059 return call_time_get_wchar_do_get_time(this, ret
, s
, e
, base
, err
, t
);
11062 /* ?do_get_weekday@?$time_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@AAHPAUtm@@@Z */
11063 /* ?do_get_weekday@?$time_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@AEAHPEAUtm@@@Z */
11064 DEFINE_THISCALL_WRAPPER(time_get_wchar_do_get_weekday
, 36) /* virtual */
11065 #if _MSVCP_VER <= 100
11066 #define call_time_get_wchar_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
11067 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11068 (this, ret, s, e, base, err, t))
11070 #define call_time_get_wchar_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
11071 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11072 (this, ret, s, e, base, err, t))
11074 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_do_get_weekday(const time_get_wchar
*this,
11075 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11076 ios_base
*base
, int *err
, struct tm
*t
)
11080 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
11082 if ((match
= find_longest_match_wchar(&s
, this->days
)) != -1)
11083 t
->tm_wday
= match
/ 2;
11085 *err
|= IOSTATE_failbit
;
11091 /* ?get_weekday@?$time_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@AAHPAUtm@@@Z */
11092 /* ?get_weekday@?$time_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@AEAHPEAUtm@@@Z */
11093 DEFINE_THISCALL_WRAPPER(time_get_wchar_get_weekday
, 36)
11094 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get_weekday(const time_get_wchar
*this,
11095 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11096 ios_base
*base
, int *err
, struct tm
*t
)
11098 return call_time_get_wchar_do_get_weekday(this, ret
, s
, e
, base
, err
, t
);
11101 /* ?do_get_year@?$time_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@AAHPAUtm@@@Z */
11102 /* ?do_get_year@?$time_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@AEAHPEAUtm@@@Z */
11103 DEFINE_THISCALL_WRAPPER(time_get_wchar_do_get_year
, 36) /* virtual */
11104 #if _MSVCP_VER <= 100
11105 #define call_time_get_wchar_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
11106 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11107 (this, ret, s, e, base, err, t))
11109 #define call_time_get_wchar_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
11110 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11111 (this, ret, s, e, base, err, t))
11113 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_do_get_year(const time_get_wchar
*this,
11114 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11115 ios_base
*base
, int *err
, struct tm
*t
)
11119 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
11121 /* The function supports only dates from [1900-2035] range */
11122 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 2035, &year
);
11123 if (!(*err
& IOSTATE_failbit
))
11128 *err
|= IOSTATE_failbit
;
11137 /* ?get_year@?$time_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@AAHPAUtm@@@Z */
11138 /* ?get_year@?$time_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@AEAHPEAUtm@@@Z */
11139 DEFINE_THISCALL_WRAPPER(time_get_wchar_get_year
, 36)
11140 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get_year(const time_get_wchar
*this,
11141 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11142 ios_base
*base
, int *err
, struct tm
*t
)
11144 return call_time_get_wchar_do_get_year(this, ret
, s
, e
, base
, err
, t
);
11147 static void skip_ws_wchar(ctype_wchar
*ctype
, istreambuf_iterator_wchar
*iter
)
11149 istreambuf_iterator_wchar_val(iter
);
11150 while(iter
->strbuf
&& ctype_wchar_is_ch(ctype
, _SPACE
, iter
->val
))
11151 istreambuf_iterator_wchar_inc(iter
);
11154 static void skip_date_delim_wchar(ctype_wchar
*ctype
, istreambuf_iterator_wchar
*iter
)
11156 skip_ws_wchar(ctype
, iter
);
11157 if(iter
->strbuf
&& (iter
->val
== '/' || iter
->val
== ':'))
11158 istreambuf_iterator_wchar_inc(iter
);
11159 skip_ws_wchar(ctype
, iter
);
11162 /* ?do_get_date@?$time_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@AAHPAUtm@@@Z */
11163 /* ?do_get_date@?$time_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@AEAHPEAUtm@@@Z */
11164 DEFINE_THISCALL_WRAPPER(time_get_wchar_do_get_date
, 36) /* virtual */
11165 #if _MSVCP_VER <= 100
11166 #define call_time_get_wchar_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
11167 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11168 (this, ret, s, e, base, err, t))
11170 #define call_time_get_wchar_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
11171 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*), \
11172 (this, ret, s, e, base, err, t))
11174 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_do_get_date(const time_get_wchar
*this,
11175 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11176 ios_base
*base
, int *err
, struct tm
*t
)
11178 ctype_wchar
*ctype
;
11181 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, err
, t
);
11183 ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
));
11185 order
= time_get_wchar_date_order(this);
11186 if(order
== DATEORDER_no_order
)
11187 order
= DATEORDER_mdy
;
11190 case DATEORDER_dmy
:
11191 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
11192 skip_date_delim_wchar(ctype
, &s
);
11194 *err
|= IOSTATE_failbit
;
11197 if(s
.strbuf
&& ctype_wchar_is_ch(ctype
, _DIGIT
, s
.val
)) {
11198 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
11201 time_get_wchar_get_monthname(this, &s
, s
, e
, base
, err
, t
);
11203 skip_date_delim_wchar(ctype
, &s
);
11205 *err
|= IOSTATE_failbit
;
11208 time_get_wchar_get_year(this, &s
, s
, e
, base
, err
, t
);
11210 case DATEORDER_mdy
:
11211 istreambuf_iterator_wchar_val(&s
);
11212 if(s
.strbuf
&& ctype_wchar_is_ch(ctype
, _DIGIT
, s
.val
)) {
11213 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
11216 time_get_wchar_get_monthname(this, &s
, s
, e
, base
, err
, t
);
11218 skip_date_delim_wchar(ctype
, &s
);
11220 *err
|= IOSTATE_failbit
;
11223 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
11224 skip_date_delim_wchar(ctype
, &s
);
11226 *err
|= IOSTATE_failbit
;
11229 time_get_wchar_get_year(this, &s
, s
, e
, base
, err
, t
);
11231 case DATEORDER_ymd
:
11232 time_get_wchar_get_year(this, &s
, s
, e
, base
, err
, t
);
11233 skip_date_delim_wchar(ctype
, &s
);
11235 *err
|= IOSTATE_failbit
;
11238 if(ctype_wchar_is_ch(ctype
, _DIGIT
, s
.val
)) {
11239 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
11242 time_get_wchar_get_monthname(this, &s
, s
, e
, base
, err
, t
);
11244 skip_date_delim_wchar(ctype
, &s
);
11246 *err
|= IOSTATE_failbit
;
11249 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
11251 case DATEORDER_ydm
:
11252 time_get_wchar_get_year(this, &s
, s
, e
, base
, err
, t
);
11253 skip_date_delim_wchar(ctype
, &s
);
11255 *err
|= IOSTATE_failbit
;
11258 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
11259 skip_date_delim_wchar(ctype
, &s
);
11261 *err
|= IOSTATE_failbit
;
11264 if(ctype_wchar_is_ch(ctype
, _DIGIT
, s
.val
)) {
11265 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
11268 time_get_wchar_get_monthname(this, &s
, s
, e
, base
, err
, t
);
11272 ERR("incorrect order value: %d\n", order
);
11277 *err
|= IOSTATE_eofbit
;
11282 /* ?get_date@?$time_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@AAHPAUtm@@@Z */
11283 /* ?get_date@?$time_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@AEAHPEAUtm@@@Z */
11284 DEFINE_THISCALL_WRAPPER(time_get_wchar_get_date
, 36)
11285 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get_date(const time_get_wchar
*this,
11286 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11287 ios_base
*base
, int *err
, struct tm
*t
)
11289 return call_time_get_wchar_do_get_date(this, ret
, s
, e
, base
, err
, t
);
11292 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get(const time_get_wchar
*,
11293 istreambuf_iterator_wchar
*, istreambuf_iterator_wchar
, istreambuf_iterator_wchar
,
11294 ios_base
*, int*, struct tm
*, char, char);
11296 /* ?_Getfmt@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHPAUtm@@PBD@Z */
11297 /* ?_Getfmt@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHPEAUtm@@PEBD@Z */
11298 DEFINE_THISCALL_WRAPPER(time_get_wchar__Getfmt
, 40)
11299 istreambuf_iterator_wchar
* __thiscall
time_get_wchar__Getfmt(const time_get_wchar
*this,
11300 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11301 ios_base
*base
, int *err
, struct tm
*t
, const char *fmt
)
11303 ctype_wchar
*ctype
;
11305 TRACE("(%p %p %p %p %p %s)\n", this, ret
, base
, err
, t
, fmt
);
11307 ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
));
11308 istreambuf_iterator_wchar_val(&s
);
11312 skip_ws_wchar(ctype
, &s
);
11318 *err
|= IOSTATE_failbit
;
11324 time_get_wchar_get(this, &s
, s
, e
, base
, err
, t
, *fmt
, 0);
11327 *err
|= IOSTATE_failbit
;
11329 istreambuf_iterator_wchar_inc(&s
);
11332 if(*err
& IOSTATE_failbit
)
11338 *err
|= IOSTATE_eofbit
;
11343 /* ?do_get@?$time_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@AAHPAUtm@@DD@Z */
11344 /* ?do_get@?$time_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@AEAHPEAUtm@@DD@Z */
11345 DEFINE_THISCALL_WRAPPER(time_get_wchar_do_get
, 44) /* virtual */
11346 #if _MSVCP_VER <= 100
11347 #define call_time_get_wchar_do_get(this, ret, s, e, base, err, t, fmt, mod) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
11348 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*, char, char), \
11349 (this, ret, s, e, base, err, t, fmt, mod))
11351 #define call_time_get_wchar_do_get(this, ret, s, e, base, err, t, fmt, mod) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
11352 (const time_get_wchar*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, struct tm*, char, char), \
11353 (this, ret, s, e, base, err, t, fmt, mod))
11355 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_do_get(const time_get_wchar
*this,
11356 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11357 ios_base
*base
, int *err
, struct tm
*t
, char fmt
, char mod
)
11359 ctype_wchar
*ctype
;
11361 TRACE("(%p %p %p %p %p %c %c)\n", this, ret
, base
, err
, t
, fmt
, mod
);
11363 ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
));
11368 time_get_wchar_get_weekday(this, &s
, s
, e
, base
, err
, t
);
11373 time_get_wchar_get_monthname(this, &s
, s
, e
, base
, err
, t
);
11376 time_get_wchar__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%b %d %H:%M:%S %Y");
11379 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 99, &t
->tm_year
);
11380 if(!(*err
& IOSTATE_failbit
))
11381 t
->tm_year
= t
->tm_year
* 100 - 1900;
11385 if(fmt
== 'e') skip_ws_wchar(ctype
, &s
);
11386 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 31, &t
->tm_mday
);
11389 time_get_wchar__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%m/%d/%y");
11392 time_get_wchar__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%Y-%m-%d");
11395 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 23, &t
->tm_hour
);
11398 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 11, &t
->tm_hour
);
11401 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 366, &t
->tm_yday
);
11404 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 12, &t
->tm_mon
);
11405 if(!(*err
& IOSTATE_failbit
))
11409 *err
= time_get_wchar__Getint(this, &s
, &e
, 0, 59, &t
->tm_min
);
11413 skip_ws_wchar(ctype
, &s
);
11418 istreambuf_iterator_wchar_val(&s
);
11419 if(s
.strbuf
&& (s
.val
=='P' || s
.val
=='p'))
11421 else if (!s
.strbuf
|| (s
.val
!='A' && s
.val
!='a')) {
11422 *err
|= IOSTATE_failbit
;
11425 istreambuf_iterator_wchar_inc(&s
);
11426 if(!s
.strbuf
|| (s
.val
!='M' && s
.val
!='m')) {
11427 *err
|= IOSTATE_failbit
;
11430 istreambuf_iterator_wchar_inc(&s
);
11437 time_get_wchar__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%I:%M:%S %p");
11440 time_get_wchar__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%H:%M");
11443 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 59, &t
->tm_sec
);
11447 time_get_wchar__Getfmt(this, &s
, s
, e
, base
, err
, t
, "%H:%M:%S");
11450 *err
|= time_get_wchar__Getint(this, &s
, &e
, 1, 7, &t
->tm_wday
);
11451 if(!(*err
& IOSTATE_failbit
) && t
->tm_wday
==7)
11455 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 6, &t
->tm_wday
);
11458 time_get_wchar_get_date(this, &s
, s
, e
, base
, err
, t
);
11461 *err
|= time_get_wchar__Getint(this, &s
, &e
, 0, 99, &t
->tm_year
);
11462 if(!(*err
& IOSTATE_failbit
) && t
->tm_year
<69)
11466 time_get_wchar_get_year(this, &s
, s
, e
, base
, err
, t
);
11469 FIXME("unrecognized format: %c\n", fmt
);
11470 *err
|= IOSTATE_failbit
;
11474 *err
|= IOSTATE_eofbit
;
11479 /* ?get@?$time_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@AAHPAUtm@@DD@Z */
11480 /* ?get@?$time_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@AEAHPEAUtm@@DD@Z */
11481 DEFINE_THISCALL_WRAPPER(time_get_wchar_get
, 44)
11482 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get(const time_get_wchar
*this,
11483 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11484 ios_base
*base
, int *err
, struct tm
*t
, char fmt
, char mod
)
11486 return call_time_get_wchar_do_get(this, ret
, s
, e
, base
, err
, t
, fmt
, mod
);
11489 /* ?get@?$time_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@AAHPAUtm@@PB_W4@Z */
11490 /* ?get@?$time_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@AEAHPEAUtm@@PEB_W4@Z */
11491 DEFINE_THISCALL_WRAPPER(time_get_wchar_get_fmt
, 44)
11492 istreambuf_iterator_wchar
* __thiscall
time_get_wchar_get_fmt(const time_get_wchar
*this,
11493 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar s
, istreambuf_iterator_wchar e
,
11494 ios_base
*base
, int *err
, struct tm
*t
, const wchar_t *fmtstart
, const wchar_t *fmtend
)
11496 ctype_wchar
*ctype
;
11498 TRACE("(%p %p %p %p %p %s)\n", this, ret
, base
, err
, t
, wine_dbgstr_wn(fmtstart
, fmtend
-fmtstart
));
11500 ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
));
11501 istreambuf_iterator_wchar_val(&s
);
11503 while(fmtstart
< fmtend
) {
11504 if(ctype_wchar_is_ch(ctype
, _SPACE
, *fmtstart
)) {
11505 skip_ws_wchar(ctype
, &s
);
11511 *err
|= IOSTATE_failbit
;
11515 if(*fmtstart
!= '%' || fmtstart
+1 >= fmtend
|| fmtstart
[1] == '%') {
11516 if(s
.val
!= *fmtstart
)
11517 *err
|= IOSTATE_failbit
;
11519 istreambuf_iterator_wchar_inc(&s
);
11520 if(*fmtstart
== '%')
11524 time_get_wchar_get(this, &s
, s
, e
, base
, err
, t
, *fmtstart
, 0);
11527 if(*err
& IOSTATE_failbit
)
11533 *err
|= IOSTATE_eofbit
;
11538 /* ??_7_Locimp@locale@std@@6B@ */
11539 extern const vtable_ptr locale__Locimp_vtable
;
11541 /* ??0_Locimp@locale@std@@AAE@_N@Z */
11542 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
11543 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
11544 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, bool transparent
)
11546 TRACE("(%p %d)\n", this, transparent
);
11548 memset(this, 0, sizeof(locale__Locimp
));
11549 locale_facet_ctor_refs(&this->facet
, 1);
11550 this->facet
.vtable
= &locale__Locimp_vtable
;
11551 this->transparent
= transparent
;
11552 locale_string_char_ctor_cstr(&this->name
, "*");
11556 /* ??_F_Locimp@locale@std@@QAEXXZ */
11557 /* ??_F_Locimp@locale@std@@QEAAXXZ */
11558 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
11559 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
11561 return locale__Locimp_ctor_transparent(this, FALSE
);
11564 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
11565 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
11566 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
11567 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
11572 TRACE("(%p %p)\n", this, copy
);
11574 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
11575 memcpy(this, copy
, sizeof(locale__Locimp
));
11576 locale_facet_ctor_refs(&this->facet
, 1);
11577 this->facet
.vtable
= &locale__Locimp_vtable
;
11578 if(copy
->facetvec
) {
11579 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
11580 if(!this->facetvec
) {
11581 _Lockit_dtor(&lock
);
11582 ERR("Out of memory\n");
11583 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11586 for(i
=0; i
<this->facet_cnt
; i
++)
11588 this->facetvec
[i
] = copy
->facetvec
[i
];
11589 if(this->facetvec
[i
])
11590 call_locale_facet__Incref(this->facetvec
[i
]);
11593 locale_string_char_copy_ctor(&this->name
, ©
->name
);
11594 _Lockit_dtor(&lock
);
11598 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
11599 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
11600 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
11602 return locale__Locimp_copy_ctor(this, copy
);
11605 /* ??1_Locimp@locale@std@@MAE@XZ */
11606 /* ??1_Locimp@locale@std@@MEAA@XZ */
11607 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
11608 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
11612 TRACE("(%p)\n", this);
11614 locale_facet_dtor(&this->facet
);
11615 for(i
=0; i
<this->facet_cnt
; i
++)
11616 if(this->facetvec
[i
] && call_locale_facet__Decref(this->facetvec
[i
]))
11617 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
11619 MSVCRT_operator_delete(this->facetvec
);
11620 locale_string_char_dtor(&this->name
);
11623 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
11624 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
11625 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
11627 locale__Locimp_dtor(this);
11630 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
11631 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
11633 TRACE("(%p %x)\n", this, flags
);
11635 /* we have an array, with the number of elements stored before the first object */
11636 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
11638 for(i
=*ptr
-1; i
>=0; i
--)
11639 locale__Locimp_dtor(this+i
);
11640 MSVCRT_operator_delete(ptr
);
11642 locale__Locimp_dtor(this);
11644 MSVCRT_operator_delete(this);
11650 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@ABV123@@Z */
11651 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z */
11652 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp(const locale__Locimp
*copy
)
11654 locale__Locimp
*ret
;
11656 TRACE("(%p)\n", copy
);
11658 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
11660 ERR("Out of memory\n");
11661 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11664 return locale__Locimp_copy_ctor(ret
, copy
);
11667 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z */
11668 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z */
11669 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp_transparent(bool transparent
)
11671 locale__Locimp
*ret
;
11673 TRACE("(%x)\n", transparent
);
11675 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
11677 ERR("Out of memory\n");
11678 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11681 return locale__Locimp_ctor_transparent(ret
, transparent
);
11684 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
11685 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
11686 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, size_t id
)
11690 TRACE("(%p %p %Iu)\n", locimp
, facet
, id
);
11692 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
11693 if(id
>= locimp
->facet_cnt
) {
11694 size_t new_size
= id
+1;
11695 locale_facet
**new_facetvec
;
11700 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
11701 if(!new_facetvec
) {
11702 _Lockit_dtor(&lock
);
11703 ERR("Out of memory\n");
11704 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11708 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
11709 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
11710 MSVCRT_operator_delete(locimp
->facetvec
);
11711 locimp
->facetvec
= new_facetvec
;
11712 locimp
->facet_cnt
= new_size
;
11715 if(locimp
->facetvec
[id
] && call_locale_facet__Decref(locimp
->facetvec
[id
]))
11716 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
11718 locimp
->facetvec
[id
] = facet
;
11720 call_locale_facet__Incref(facet
);
11721 _Lockit_dtor(&lock
);
11724 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
11725 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
11726 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
11727 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, size_t id
)
11729 locale__Locimp__Locimp_Addfac(this, facet
, id
);
11732 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
11733 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
11734 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
11740 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
11741 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
11742 /* List of missing facets:
11743 * messages, money_get, money_put, moneypunct, moneypunct, time_get
11745 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
11747 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
11749 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
11750 ctype_wchar
*ctype
;
11753 ctype
= ctype_short_use_facet(loc
);
11755 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
11757 ERR("Out of memory\n");
11758 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11760 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
11762 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
11765 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
11769 numget
= num_get_short_use_facet(loc
);
11771 numget
= MSVCRT_operator_new(sizeof(num_get
));
11773 ERR("Out of memory\n");
11774 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11776 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
11778 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
11781 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
11785 numput
= num_put_short_use_facet(loc
);
11787 numput
= MSVCRT_operator_new(sizeof(num_put
));
11789 ERR("Out of memory\n");
11790 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11792 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
11794 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
11797 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
11798 numpunct_wchar
*numpunct
;
11801 numpunct
= numpunct_short_use_facet(loc
);
11803 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
11805 ERR("Out of memory\n");
11806 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11808 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
11810 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
11813 if(cat
& (1<<(collate_short__Getcat(NULL
, NULL
)-1))) {
11817 c
= collate_short_use_facet(loc
);
11819 c
= MSVCRT_operator_new(sizeof(collate
));
11821 ERR("Out of memory\n");
11822 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11824 collate_short_ctor_locinfo(c
, locinfo
, 0);
11826 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_short_id
));
11829 if(cat
& (1<<(time_put_short__Getcat(NULL
, NULL
)-1))) {
11833 t
= time_put_short_use_facet(loc
);
11835 t
= MSVCRT_operator_new(sizeof(time_put
));
11837 ERR("Out of memory\n");
11838 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11840 time_put_short_ctor_locinfo(t
, locinfo
, 0);
11842 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_short_id
));
11845 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
11846 codecvt_wchar
*codecvt
;
11849 codecvt
= codecvt_short_use_facet(loc
);
11851 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
11853 ERR("Out of memory\n");
11854 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11856 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
11858 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
11862 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
11863 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
11864 /* List of missing facets:
11865 * messages, money_get, money_put, moneypunct, moneypunct
11867 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
11869 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
11871 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
11872 ctype_wchar
*ctype
;
11875 ctype
= ctype_wchar_use_facet(loc
);
11877 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
11879 ERR("Out of memory\n");
11880 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11882 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
11884 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
11887 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
11891 numget
= num_get_wchar_use_facet(loc
);
11893 numget
= MSVCRT_operator_new(sizeof(num_get
));
11895 ERR("Out of memory\n");
11896 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11898 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
11900 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
11903 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
11907 numput
= num_put_wchar_use_facet(loc
);
11909 numput
= MSVCRT_operator_new(sizeof(num_put
));
11911 ERR("Out of memory\n");
11912 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11914 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
11916 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
11919 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
11920 numpunct_wchar
*numpunct
;
11923 numpunct
= numpunct_wchar_use_facet(loc
);
11925 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
11927 ERR("Out of memory\n");
11928 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11930 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
11932 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
11935 if(cat
& (1<<(collate_wchar__Getcat(NULL
, NULL
)-1))) {
11939 c
= collate_wchar_use_facet(loc
);
11941 c
= MSVCRT_operator_new(sizeof(collate
));
11943 ERR("Out of memory\n");
11944 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11946 collate_wchar_ctor_locinfo(c
, locinfo
, 0);
11948 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_wchar_id
));
11951 if(cat
& (1<<(time_get_wchar__Getcat(NULL
, NULL
)-1))) {
11955 t
= time_get_wchar_use_facet(loc
);
11957 t
= MSVCRT_operator_new(sizeof(time_get_wchar
));
11959 ERR("Out of memory\n");
11960 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11962 time_get_wchar_ctor_locinfo(t
, locinfo
, 0);
11964 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_get_wchar_id
));
11967 if(cat
& (1<<(time_put_wchar__Getcat(NULL
, NULL
)-1))) {
11971 t
= time_put_wchar_use_facet(loc
);
11973 t
= MSVCRT_operator_new(sizeof(time_put
));
11975 ERR("Out of memory\n");
11976 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11978 time_put_wchar_ctor_locinfo(t
, locinfo
, 0);
11980 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_wchar_id
));
11983 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
11984 codecvt_wchar
*codecvt
;
11987 codecvt
= codecvt_wchar_use_facet(loc
);
11989 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
11991 ERR("Out of memory\n");
11992 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11994 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
11996 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
12000 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
12001 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
12002 /* List of missing facets:
12003 * messages, money_get, money_put, moneypunct, moneypunct
12005 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
12007 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
12009 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
12013 ctype
= ctype_char_use_facet(loc
);
12015 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
12017 ERR("Out of memory\n");
12018 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12020 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
12022 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
12025 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
12029 numget
= num_get_char_use_facet(loc
);
12031 numget
= MSVCRT_operator_new(sizeof(num_get
));
12033 ERR("Out of memory\n");
12034 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12036 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
12038 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
12041 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
12045 numput
= num_put_char_use_facet(loc
);
12047 numput
= MSVCRT_operator_new(sizeof(num_put
));
12049 ERR("Out of memory\n");
12050 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12052 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
12054 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
12057 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
12058 numpunct_char
*numpunct
;
12061 numpunct
= numpunct_char_use_facet(loc
);
12063 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
12065 ERR("Out of memory\n");
12066 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12068 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
12070 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
12073 if(cat
& (1<<(collate_char__Getcat(NULL
, NULL
)-1))) {
12077 c
= collate_char_use_facet(loc
);
12079 c
= MSVCRT_operator_new(sizeof(collate
));
12081 ERR("Out of memory\n");
12082 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12084 collate_char_ctor_locinfo(c
, locinfo
, 0);
12086 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_char_id
));
12089 if(cat
& (1<<(time_get_char__Getcat(NULL
, NULL
)-1))) {
12093 t
= time_get_char_use_facet(loc
);
12095 t
= MSVCRT_operator_new(sizeof(time_get_char
));
12097 ERR("Out of memory\n");
12098 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12100 time_get_char_ctor_locinfo(t
, locinfo
, 0);
12102 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_get_char_id
));
12105 if(cat
& (1<<(time_put_char__Getcat(NULL
, NULL
)-1))) {
12109 t
= time_put_char_use_facet(loc
);
12111 t
= MSVCRT_operator_new(sizeof(time_put
));
12113 ERR("Out of memory\n");
12114 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12116 time_put_char_ctor_locinfo(t
, locinfo
, 0);
12118 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_char_id
));
12121 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
12122 codecvt_char
*codecvt
;
12125 codecvt
= codecvt_char_use_facet(loc
);
12127 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
12129 ERR("Out of memory\n");
12130 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12132 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
12134 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
12138 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
12139 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
12140 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
12142 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
12144 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
12145 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
12146 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
12148 locimp
->catmask
|= cat
;
12149 locale_string_char_assign(&locimp
->name
, &locinfo
->newlocname
);
12153 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
12154 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
12155 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
12156 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
12158 TRACE("(%p %p)\n", this, locimp
);
12159 /* Don't change locimp reference counter */
12160 this->ptr
= locimp
;
12164 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
12165 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
12166 locale__Locimp
* __cdecl
locale__Init(void)
12172 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
12173 if(global_locale
) {
12174 _Lockit_dtor(&lock
);
12175 return global_locale
;
12178 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
12179 if(!global_locale
) {
12180 _Lockit_dtor(&lock
);
12181 ERR("Out of memory\n");
12182 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12186 locale__Locimp_ctor(global_locale
);
12187 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
12188 locale_string_char_dtor(&global_locale
->name
);
12189 locale_string_char_ctor_cstr(&global_locale
->name
, "C");
12191 locale__Locimp__Clocptr
= global_locale
;
12192 global_locale
->facet
.refs
++;
12193 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
12194 _Lockit_dtor(&lock
);
12196 return global_locale
;
12199 /* ?_Init@locale@std@@CAPAV_Locimp@12@_N@Z */
12200 /* ?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z */
12201 locale__Locimp
* __cdecl
locale__Init_ref(bool inc_ref
)
12203 locale__Locimp
*ret
;
12206 TRACE("(%x)\n", inc_ref
);
12208 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
12209 if(inc_ref
&& global_locale
) {
12210 call_locale_facet__Incref(&global_locale
->facet
);
12211 _Lockit_dtor(&lock
);
12212 return global_locale
;
12215 ret
= locale__Init();
12216 _Lockit_dtor(&lock
);
12220 /* ?_Iscloc@locale@std@@QBE_NXZ */
12221 /* ?_Iscloc@locale@std@@QEBA_NXZ */
12222 DEFINE_THISCALL_WRAPPER(locale__Iscloc
, 4)
12223 bool __thiscall
locale__Iscloc(const locale
*this)
12225 TRACE("(%p)\n", this);
12226 return this->ptr
== locale__Locimp__Clocptr
;
12229 /* ??0locale@std@@QAE@ABV01@0H@Z */
12230 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
12231 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
12232 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
12236 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
12238 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
12240 ERR("Out of memory\n");
12241 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12243 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
12245 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, locale_string_char_c_str(&loc
->ptr
->name
));
12246 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, locale_string_char_c_str(&other
->ptr
->name
));
12247 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
12248 _Locinfo_dtor(&locinfo
);
12253 /* ??0locale@std@@QAE@ABV01@@Z */
12254 /* ??0locale@std@@QEAA@AEBV01@@Z */
12255 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
12256 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
12258 TRACE("(%p %p)\n", this, copy
);
12259 this->ptr
= copy
->ptr
;
12260 call_locale_facet__Incref(&this->ptr
->facet
);
12264 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
12265 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
12266 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
12267 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
12271 TRACE("(%p %p %s %d)\n", this, loc
, locname
, cat
);
12273 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
12274 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
12275 _Locinfo_dtor(&locinfo
);
12276 MSVCRT_operator_delete(this->ptr
);
12277 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
12280 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
12282 ERR("Out of memory\n");
12283 _Locinfo_dtor(&locinfo
);
12284 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12286 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
12288 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
12289 _Locinfo_dtor(&locinfo
);
12293 /* ??0locale@std@@QAE@PBDH@Z */
12294 /* ??0locale@std@@QEAA@PEBDH@Z */
12295 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
12296 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
12300 TRACE("(%p %s %d)\n", this, locname
, cat
);
12302 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
12304 ERR("Out of memory\n");
12305 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12307 locale__Locimp_ctor(this->ptr
);
12311 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
12312 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
12313 _Locinfo_dtor(&locinfo
);
12314 MSVCRT_operator_delete(this->ptr
);
12315 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
12318 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
12319 _Locinfo_dtor(&locinfo
);
12324 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
12325 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
12326 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
12327 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
12329 TRACE("(%p)\n", this);
12334 /* ??0locale@std@@QAE@XZ */
12335 /* ??0locale@std@@QEAA@XZ */
12336 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
12337 locale
* __thiscall
locale_ctor(locale
*this)
12339 TRACE("(%p)\n", this);
12340 this->ptr
= locale__Init();
12341 call_locale_facet__Incref(&this->ptr
->facet
);
12345 /* ??1locale@std@@QAE@XZ */
12346 /* ??1locale@std@@QEAA@XZ */
12347 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
12348 void __thiscall
locale_dtor(locale
*this)
12350 TRACE("(%p)\n", this);
12351 if(this->ptr
&& call_locale_facet__Decref(&this->ptr
->facet
))
12353 locale__Locimp_dtor(this->ptr
);
12354 MSVCRT_operator_delete(this->ptr
);
12358 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
12359 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
12360 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
12361 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
12363 FIXME("(%p %p) stub\n", this, loc
);
12367 /* ??8locale@std@@QBE_NABV01@@Z */
12368 /* ??8locale@std@@QEBA_NAEBV01@@Z */
12369 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
12370 bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
12372 FIXME("(%p %p) stub\n", this, loc
);
12376 /* ??9locale@std@@QBE_NABV01@@Z */
12377 /* ??9locale@std@@QEBA_NAEBV01@@Z */
12378 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
12379 bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
12381 FIXME("(%p %p) stub\n", this, loc
);
12385 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
12386 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
12387 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
12388 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, size_t id
, size_t catmask
)
12390 TRACE("(%p %p %Iu %Iu)\n", this, facet
, id
, catmask
);
12392 if(this->ptr
->facet
.refs
> 1) {
12393 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
12395 ERR("Out of memory\n");
12396 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12399 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
12400 call_locale_facet__Decref(&this->ptr
->facet
);
12401 this->ptr
= new_ptr
;
12404 locale__Locimp__Addfac(this->ptr
, facet
, id
);
12407 locale_string_char_dtor(&this->ptr
->name
);
12408 locale_string_char_ctor_cstr(&this->ptr
->name
, "*");
12413 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z */
12414 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K_N@Z */
12415 DEFINE_THISCALL_WRAPPER(locale__Getfacet_bool
, 12)
12416 const locale_facet
* __thiscall
locale__Getfacet_bool(const locale
*this,
12417 size_t id
, bool allow_transparent
)
12421 TRACE("(%p %Iu)\n", this, id
);
12423 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
12424 if(fac
|| !this->ptr
->transparent
|| !allow_transparent
)
12427 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
12430 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
12431 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
12432 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
12433 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, size_t id
)
12435 return locale__Getfacet_bool( this, id
, TRUE
);
12438 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
12439 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
12440 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
12443 return global_locale
;
12446 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
12447 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
12448 void __cdecl
locale__Setgloballocale(void *locimp
)
12450 TRACE("(%p)\n", locimp
);
12451 global_locale
= locimp
;
12454 /* ?classic@locale@std@@SAABV12@XZ */
12455 /* ?classic@locale@std@@SAAEBV12@XZ */
12456 const locale
* __cdecl
locale_classic(void)
12460 return &classic_locale
;
12463 /* ?empty@locale@std@@SA?AV12@XZ */
12464 locale
* __cdecl
locale_empty(locale
*ret
)
12470 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
12472 ERR("Out of memory\n");
12473 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
12475 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
12479 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
12480 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
12481 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
12486 TRACE("(%p %p)\n", loc
, ret
);
12488 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
12491 if(loc
->ptr
!= global_locale
) {
12492 call_locale_facet__Decref(&global_locale
->facet
);
12493 global_locale
= loc
->ptr
;
12494 call_locale_facet__Incref(&global_locale
->facet
);
12496 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
12497 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
12499 setlocale(i
, locale_string_char_c_str(&global_locale
->name
));
12502 _Lockit_dtor(&lock
);
12506 #if _MSVCP_VER < 100
12508 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
12509 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
12510 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
12511 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
12513 TRACE("(%p)\n", this);
12515 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
12519 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
12520 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
12521 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
12522 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
12524 TRACE( "(%p)\n", this);
12525 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
12531 /* ?_Getname@_Locinfo@std@@QBEPBDXZ */
12532 /* ?_Getname@_Locinfo@std@@QEBAPEBDXZ */
12533 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 4)
12534 const char * __thiscall
_Locinfo__Getname( const _Locinfo
*this )
12536 return locale_string_char_c_str( &this->newlocname
);
12539 #endif /* _MSVCP_VER < 100 */
12542 wctrans_t __cdecl
wctrans(const char *property
)
12544 static const char str_tolower
[] = "tolower";
12545 static const char str_toupper
[] = "toupper";
12547 if(!strcmp(property
, str_tolower
))
12549 if(!strcmp(property
, str_toupper
))
12555 wint_t __cdecl
towctrans(wint_t c
, wctrans_t category
)
12558 return towupper(c
);
12559 return towlower(c
);
12562 #if _MSVCP_VER <= 71
12564 wint_t __cdecl
btowc(int c
)
12570 if (c
== EOF
|| _Mbrtowc( &ret
, &ch
, 1, &state
, NULL
) != 1) return WEOF
;
12575 size_t __cdecl
mbrlen(const char *str
, size_t n
, mbstate_t *state
)
12577 static int local_state
;
12579 if (!state
) state
= &local_state
;
12580 return _Mbrtowc( NULL
, str
, n
, state
, NULL
);
12584 size_t __cdecl
mbrtowc(wchar_t *dst
, const char *str
, size_t n
, mbstate_t *state
)
12586 static int local_state
;
12588 if (!state
) state
= &local_state
;
12589 return _Mbrtowc( dst
, str
, n
, state
, NULL
);
12593 size_t __cdecl
mbsrtowcs(wchar_t *dst
, const char **pstr
, size_t n
, mbstate_t *state
)
12595 static int local_state
;
12601 if (!state
) state
= &local_state
;
12603 while (!dst
|| n
> ret
)
12605 int len
= _Mbrtowc( &wc
, src
, 2, state
, NULL
);
12606 if (len
< 0) return -1;
12608 if (dst
) dst
[ret
] = wc
;
12617 int __cdecl
wctob(wint_t wc
)
12619 char ret
[MB_LEN_MAX
];
12621 if (wc
== WEOF
|| _Wcrtomb( ret
, wc
, NULL
, NULL
) != 1) return EOF
;
12626 size_t __cdecl
wcrtomb(char *dst
, wchar_t wc
, mbstate_t *state
)
12628 return _Wcrtomb( dst
, wc
, state
, NULL
);
12632 size_t __cdecl
wcsrtombs(char *dst
, const wchar_t **pstr
, size_t n
, mbstate_t *state
)
12634 const wchar_t *src
;
12635 char buffer
[MB_LEN_MAX
];
12640 while (!dst
|| n
> ret
)
12642 int len
= _Wcrtomb( buffer
, *src
, state
, NULL
);
12643 if (len
<= 0) return -1;
12644 if (n
< ret
+ len
) break;
12645 memcpy( dst
+ ret
, buffer
, len
);
12647 if (!buffer
[0]) break;
12654 int __cdecl
_To_byte(const wchar_t *src
, char *dst
)
12656 TRACE("(%s %p)\n", debugstr_w(src
), dst
);
12657 return WideCharToMultiByte(CP_ACP
, 0, src
, -1, dst
, MAX_PATH
, NULL
, NULL
);
12660 int __cdecl
_To_wide(const char *src
, wchar_t *dst
)
12662 TRACE("(%s %p)\n", debugstr_a(src
), dst
);
12663 return MultiByteToWideChar(CP_ACP
, 0, src
, -1, dst
, MAX_PATH
);
12666 size_t __cdecl
_Strxfrm(char *dest
, char *dest_end
,
12667 const char *src
, const char *src_end
, _Collvec
*coll
)
12669 size_t dest_len
= dest_end
- dest
;
12670 size_t src_len
= src_end
- src
;
12676 TRACE("(%p %p %p %p %p)\n", dest
, dest_end
, src
, src_end
, coll
);
12678 if (coll
) cv
= *coll
;
12681 #if _MSVCP_VER < 110
12684 lcid
= LocaleNameToLCID(cv
.lc_name
, 0);
12687 if (!lcid
&& !cv
.page
)
12689 if (src_len
> dest_len
) return src_len
;
12690 memcpy(dest
, src
, src_len
);
12694 len
= MultiByteToWideChar(cv
.page
, MB_ERR_INVALID_CHARS
, src
, src_len
, NULL
, 0);
12695 if (!len
) return INT_MAX
;
12696 buf
= heap_alloc(len
* sizeof(WCHAR
));
12697 if (!buf
) return INT_MAX
;
12698 MultiByteToWideChar(cv
.page
, MB_ERR_INVALID_CHARS
, src
, src_len
, buf
, len
);
12700 len
= LCMapStringW(lcid
, LCMAP_SORTKEY
, buf
, len
, NULL
, 0);
12701 if (len
<= dest_len
)
12702 LCMapStringW(lcid
, LCMAP_SORTKEY
, buf
, len
, (WCHAR
*)dest
, dest_len
);
12707 size_t __cdecl
_Wcsxfrm(wchar_t *dest
, wchar_t *dest_end
,
12708 const wchar_t *src
, const wchar_t *src_end
, _Collvec
*coll
)
12710 size_t dest_len
= dest_end
- dest
;
12711 size_t src_len
= src_end
- src
;
12716 TRACE("(%p %p %p %p %p)\n", dest
, dest_end
, src
, src_end
, coll
);
12718 if (coll
) cv
= *coll
;
12721 #if _MSVCP_VER < 110
12724 lcid
= LocaleNameToLCID(cv
.lc_name
, 0);
12729 if (src_len
> dest_len
) return src_len
;
12730 memcpy(dest
, src
, src_len
* sizeof(wchar_t));
12734 len
= LCMapStringW(lcid
, LCMAP_SORTKEY
, src
, src_len
, NULL
, 0);
12735 if (!len
) return INT_MAX
;
12736 if (len
> dest_len
) return len
;
12738 LCMapStringW(lcid
, LCMAP_SORTKEY
, src
, src_len
, dest
, dest_len
);
12739 for (i
= len
- 1; i
>= 0; i
--)
12740 dest
[i
] = ((BYTE
*)dest
)[i
];
12744 DEFINE_RTTI_DATA0(_Facet_base
, 0, ".?AV_Facet_base@std@@")
12745 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@")
12746 DEFINE_RTTI_DATA1(locale__Locimp
, 0, &locale_facet_rtti_base_descriptor
, ".?AV_Locimp@locale@std@@")
12747 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@")
12748 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@")
12749 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@")
12750 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@")
12751 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@")
12752 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@")
12753 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@")
12754 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@")
12755 #if _MSVCP_VER >= 140
12756 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDU_Mbstatet@@@std@@")
12757 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDU_Mbstatet@@@std@@")
12758 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDU_Mbstatet@@@std@@")
12760 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@")
12761 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@")
12762 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@")
12764 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@")
12765 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@")
12766 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@")
12767 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@@")
12768 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@@")
12769 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@@")
12770 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@@")
12771 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@@")
12772 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@@")
12773 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@@")
12774 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@@")
12775 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@@")
12776 DEFINE_RTTI_DATA1(time_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUtime_base@std@@")
12777 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@@")
12778 DEFINE_RTTI_DATA2(time_get_wchar
, 0, &time_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@")
12780 __ASM_BLOCK_BEGIN(locale_vtables
)
12781 __ASM_VTABLE(_Facet_base
,
12782 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
12783 VTABLE_ADD_FUNC(locale_facet__Incref
)
12784 VTABLE_ADD_FUNC(locale_facet__Incref
)
12786 __ASM_VTABLE(locale_facet
,
12787 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
12788 #if _MSVCP_VER >= 110
12789 VTABLE_ADD_FUNC(locale_facet__Incref
)
12790 VTABLE_ADD_FUNC(locale_facet__Decref
)
12793 __ASM_VTABLE(locale__Locimp
,
12794 VTABLE_ADD_FUNC(locale__Locimp_vector_dtor
)
12795 #if _MSVCP_VER >= 110
12796 VTABLE_ADD_FUNC(locale_facet__Incref
)
12797 VTABLE_ADD_FUNC(locale_facet__Decref
)
12800 __ASM_VTABLE(collate_char
,
12801 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
12802 #if _MSVCP_VER >= 110
12803 VTABLE_ADD_FUNC(locale_facet__Incref
)
12804 VTABLE_ADD_FUNC(locale_facet__Decref
)
12806 VTABLE_ADD_FUNC(collate_char_do_compare
)
12807 VTABLE_ADD_FUNC(collate_char_do_transform
)
12808 VTABLE_ADD_FUNC(collate_char_do_hash
));
12809 __ASM_VTABLE(collate_wchar
,
12810 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
12811 #if _MSVCP_VER >= 110
12812 VTABLE_ADD_FUNC(locale_facet__Incref
)
12813 VTABLE_ADD_FUNC(locale_facet__Decref
)
12815 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
12816 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
12817 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
12818 __ASM_VTABLE(collate_short
,
12819 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
12820 #if _MSVCP_VER >= 110
12821 VTABLE_ADD_FUNC(locale_facet__Incref
)
12822 VTABLE_ADD_FUNC(locale_facet__Decref
)
12824 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
12825 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
12826 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
12827 __ASM_VTABLE(ctype_base
,
12828 VTABLE_ADD_FUNC(ctype_base_vector_dtor
)
12829 #if _MSVCP_VER >= 110
12830 VTABLE_ADD_FUNC(locale_facet__Incref
)
12831 VTABLE_ADD_FUNC(locale_facet__Decref
)
12834 __ASM_VTABLE(ctype_char
,
12835 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
12836 #if _MSVCP_VER >= 110
12837 VTABLE_ADD_FUNC(locale_facet__Incref
)
12838 VTABLE_ADD_FUNC(locale_facet__Decref
)
12840 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
12841 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
12842 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
12843 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
12844 VTABLE_ADD_FUNC(ctype_char_do_widen
)
12845 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
12846 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
12847 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
12848 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
12849 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
12850 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
)
12852 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
12853 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
12856 __ASM_VTABLE(ctype_wchar
,
12857 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
12858 #if _MSVCP_VER >= 110
12859 VTABLE_ADD_FUNC(locale_facet__Incref
)
12860 VTABLE_ADD_FUNC(locale_facet__Decref
)
12862 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
12863 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
12864 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
12865 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
12866 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
12867 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
12868 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
12869 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
12870 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
12871 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
12872 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
12873 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
12874 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
12875 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
12876 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
12878 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
12879 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
12882 __ASM_VTABLE(ctype_short
,
12883 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
12884 #if _MSVCP_VER >= 110
12885 VTABLE_ADD_FUNC(locale_facet__Incref
)
12886 VTABLE_ADD_FUNC(locale_facet__Decref
)
12888 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
12889 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
12890 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
12891 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
12892 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
12893 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
12894 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
12895 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
12896 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
12897 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
12898 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
12899 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
12900 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
12901 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
12902 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
12904 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
12905 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
12908 __ASM_VTABLE(codecvt_base
,
12909 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
12910 #if _MSVCP_VER >= 110
12911 VTABLE_ADD_FUNC(locale_facet__Incref
)
12912 VTABLE_ADD_FUNC(locale_facet__Decref
)
12914 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
12915 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
12916 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
12917 __ASM_VTABLE(codecvt_char
,
12918 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
12919 #if _MSVCP_VER >= 110
12920 VTABLE_ADD_FUNC(locale_facet__Incref
)
12921 VTABLE_ADD_FUNC(locale_facet__Decref
)
12922 VTABLE_ADD_FUNC(codecvt_char_do_always_noconv
)
12924 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
12926 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
12927 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
12928 VTABLE_ADD_FUNC(codecvt_char_do_in
)
12929 VTABLE_ADD_FUNC(codecvt_char_do_out
)
12930 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
12931 VTABLE_ADD_FUNC(codecvt_char_do_length
));
12932 __ASM_VTABLE(codecvt_wchar
,
12933 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
12934 #if _MSVCP_VER >= 110
12935 VTABLE_ADD_FUNC(locale_facet__Incref
)
12936 VTABLE_ADD_FUNC(locale_facet__Decref
)
12938 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
12939 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
12940 #if _MSVCP_VER >= 90 && _MSVCP_VER <= 100
12941 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
12943 VTABLE_ADD_FUNC(codecvt_wchar_do_encoding
)
12945 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
12946 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
12947 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
12948 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
12949 __ASM_VTABLE(codecvt_short
,
12950 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
12951 #if _MSVCP_VER >= 110
12952 VTABLE_ADD_FUNC(locale_facet__Incref
)
12953 VTABLE_ADD_FUNC(locale_facet__Decref
)
12955 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
12956 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
12957 #if _MSVCP_VER >= 90 && _MSVCP_VER <= 100
12958 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
12960 VTABLE_ADD_FUNC(codecvt_wchar_do_encoding
)
12962 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
12963 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
12964 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
12965 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
12966 __ASM_VTABLE(numpunct_char
,
12967 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
12968 #if _MSVCP_VER >= 110
12969 VTABLE_ADD_FUNC(locale_facet__Incref
)
12970 VTABLE_ADD_FUNC(locale_facet__Decref
)
12972 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
12973 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
12974 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
12975 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
12976 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
12977 __ASM_VTABLE(numpunct_wchar
,
12978 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
12979 #if _MSVCP_VER >= 110
12980 VTABLE_ADD_FUNC(locale_facet__Incref
)
12981 VTABLE_ADD_FUNC(locale_facet__Decref
)
12983 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
12984 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
12985 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
12986 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
12987 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
12988 __ASM_VTABLE(numpunct_short
,
12989 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
12990 #if _MSVCP_VER >= 110
12991 VTABLE_ADD_FUNC(locale_facet__Incref
)
12992 VTABLE_ADD_FUNC(locale_facet__Decref
)
12994 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
12995 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
12996 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
12997 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
12998 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
12999 __ASM_VTABLE(num_get_char
,
13000 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
13001 #if _MSVCP_VER >= 110
13002 VTABLE_ADD_FUNC(locale_facet__Incref
)
13003 VTABLE_ADD_FUNC(locale_facet__Decref
)
13005 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
13006 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
13007 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
13008 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
13009 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
13010 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
13011 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
13012 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
13013 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
13014 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
13015 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
13016 __ASM_VTABLE(num_get_short
,
13017 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
13018 #if _MSVCP_VER >= 110
13019 VTABLE_ADD_FUNC(locale_facet__Incref
)
13020 VTABLE_ADD_FUNC(locale_facet__Decref
)
13022 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
13023 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
13024 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
13025 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
13026 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
13027 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
13028 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
13029 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
13030 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
13031 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
13032 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
13033 __ASM_VTABLE(num_get_wchar
,
13034 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
13035 #if _MSVCP_VER >= 110
13036 VTABLE_ADD_FUNC(locale_facet__Incref
)
13037 VTABLE_ADD_FUNC(locale_facet__Decref
)
13039 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
13040 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
13041 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
13042 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
13043 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
13044 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
13045 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
13046 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
13047 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
13048 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
13049 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
13050 __ASM_VTABLE(num_put_char
,
13051 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
13052 #if _MSVCP_VER >= 110
13053 VTABLE_ADD_FUNC(locale_facet__Incref
)
13054 VTABLE_ADD_FUNC(locale_facet__Decref
)
13056 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
13057 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
13058 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
13059 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
13060 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
13061 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
13062 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
13063 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
13064 __ASM_VTABLE(num_put_wchar
,
13065 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
13066 #if _MSVCP_VER >= 110
13067 VTABLE_ADD_FUNC(locale_facet__Incref
)
13068 VTABLE_ADD_FUNC(locale_facet__Decref
)
13070 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
13071 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
13072 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
13073 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
13074 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
13075 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
13076 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
13077 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
13078 __ASM_VTABLE(num_put_short
,
13079 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
13080 #if _MSVCP_VER >= 110
13081 VTABLE_ADD_FUNC(locale_facet__Incref
)
13082 VTABLE_ADD_FUNC(locale_facet__Decref
)
13084 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
13085 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
13086 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
13087 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
13088 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
13089 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
13090 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
13091 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
13092 __ASM_VTABLE(time_put_char
,
13093 VTABLE_ADD_FUNC(time_put_char_vector_dtor
)
13094 #if _MSVCP_VER >= 110
13095 VTABLE_ADD_FUNC(locale_facet__Incref
)
13096 VTABLE_ADD_FUNC(locale_facet__Decref
)
13098 VTABLE_ADD_FUNC(time_put_char_do_put
));
13099 __ASM_VTABLE(time_put_wchar
,
13100 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
13101 #if _MSVCP_VER >= 110
13102 VTABLE_ADD_FUNC(locale_facet__Incref
)
13103 VTABLE_ADD_FUNC(locale_facet__Decref
)
13105 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
13106 __ASM_VTABLE(time_put_short
,
13107 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
13108 #if _MSVCP_VER >= 110
13109 VTABLE_ADD_FUNC(locale_facet__Incref
)
13110 VTABLE_ADD_FUNC(locale_facet__Decref
)
13112 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
13113 __ASM_VTABLE(time_get_char
,
13114 VTABLE_ADD_FUNC(time_get_char_vector_dtor
)
13115 #if _MSVCP_VER >= 110
13116 VTABLE_ADD_FUNC(locale_facet__Incref
)
13117 VTABLE_ADD_FUNC(locale_facet__Decref
)
13119 VTABLE_ADD_FUNC(time_get_char_do_date_order
)
13120 VTABLE_ADD_FUNC(time_get_char_do_get_time
)
13121 VTABLE_ADD_FUNC(time_get_char_do_get_date
)
13122 VTABLE_ADD_FUNC(time_get_char_do_get_weekday
)
13123 VTABLE_ADD_FUNC(time_get_char_do_get_monthname
)
13124 VTABLE_ADD_FUNC(time_get_char_do_get_year
)
13125 #if _MSVCP_VER >= 100
13126 VTABLE_ADD_FUNC(time_get_char_do_get
)
13129 __ASM_VTABLE(time_get_wchar
,
13130 VTABLE_ADD_FUNC(time_get_wchar_vector_dtor
)
13131 #if _MSVCP_VER >= 110
13132 VTABLE_ADD_FUNC(locale_facet__Incref
)
13133 VTABLE_ADD_FUNC(locale_facet__Decref
)
13135 VTABLE_ADD_FUNC(time_get_wchar_do_date_order
)
13136 VTABLE_ADD_FUNC(time_get_wchar_do_get_time
)
13137 VTABLE_ADD_FUNC(time_get_wchar_do_get_date
)
13138 VTABLE_ADD_FUNC(time_get_wchar_do_get_weekday
)
13139 VTABLE_ADD_FUNC(time_get_wchar_do_get_monthname
)
13140 VTABLE_ADD_FUNC(time_get_wchar_do_get_year
)
13141 #if _MSVCP_VER >= 100
13142 VTABLE_ADD_FUNC(time_get_wchar_do_get
)
13147 void init_locale(void *base
)
13150 init__Facet_base_rtti(base
);
13151 init_locale_facet_rtti(base
);
13152 init_locale__Locimp_rtti(base
);
13153 init_collate_char_rtti(base
);
13154 init_collate_wchar_rtti(base
);
13155 init_collate_short_rtti(base
);
13156 init_ctype_base_rtti(base
);
13157 init_ctype_char_rtti(base
);
13158 init_ctype_wchar_rtti(base
);
13159 init_ctype_short_rtti(base
);
13160 init_codecvt_base_rtti(base
);
13161 init_codecvt_char_rtti(base
);
13162 init_codecvt_wchar_rtti(base
);
13163 init_codecvt_short_rtti(base
);
13164 init_numpunct_char_rtti(base
);
13165 init_numpunct_wchar_rtti(base
);
13166 init_numpunct_short_rtti(base
);
13167 init_num_get_char_rtti(base
);
13168 init_num_get_wchar_rtti(base
);
13169 init_num_get_short_rtti(base
);
13170 init_num_put_char_rtti(base
);
13171 init_num_put_wchar_rtti(base
);
13172 init_num_put_short_rtti(base
);
13173 init_time_put_char_rtti(base
);
13174 init_time_put_wchar_rtti(base
);
13175 init_time_put_short_rtti(base
);
13176 init_time_base_rtti(base
);
13177 init_time_get_char_rtti(base
);
13178 init_time_get_wchar_rtti(base
);
13182 void free_locale(void)
13184 facets_elem
*iter
, *safe
;
13186 if(global_locale
) {
13187 locale_dtor(&classic_locale
);
13188 locale__Locimp_dtor(global_locale
);
13189 MSVCRT_operator_delete(global_locale
);
13192 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
13193 list_remove(&iter
->entry
);
13194 if(call_locale_facet__Decref(iter
->fac
))
13195 call_locale_facet_vector_dtor(iter
->fac
, 1);
13196 MSVCRT_operator_delete(iter
);