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/unicode.h"
36 #include "wine/list.h"
37 #include "wine/debug.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
49 char* __cdecl
_Getdays(void);
50 char* __cdecl
_Getmonths(void);
51 void* __cdecl
_Gettnames(void);
52 unsigned int __cdecl
___lc_codepage_func(void);
53 int __cdecl
___lc_collate_cp_func(void);
54 const unsigned short* __cdecl
__pctype_func(void);
55 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, MSVCP_size_t
);
56 MSVCP_size_t __cdecl
_Strftime(char*, MSVCP_size_t
, const char*,
57 const struct tm
*, struct __lc_time_data
*);
58 const locale
* __cdecl
locale_classic(void);
61 static LCID
* ___lc_handle_func(void)
65 _locale_t loc
= _get_current_locale();
66 ret
= loc
->locinfo
->lc_handle
;
71 LCID
* __cdecl
___lc_handle_func(void);
75 #define locale_string basic_string_char
76 #define locale_string_char_ctor_cstr(this,str) MSVCP_basic_string_char_ctor_cstr(this,str)
77 #define locale_string_char_copy_ctor(this,copy) MSVCP_basic_string_char_copy_ctor(this,copy)
78 #define locale_string_char_dtor(this) MSVCP_basic_string_char_dtor(this)
79 #define locale_string_char_c_str(this) MSVCP_basic_string_char_c_str(this)
80 #define locale_string_char_assign(this,assign) MSVCP_basic_string_char_assign(this,assign)
82 #define locale_string _Yarn_char
83 #define locale_string_char_ctor_cstr(this,str) _Yarn_char_ctor_cstr(this,str)
84 #define locale_string_char_copy_ctor(this,copy) _Yarn_char_copy_ctor(this,copy)
85 #define locale_string_char_dtor(this) _Yarn_char_dtor(this)
86 #define locale_string_char_c_str(this) _Yarn_char_c_str(this)
87 #define locale_string_char_assign(this,assign) _Yarn_char_op_assign(this,assign)
96 typedef struct _locale__Locimp
{
98 locale_facet
**facetvec
;
99 MSVCP_size_t facet_cnt
;
101 MSVCP_bool transparent
;
112 locale_string months
;
113 locale_string oldlocname
;
114 locale_string newlocname
;
129 const char *grouping
;
132 const char *false_name
;
133 const char *true_name
;
138 const char *grouping
;
141 const wchar_t *false_name
;
142 const wchar_t *true_name
;
159 /* ?_Id_cnt@id@locale@std@@0HA */
160 int locale_id__Id_cnt
= 0;
162 static locale classic_locale
;
164 /* ?_Global@_Locimp@locale@std@@0PAV123@A */
165 /* ?_Global@_Locimp@locale@std@@0PEAV123@EA */
166 locale__Locimp
*global_locale
= NULL
;
168 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
169 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
170 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
172 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
174 if(this->strbuf
&& !this->got
) {
175 int c
= basic_streambuf_char_sgetc(this->strbuf
);
186 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
188 if(this->strbuf
&& !this->got
) {
189 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
200 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
202 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
207 istreambuf_iterator_char_val(this);
211 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
213 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
218 istreambuf_iterator_wchar_val(this);
222 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
224 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
228 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
230 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
234 /* ??1facet@locale@std@@UAE@XZ */
235 /* ??1facet@locale@std@@UEAA@XZ */
236 /* ??1facet@locale@std@@MAA@XZ */
237 /* ??1facet@locale@std@@MAE@XZ */
238 /* ??1facet@locale@std@@MEAA@XZ */
239 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
240 void __thiscall
locale_facet_dtor(locale_facet
*this)
242 TRACE("(%p)\n", this);
245 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
246 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
247 locale_facet*, (locale_facet*, unsigned int), (this, flags))
248 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
250 TRACE("(%p %x)\n", this, flags
);
252 /* we have an array, with the number of elements stored before the first object */
253 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
255 for(i
=*ptr
-1; i
>=0; i
--)
256 locale_facet_dtor(this+i
);
257 MSVCRT_operator_delete(ptr
);
259 locale_facet_dtor(this);
261 MSVCRT_operator_delete(this);
272 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
274 /* Not exported from msvcp90 */
275 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
276 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
277 void __cdecl
locale_facet_register(locale_facet
*add
)
279 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
281 ERR("Out of memory\n");
282 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
286 list_add_head(&lazy_facets
, &head
->entry
);
289 /* Not exported from msvcp90 */
290 /* ?_Register@facet@locale@std@@QAEXXZ */
291 /* ?_Register@facet@locale@std@@QEAAXXZ */
292 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
293 void __thiscall
locale_facet__Register(locale_facet
*this)
295 TRACE("(%p)\n", this);
296 locale_facet_register(this);
299 /* Not exported from msvcp90 */
300 /* ??_7facet@locale@std@@6B@ */
301 extern const vtable_ptr MSVCP_locale_facet_vtable
;
303 /* ??0id@locale@std@@QAE@I@Z */
304 /* ??0id@locale@std@@QEAA@_K@Z */
305 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
306 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
308 TRACE("(%p %lu)\n", this, id
);
314 /* ??_Fid@locale@std@@QAEXXZ */
315 /* ??_Fid@locale@std@@QEAAXXZ */
316 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
317 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
319 TRACE("(%p)\n", this);
325 /* ??Bid@locale@std@@QAEIXZ */
326 /* ??Bid@locale@std@@QEAA_KXZ */
327 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
328 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
332 TRACE("(%p)\n", this);
335 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
336 this->id
= ++locale_id__Id_cnt
;
343 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
344 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
345 int* __cdecl
locale_id__Id_cnt_func(void)
348 return &locale_id__Id_cnt
;
351 /* ??_Ffacet@locale@std@@QAEXXZ */
352 /* ??_Ffacet@locale@std@@QEAAXXZ */
353 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
354 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
356 TRACE("(%p)\n", this);
357 this->vtable
= &MSVCP_locale_facet_vtable
;
362 /* ??0facet@locale@std@@IAE@I@Z */
363 /* ??0facet@locale@std@@IEAA@_K@Z */
364 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
365 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
367 TRACE("(%p %lu)\n", this, refs
);
368 this->vtable
= &MSVCP_locale_facet_vtable
;
373 /* ?_Incref@facet@locale@std@@QAEXXZ */
374 /* ?_Incref@facet@locale@std@@QEAAXXZ */
375 /* ?_Incref@facet@locale@std@@UAEXXZ */
376 /* ?_Incref@facet@locale@std@@UEAAXXZ */
377 #if _MSVCP_VER >= 110
378 #define call_locale_facet__Incref(this) CALL_VTBL_FUNC(this, 4, void, (locale_facet*), (this))
380 #define call_locale_facet__Incref locale_facet__Incref
382 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
383 void __thiscall
locale_facet__Incref(locale_facet
*this)
387 TRACE("(%p)\n", this);
389 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
394 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
395 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
396 /* ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ */
397 /* ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ */
398 #if _MSVCP_VER >= 110
399 #define call_locale_facet__Decref(this) CALL_VTBL_FUNC(this, 8, \
400 locale_facet*, (locale_facet*), (this))
402 #define call_locale_facet__Decref locale_facet__Decref
404 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
405 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
410 TRACE("(%p)\n", this);
412 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
416 ret
= this->refs
? NULL
: this;
422 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
423 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
424 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
426 TRACE("(%p %p)\n", facet
, loc
);
430 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@@Z */
431 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@@Z */
432 MSVCP_size_t __cdecl
locale_facet__Getcat_old(const locale_facet
**facet
)
434 TRACE("(%p)\n", facet
);
438 /* ??0_Timevec@std@@QAE@ABV01@@Z */
439 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
440 /* This copy constructor modifies copied object */
441 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
442 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
444 TRACE("(%p %p)\n", this, copy
);
445 this->timeptr
= copy
->timeptr
;
446 copy
->timeptr
= NULL
;
450 /* ??0_Timevec@std@@QAE@PAX@Z */
451 /* ??0_Timevec@std@@QEAA@PEAX@Z */
452 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
453 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
455 TRACE("(%p %p)\n", this, timeptr
);
456 this->timeptr
= timeptr
;
460 /* ??_F_Timevec@std@@QAEXXZ */
461 /* ??_F_Timevec@std@@QEAAXXZ */
462 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
463 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
465 TRACE("(%p)\n", this);
466 this->timeptr
= NULL
;
470 /* ??1_Timevec@std@@QAE@XZ */
471 /* ??1_Timevec@std@@QEAA@XZ */
472 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
473 void __thiscall
_Timevec_dtor(_Timevec
*this)
475 TRACE("(%p)\n", this);
479 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
480 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
481 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
482 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
484 TRACE("(%p %p)\n", this, right
);
485 this->timeptr
= right
->timeptr
;
486 right
->timeptr
= NULL
;
490 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
491 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
492 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
493 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
495 TRACE("(%p)\n", this);
496 return this->timeptr
;
499 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
500 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
501 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
503 const char *locale
= NULL
;
505 /* This function is probably modifying more global objects */
506 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
509 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
511 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
512 locale_string_char_ctor_cstr(&locinfo
->days
, "");
513 locale_string_char_ctor_cstr(&locinfo
->months
, "");
514 locale_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
517 locale
= setlocale(LC_ALL
, locstr
);
519 locale
= setlocale(LC_ALL
, NULL
);
522 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
524 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
529 /* ??0_Locinfo@std@@QAE@HPBD@Z */
530 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
531 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
532 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
534 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
537 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
538 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
539 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
541 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
544 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
545 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
546 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
547 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
549 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
552 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
553 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
554 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
556 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
559 /* ??0_Locinfo@std@@QAE@PBD@Z */
560 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
561 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
562 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
564 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
567 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
568 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
569 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
571 TRACE("(%p)\n", locinfo
);
573 setlocale(LC_ALL
, locale_string_char_c_str(&locinfo
->oldlocname
));
574 locale_string_char_dtor(&locinfo
->days
);
575 locale_string_char_dtor(&locinfo
->months
);
576 locale_string_char_dtor(&locinfo
->oldlocname
);
577 locale_string_char_dtor(&locinfo
->newlocname
);
578 _Lockit_dtor(&locinfo
->lock
);
581 /* ??_F_Locinfo@std@@QAEXXZ */
582 /* ??_F_Locinfo@std@@QEAAXXZ */
583 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
584 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
586 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
589 /* ??1_Locinfo@std@@QAE@XZ */
590 /* ??1_Locinfo@std@@QEAA@XZ */
591 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
592 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
594 _Locinfo__Locinfo_dtor(this);
597 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
598 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
599 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
601 const char *locale
= NULL
;
603 /* This function is probably modifying more global objects */
604 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
606 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
608 locale_string_char_dtor(&locinfo
->newlocname
);
611 locale
= setlocale(LC_ALL
, locstr
);
613 locale
= setlocale(LC_ALL
, NULL
);
616 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
618 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
623 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
624 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
625 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
626 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
628 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
632 ULONGLONG __cdecl
_Getcoll(void)
641 ret
.collvec
.page
= ___lc_collate_cp_func();
642 ret
.collvec
.handle
= ___lc_handle_func()[LC_COLLATE
];
646 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
647 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
648 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
649 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
651 ULONGLONG ull
= _Getcoll();
652 memcpy(ret
, &ull
, sizeof(ull
));
657 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
663 ret
->page
= ___lc_codepage_func();
665 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
667 /* FIXME: use ___lc_locale_name_func() */
671 table
= malloc(sizeof(short[256]));
672 if(!table
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
673 memcpy(table
, __pctype_func(), sizeof(short[256]));
678 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
679 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
680 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
681 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
683 return _Getctype(ret
);
687 ULONGLONG __cdecl
_Getcvt(void)
696 ret
.cvtvec
.page
= ___lc_codepage_func();
697 ret
.cvtvec
.handle
= ___lc_handle_func()[LC_CTYPE
];
701 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
702 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
703 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
704 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
706 ULONGLONG ull
= _Getcvt();
707 memcpy(ret
, &ull
, sizeof(ull
));
711 int __cdecl
_Getdateorder(void)
715 if(!GetLocaleInfoW(___lc_handle_func()[LC_TIME
], LOCALE_ILDATE
,
716 date_fmt
, sizeof(date_fmt
)/sizeof(*date_fmt
)))
717 return DATEORDER_no_order
;
719 if(*date_fmt
== '0') return DATEORDER_mdy
;
720 if(*date_fmt
== '1') return DATEORDER_dmy
;
721 if(*date_fmt
== '2') return DATEORDER_ymd
;
722 return DATEORDER_no_order
;
725 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
726 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
727 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
728 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
730 TRACE("(%p)\n", this);
731 return _Getdateorder();
734 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
735 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
736 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
737 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
739 char *days
= _Getdays();
742 TRACE("(%p)\n", this);
745 locale_string_char_dtor(&this->days
);
746 locale_string_char_ctor_cstr(&this->days
, days
);
750 ret
= locale_string_char_c_str(&this->days
);
751 if (!ret
[0]) ret
= ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
755 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
756 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
757 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
758 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
760 char *months
= _Getmonths();
763 TRACE("(%p)\n", this);
766 locale_string_char_dtor(&this->months
);
767 locale_string_char_ctor_cstr(&this->months
, months
);
771 ret
= locale_string_char_c_str(&this->months
);
772 if (!ret
[0]) ret
= ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
773 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
777 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
778 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
779 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
780 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
782 TRACE("(%p)\n", this);
786 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
787 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
788 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
789 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
791 TRACE("(%p)\n", this);
795 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
796 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
797 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
798 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
800 TRACE("(%p)\n", this);
804 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
805 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
806 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
807 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
809 TRACE("(%p)\n", this);
811 _Timevec_ctor_timeptr(ret
, _Gettnames());
815 /* ?id@?$collate@D@std@@2V0locale@2@A */
816 locale_id collate_char_id
= {0};
818 /* ??_7?$collate@D@std@@6B@ */
819 extern const vtable_ptr MSVCP_collate_char_vtable
;
821 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
822 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
823 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
824 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
826 TRACE("(%p %p)\n", this, locinfo
);
827 _Locinfo__Getcoll(locinfo
, &this->coll
);
830 /* ??0?$collate@D@std@@IAE@PBDI@Z */
831 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
832 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
833 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
837 TRACE("(%p %s %lu)\n", this, name
, refs
);
839 locale_facet_ctor_refs(&this->facet
, refs
);
840 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
842 _Locinfo_ctor_cstr(&locinfo
, name
);
843 collate_char__Init(this, &locinfo
);
844 _Locinfo_dtor(&locinfo
);
848 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
849 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
850 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
851 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
853 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
855 locale_facet_ctor_refs(&this->facet
, refs
);
856 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
857 collate_char__Init(this, locinfo
);
861 /* ??0?$collate@D@std@@QAE@I@Z */
862 /* ??0?$collate@D@std@@QEAA@_K@Z */
863 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
864 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
866 return collate_char_ctor_name(this, "C", refs
);
869 /* ??1?$collate@D@std@@UAE@XZ */
870 /* ??1?$collate@D@std@@UEAA@XZ */
871 /* ??1?$collate@D@std@@MAE@XZ */
872 /* ??1?$collate@D@std@@MEAA@XZ */
873 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
874 void __thiscall
collate_char_dtor(collate
*this)
876 TRACE("(%p)\n", this);
879 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
880 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
882 TRACE("(%p %x)\n", this, flags
);
884 /* we have an array, with the number of elements stored before the first object */
885 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
887 for(i
=*ptr
-1; i
>=0; i
--)
888 collate_char_dtor(this+i
);
889 MSVCRT_operator_delete(ptr
);
891 collate_char_dtor(this);
893 MSVCRT_operator_delete(this);
899 /* ??_F?$collate@D@std@@QAEXXZ */
900 /* ??_F?$collate@D@std@@QEAAXXZ */
901 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
902 collate
* __thiscall
collate_char_ctor(collate
*this)
904 return collate_char_ctor_name(this, "C", 0);
907 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
908 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
909 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
911 TRACE("(%p %p)\n", facet
, loc
);
913 if(facet
&& !*facet
) {
914 *facet
= MSVCRT_operator_new(sizeof(collate
));
916 ERR("Out of memory\n");
917 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
920 collate_char_ctor_name((collate
*)*facet
,
921 locale_string_char_c_str(&loc
->ptr
->name
), 0);
927 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
928 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
929 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
931 return collate_char__Getcat(facet
, locale_classic());
934 static collate
* collate_char_use_facet(const locale
*loc
)
936 static collate
*obj
= NULL
;
939 const locale_facet
*fac
;
941 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
942 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_char_id
));
945 return (collate
*)fac
;
953 collate_char__Getcat(&fac
, loc
);
955 call_locale_facet__Incref(&obj
->facet
);
956 locale_facet_register(&obj
->facet
);
963 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
964 const char *last2
, const _Collvec
*coll
)
968 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
973 lcid
= ___lc_handle_func()[LC_COLLATE
];
974 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
977 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
978 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
979 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
980 #if _MSVCP_VER <= 100
981 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
982 (const collate*, const char*, const char*, const char*, const char*), \
983 (this, first1, last1, first2, last2))
985 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
986 (const collate*, const char*, const char*, const char*, const char*), \
987 (this, first1, last1, first2, last2))
989 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
990 const char *last1
, const char *first2
, const char *last2
)
992 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
993 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
996 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
997 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
998 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
999 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
1000 const char *last1
, const char *first2
, const char *last2
)
1002 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1003 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
1006 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
1007 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
1008 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
1009 #if _MSVCP_VER <= 100
1010 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1011 (const collate*, const char*, const char*), (this, first, last))
1013 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1014 (const collate*, const char*, const char*), (this, first, last))
1016 LONG __thiscall
collate_char_do_hash(const collate
*this,
1017 const char *first
, const char *last
)
1021 TRACE("(%p %p %p)\n", this, first
, last
);
1023 for(; first
<last
; first
++)
1024 ret
= (ret
<<8 | ret
>>24) + *first
;
1028 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
1029 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
1030 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
1031 LONG __thiscall
collate_char_hash(const collate
*this,
1032 const char *first
, const char *last
)
1034 TRACE("(%p %p %p)\n", this, first
, last
);
1035 return call_collate_char_do_hash(this, first
, last
);
1038 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1039 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1040 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
1041 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
1042 basic_string_char
*ret
, const char *first
, const char *last
)
1044 FIXME("(%p %p %p) stub\n", this, first
, last
);
1048 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1049 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1050 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
1051 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
1052 basic_string_char
*ret
, const char *first
, const char *last
)
1054 FIXME("(%p %p %p) stub\n", this, first
, last
);
1058 /* ?id@?$collate@_W@std@@2V0locale@2@A */
1059 locale_id collate_wchar_id
= {0};
1060 /* ?id@?$collate@G@std@@2V0locale@2@A */
1061 locale_id collate_short_id
= {0};
1063 /* ??_7?$collate@_W@std@@6B@ */
1064 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
1065 /* ??_7?$collate@G@std@@6B@ */
1066 extern const vtable_ptr MSVCP_collate_short_vtable
;
1068 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
1069 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1070 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
1071 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1072 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
1073 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
1075 TRACE("(%p %p)\n", this, locinfo
);
1076 _Locinfo__Getcoll(locinfo
, &this->coll
);
1079 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
1080 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
1081 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
1082 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1086 TRACE("(%p %s %lu)\n", this, name
, refs
);
1088 locale_facet_ctor_refs(&this->facet
, refs
);
1089 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1091 _Locinfo_ctor_cstr(&locinfo
, name
);
1092 collate_wchar__Init(this, &locinfo
);
1093 _Locinfo_dtor(&locinfo
);
1097 /* ??0?$collate@G@std@@IAE@PBDI@Z */
1098 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
1099 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
1100 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1102 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
1103 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1107 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1108 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1109 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
1110 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1112 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1114 locale_facet_ctor_refs(&this->facet
, refs
);
1115 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1116 collate_wchar__Init(this, locinfo
);
1120 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
1121 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1122 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
1123 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1125 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
1126 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1130 /* ??0?$collate@_W@std@@QAE@I@Z */
1131 /* ??0?$collate@_W@std@@QEAA@_K@Z */
1132 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
1133 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
1135 return collate_wchar_ctor_name(this, "C", refs
);
1138 /* ??0?$collate@G@std@@QAE@I@Z */
1139 /* ??0?$collate@G@std@@QEAA@_K@Z */
1140 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1141 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
1143 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1144 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1148 /* ??1?$collate@G@std@@UAE@XZ */
1149 /* ??1?$collate@G@std@@UEAA@XZ */
1150 /* ??1?$collate@_W@std@@MAE@XZ */
1151 /* ??1?$collate@_W@std@@MEAA@XZ */
1152 /* ??1?$collate@G@std@@MAE@XZ */
1153 /* ??1?$collate@G@std@@MEAA@XZ */
1154 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1155 void __thiscall
collate_wchar_dtor(collate
*this)
1157 TRACE("(%p)\n", this);
1160 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1161 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1163 TRACE("(%p %x)\n", this, flags
);
1165 /* we have an array, with the number of elements stored before the first object */
1166 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1168 for(i
=*ptr
-1; i
>=0; i
--)
1169 collate_wchar_dtor(this+i
);
1170 MSVCRT_operator_delete(ptr
);
1172 collate_wchar_dtor(this);
1174 MSVCRT_operator_delete(this);
1180 /* ??_F?$collate@_W@std@@QAEXXZ */
1181 /* ??_F?$collate@_W@std@@QEAAXXZ */
1182 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1183 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1185 return collate_wchar_ctor_name(this, "C", 0);
1188 /* ??_F?$collate@G@std@@QAEXXZ */
1189 /* ??_F?$collate@G@std@@QEAAXXZ */
1190 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1191 collate
* __thiscall
collate_short_ctor(collate
*this)
1193 collate
*ret
= collate_wchar_ctor(this);
1194 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1198 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1199 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1200 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1202 TRACE("(%p %p)\n", facet
, loc
);
1204 if(facet
&& !*facet
) {
1205 *facet
= MSVCRT_operator_new(sizeof(collate
));
1207 ERR("Out of memory\n");
1208 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1211 collate_wchar_ctor_name((collate
*)*facet
,
1212 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1218 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1219 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1220 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1222 return collate_wchar__Getcat(facet
, locale_classic());
1225 static collate
* collate_wchar_use_facet(const locale
*loc
)
1227 static collate
*obj
= NULL
;
1230 const locale_facet
*fac
;
1232 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1233 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_wchar_id
));
1235 _Lockit_dtor(&lock
);
1236 return (collate
*)fac
;
1240 _Lockit_dtor(&lock
);
1244 collate_wchar__Getcat(&fac
, loc
);
1245 obj
= (collate
*)fac
;
1246 call_locale_facet__Incref(&obj
->facet
);
1247 locale_facet_register(&obj
->facet
);
1248 _Lockit_dtor(&lock
);
1253 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1254 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1255 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1257 if(facet
&& !*facet
) {
1258 collate_wchar__Getcat(facet
, loc
);
1259 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1265 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1266 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1267 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1269 return collate_short__Getcat(facet
, locale_classic());
1272 static collate
* collate_short_use_facet(const locale
*loc
)
1274 static collate
*obj
= NULL
;
1277 const locale_facet
*fac
;
1279 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1280 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_short_id
));
1282 _Lockit_dtor(&lock
);
1283 return (collate
*)fac
;
1287 _Lockit_dtor(&lock
);
1291 collate_short__Getcat(&fac
, loc
);
1292 obj
= (collate
*)fac
;
1293 call_locale_facet__Incref(&obj
->facet
);
1294 locale_facet_register(&obj
->facet
);
1295 _Lockit_dtor(&lock
);
1301 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1302 const wchar_t *last2
, const _Collvec
*coll
)
1306 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1309 lcid
= coll
->handle
;
1311 lcid
= ___lc_handle_func()[LC_COLLATE
];
1312 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1315 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1316 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1317 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1318 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1319 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1320 #if _MSVCP_VER <= 100
1321 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1322 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1323 (this, first1, last1, first2, last2))
1325 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1326 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1327 (this, first1, last1, first2, last2))
1329 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1330 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1332 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1333 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1336 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1337 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1338 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1339 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1340 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1341 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1342 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1344 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1345 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1348 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1349 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1350 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1351 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1352 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1353 #if _MSVCP_VER <= 100
1354 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1355 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1357 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1358 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1360 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1361 const wchar_t *first
, const wchar_t *last
)
1365 TRACE("(%p %p %p)\n", this, first
, last
);
1367 for(; first
<last
; first
++)
1368 ret
= (ret
<<8 | ret
>>24) + *first
;
1372 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1373 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1374 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1375 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1376 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1377 LONG __thiscall
collate_wchar_hash(const collate
*this,
1378 const wchar_t *first
, const wchar_t *last
)
1380 TRACE("(%p %p %p)\n", this, first
, last
);
1381 return call_collate_wchar_do_hash(this, first
, last
);
1384 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1385 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1386 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1387 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1388 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1389 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1390 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1392 FIXME("(%p %p %p) stub\n", this, first
, last
);
1396 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1397 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1398 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1399 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1400 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1401 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1402 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1404 FIXME("(%p %p %p) stub\n", this, first
, last
);
1408 /* ??_7ctype_base@std@@6B@ */
1409 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1411 /* ??0ctype_base@std@@QAE@I@Z */
1412 /* ??0ctype_base@std@@QEAA@_K@Z */
1413 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1414 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1416 TRACE("(%p %lu)\n", this, refs
);
1417 locale_facet_ctor_refs(&this->facet
, refs
);
1418 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1422 /* ??_Fctype_base@std@@QAEXXZ */
1423 /* ??_Fctype_base@std@@QEAAXXZ */
1424 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1425 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1427 TRACE("(%p)\n", this);
1428 locale_facet_ctor_refs(&this->facet
, 0);
1429 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1433 /* ??1ctype_base@std@@UAE@XZ */
1434 /* ??1ctype_base@std@@UEAA@XZ */
1435 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1436 void __thiscall
ctype_base_dtor(ctype_base
*this)
1438 TRACE("(%p)\n", this);
1441 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1442 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1444 TRACE("(%p %x)\n", this, flags
);
1446 /* we have an array, with the number of elements stored before the first object */
1447 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1449 for(i
=*ptr
-1; i
>=0; i
--)
1450 ctype_base_dtor(this+i
);
1451 MSVCRT_operator_delete(ptr
);
1453 ctype_base_dtor(this);
1455 MSVCRT_operator_delete(this);
1461 /* ?_Xran@ctype_base@std@@KAXXZ */
1462 void __cdecl
ctype_base__Xran(void)
1464 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1467 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1468 locale_id ctype_char_id
= {0};
1469 /* ?table_size@?$ctype@D@std@@2IB */
1470 /* ?table_size@?$ctype@D@std@@2_KB */
1471 MSVCP_size_t ctype_char_table_size
= 256;
1473 /* ??_7?$ctype@D@std@@6B@ */
1474 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1476 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1477 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1478 locale_id
* __cdecl
ctype_char__Id_func(void)
1481 return &ctype_char_id
;
1484 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1485 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1486 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1487 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1489 TRACE("(%p %p)\n", this, locinfo
);
1490 _Locinfo__Getctype(locinfo
, &this->ctype
);
1493 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1494 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1495 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1496 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1498 TRACE("(%p)\n", this);
1500 if(this->ctype
.delfl
)
1501 free((short*)this->ctype
.table
);
1502 #if _MSVCP_VER >= 110
1503 free(this->ctype
.name
);
1507 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1508 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1509 const short* __cdecl
ctype_char_classic_table(void)
1514 ctype
= ctype_char_use_facet( locale_classic() );
1515 return ctype
->ctype
.table
;
1518 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1519 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1520 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1521 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1522 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1524 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1525 ctype_base_ctor_refs(&this->base
, refs
);
1526 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1527 ctype_char__Init(this, locinfo
);
1531 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1532 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1533 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1534 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1535 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1539 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1541 ctype_base_ctor_refs(&this->base
, refs
);
1542 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1544 _Locinfo_ctor(&locinfo
);
1545 ctype_char__Init(this, &locinfo
);
1546 _Locinfo_dtor(&locinfo
);
1549 ctype_char__Tidy(this);
1550 this->ctype
.table
= table
;
1551 this->ctype
.delfl
= delete;
1556 /* ??_F?$ctype@D@std@@QAEXXZ */
1557 /* ??_F?$ctype@D@std@@QEAAXXZ */
1558 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1559 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1561 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1564 /* ??1?$ctype@D@std@@UAE@XZ */
1565 /* ??1?$ctype@D@std@@UEAA@XZ */
1566 /* ??1?$ctype@D@std@@MAE@XZ */
1567 /* ??1?$ctype@D@std@@MEAA@XZ */
1568 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1569 void __thiscall
ctype_char_dtor(ctype_char
*this)
1571 TRACE("(%p)\n", this);
1572 ctype_char__Tidy(this);
1575 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1576 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1578 TRACE("(%p %x)\n", this, flags
);
1580 /* we have an array, with the number of elements stored before the first object */
1581 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1583 for(i
=*ptr
-1; i
>=0; i
--)
1584 ctype_char_dtor(this+i
);
1585 MSVCRT_operator_delete(ptr
);
1587 ctype_char_dtor(this);
1589 MSVCRT_operator_delete(this);
1595 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1596 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1597 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1598 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1599 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1600 char, (const ctype_char*, char, char), (this, ch, unused))
1601 #elif _MSVCP_VER <= 100
1602 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1603 char, (const ctype_char*, char, char), (this, ch, unused))
1605 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 40, \
1606 char, (const ctype_char*, char, char), (this, ch, unused))
1608 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1610 TRACE("(%p %c %c)\n", this, ch
, unused
);
1614 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1615 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1616 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1617 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1618 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1619 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1620 (this, first, last, unused, dest))
1621 #elif _MSVCP_VER <= 100
1622 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1623 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1624 (this, first, last, unused, dest))
1626 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 36, \
1627 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1628 (this, first, last, unused, dest))
1630 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1631 const char *first
, const char *last
, char unused
, char *dest
)
1633 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1634 memcpy(dest
, first
, last
-first
);
1638 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1639 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1640 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1641 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1642 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1643 (this, first, last, unused, dest, size))
1644 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1645 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1647 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1648 memcpy_s(dest
, size
, first
, last
-first
);
1652 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1653 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1654 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1655 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1657 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1658 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1661 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1662 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1663 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1664 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1665 const char *first
, const char *last
, char dflt
, char *dest
)
1667 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1668 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1671 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1672 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1673 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1674 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1675 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1677 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1678 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1681 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1682 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1683 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1684 #if _MSVCP_VER <= 100
1685 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1686 char, (const ctype_char*, char), (this, ch))
1688 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
1689 char, (const ctype_char*, char), (this, ch))
1691 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1693 TRACE("(%p %c)\n", this, ch
);
1697 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1698 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1699 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1700 #if _MSVCP_VER <= 100
1701 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1702 const char*, (const ctype_char*, const char*, const char*, char*), \
1703 (this, first, last, dest))
1705 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 28, \
1706 const char*, (const ctype_char*, const char*, const char*, char*), \
1707 (this, first, last, dest))
1709 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1710 const char *first
, const char *last
, char *dest
)
1712 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1713 memcpy(dest
, first
, last
-first
);
1717 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1718 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1719 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1720 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1721 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1722 (this, first, last, dest, size))
1723 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1724 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1726 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1727 memcpy_s(dest
, size
, first
, last
-first
);
1731 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1732 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1733 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1734 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1736 TRACE("(%p %c)\n", this, ch
);
1737 return call_ctype_char_do_widen_ch(this, ch
);
1740 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1741 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1742 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1743 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1744 const char *first
, const char *last
, char *dest
)
1746 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1747 return call_ctype_char_do_widen(this, first
, last
, dest
);
1750 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1751 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1752 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1753 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1754 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1756 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1757 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1760 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1761 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1762 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1764 TRACE("(%p %p)\n", facet
, loc
);
1766 if(facet
&& !*facet
) {
1769 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1771 ERR("Out of memory\n");
1772 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1776 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
1777 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1778 _Locinfo_dtor(&locinfo
);
1784 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1785 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1786 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1788 return ctype_char__Getcat(facet
, locale_classic());
1791 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1793 static ctype_char
*obj
= NULL
;
1796 const locale_facet
*fac
;
1798 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1799 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1801 _Lockit_dtor(&lock
);
1802 return (ctype_char
*)fac
;
1806 _Lockit_dtor(&lock
);
1810 ctype_char__Getcat(&fac
, loc
);
1811 obj
= (ctype_char
*)fac
;
1812 call_locale_facet__Incref(&obj
->base
.facet
);
1813 locale_facet_register(&obj
->base
.facet
);
1814 _Lockit_dtor(&lock
);
1820 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1824 TRACE("%d %p\n", ch
, ctype
);
1829 cp
= ___lc_codepage_func();
1831 /* Don't convert to unicode in case of C locale */
1833 if(ch
>='A' && ch
<='Z')
1842 str
[0] = (ch
>>8) & 255;
1850 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1853 lower
= tolowerW(wide
);
1857 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1859 return str
[0] + (str
[1]<<8);
1863 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1864 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1865 #if _MSVCP_VER <= 100
1866 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1867 char, (const ctype_char*, char), (this, ch))
1869 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1870 char, (const ctype_char*, char), (this, ch))
1872 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1873 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1875 TRACE("(%p %c)\n", this, ch
);
1876 return _Tolower(ch
, &this->ctype
);
1879 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1880 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1881 #if _MSVCP_VER <= 100
1882 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1883 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1885 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 12, \
1886 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1888 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1889 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1891 TRACE("(%p %p %p)\n", this, first
, last
);
1892 for(; first
<last
; first
++)
1893 *first
= _Tolower(*first
, &this->ctype
);
1897 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1898 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1899 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1900 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1902 TRACE("(%p %c)\n", this, ch
);
1903 return call_ctype_char_do_tolower_ch(this, ch
);
1906 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1907 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1908 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1909 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1911 TRACE("(%p %p %p)\n", this, first
, last
);
1912 return call_ctype_char_do_tolower(this, first
, last
);
1916 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1920 TRACE("%d %p\n", ch
, ctype
);
1925 cp
= ___lc_codepage_func();
1927 /* Don't convert to unicode in case of C locale */
1929 if(ch
>='a' && ch
<='z')
1938 str
[0] = (ch
>>8) & 255;
1946 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1949 upper
= toupperW(wide
);
1953 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1955 return str
[0] + (str
[1]<<8);
1959 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1960 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1961 #if _MSVCP_VER <= 100
1962 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1963 char, (const ctype_char*, char), (this, ch))
1965 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1966 char, (const ctype_char*, char), (this, ch))
1968 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1969 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1971 TRACE("(%p %c)\n", this, ch
);
1972 return _Toupper(ch
, &this->ctype
);
1975 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1976 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1977 #if _MSVCP_VER <= 100
1978 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1979 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1981 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 20, \
1982 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1984 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
1985 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
1986 char *first
, const char *last
)
1988 TRACE("(%p %p %p)\n", this, first
, last
);
1989 for(; first
<last
; first
++)
1990 *first
= _Toupper(*first
, &this->ctype
);
1994 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1995 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1996 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
1997 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
1999 TRACE("(%p %c)\n", this, ch
);
2000 return call_ctype_char_do_toupper_ch(this, ch
);
2003 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
2004 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2005 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
2006 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
2008 TRACE("(%p %p %p)\n", this, first
, last
);
2009 return call_ctype_char_do_toupper(this, first
, last
);
2012 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
2013 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
2014 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
2015 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
2017 TRACE("(%p %x %c)\n", this, mask
, ch
);
2018 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
2021 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
2022 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
2023 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
2024 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
2026 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2027 for(; first
<last
; first
++)
2028 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
2032 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
2033 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2034 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
2035 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2037 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2038 for(; first
<last
; first
++)
2039 if(!ctype_char_is_ch(this, mask
, *first
))
2044 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
2045 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2046 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
2047 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2049 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2050 for(; first
<last
; first
++)
2051 if(ctype_char_is_ch(this, mask
, *first
))
2056 /* ?table@?$ctype@D@std@@IBEPBFXZ */
2057 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
2058 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
2059 const short* __thiscall
ctype_char_table(const ctype_char
*this)
2061 TRACE("(%p)\n", this);
2062 return this->ctype
.table
;
2065 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
2066 locale_id ctype_wchar_id
= {0};
2067 /* ?id@?$ctype@G@std@@2V0locale@2@A */
2068 locale_id ctype_short_id
= {0};
2070 /* ??_7?$ctype@_W@std@@6B@ */
2071 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
2072 /* ??_7?$ctype@G@std@@6B@ */
2073 extern const vtable_ptr MSVCP_ctype_short_vtable
;
2075 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
2076 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
2077 locale_id
* __cdecl
ctype_wchar__Id_func(void)
2080 return &ctype_wchar_id
;
2083 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
2084 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
2085 locale_id
* __cdecl
ctype_short__Id_func(void)
2088 return &ctype_short_id
;
2091 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
2092 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
2093 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
2094 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
2095 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
2096 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
2098 TRACE("(%p %p)\n", this, locinfo
);
2099 _Locinfo__Getctype(locinfo
, &this->ctype
);
2100 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2103 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
2104 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2105 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
2106 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
2107 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2109 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2110 ctype_base_ctor_refs(&this->base
, refs
);
2111 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2112 ctype_wchar__Init(this, locinfo
);
2116 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
2117 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2118 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
2119 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
2120 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2122 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
2123 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2127 /* ??0?$ctype@_W@std@@QAE@I@Z */
2128 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
2129 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
2130 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2134 TRACE("(%p %lu)\n", this, refs
);
2136 ctype_base_ctor_refs(&this->base
, refs
);
2137 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2139 _Locinfo_ctor(&locinfo
);
2140 ctype_wchar__Init(this, &locinfo
);
2141 _Locinfo_dtor(&locinfo
);
2145 /* ??0?$ctype@G@std@@QAE@I@Z */
2146 /* ??0?$ctype@G@std@@QEAA@_K@Z */
2147 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
2148 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2150 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
2151 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2155 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
2156 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
2157 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
2158 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
2159 const char *name
, MSVCP_size_t refs
)
2163 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
2165 ctype_base_ctor_refs(&this->base
, refs
);
2166 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2168 _Locinfo_ctor_cstr(&locinfo
, name
);
2169 ctype_wchar__Init(this, &locinfo
);
2170 _Locinfo_dtor(&locinfo
);
2174 /* ??_F?$ctype@_W@std@@QAEXXZ */
2175 /* ??_F?$ctype@_W@std@@QEAAXXZ */
2176 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
2177 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
2179 TRACE("(%p)\n", this);
2180 return ctype_short_ctor_refs(this, 0);
2183 /* ??_F?$ctype@G@std@@QAEXXZ */
2184 /* ??_F?$ctype@G@std@@QEAAXXZ */
2185 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
2186 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
2188 ctype_wchar
*ret
= ctype_wchar_ctor(this);
2189 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2193 /* ??1?$ctype@G@std@@UAE@XZ */
2194 /* ??1?$ctype@G@std@@UEAA@XZ */
2195 /* ??1?$ctype@_W@std@@MAE@XZ */
2196 /* ??1?$ctype@_W@std@@MEAA@XZ */
2197 /* ??1?$ctype@G@std@@MAE@XZ */
2198 /* ??1?$ctype@G@std@@MEAA@XZ */
2199 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
2200 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
2202 TRACE("(%p)\n", this);
2203 if(this->ctype
.delfl
)
2204 free((void*)this->ctype
.table
);
2205 #if _MSVCP_VER >= 110
2206 free(this->ctype
.name
);
2210 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
2211 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
2213 TRACE("(%p %x)\n", this, flags
);
2215 /* we have an array, with the number of elements stored before the first object */
2216 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2218 for(i
=*ptr
-1; i
>=0; i
--)
2219 ctype_wchar_dtor(this+i
);
2220 MSVCRT_operator_delete(ptr
);
2222 ctype_wchar_dtor(this);
2224 MSVCRT_operator_delete(this);
2231 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
2236 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
2241 cp
= ___lc_codepage_func();
2253 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
2262 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
2263 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
2264 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
2265 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
2266 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
2267 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2269 char buf
[MB_LEN_MAX
];
2271 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2273 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
2276 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
2277 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
2278 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
2279 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
2280 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
2281 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2282 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
2283 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2284 #elif _MSVCP_VER <= 100
2285 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
2286 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2288 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 56, \
2289 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2291 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2293 return ctype_wchar__Donarrow(this, ch
, dflt
);
2296 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
2297 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2298 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2299 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2300 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2301 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2302 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
2303 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2304 (this, first, last, dflt, dest))
2305 #elif _MSVCP_VER <= 100
2306 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2307 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2308 (this, first, last, dflt, dest))
2310 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 52, \
2311 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2312 (this, first, last, dflt, dest))
2314 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2315 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2317 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2318 for(; first
<last
; first
++)
2319 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2323 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2324 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2325 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2326 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2327 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2328 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2329 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2330 (this, first, last, dflt, dest, size))
2331 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2332 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2334 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2335 /* This function converts all multi-byte characters to dflt,
2336 * thanks to it result size is known before converting */
2337 if(last
-first
> size
)
2339 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2342 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2343 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2344 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2345 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2346 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2347 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2349 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2350 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2353 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2354 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2355 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2356 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2357 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2358 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2359 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2361 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2362 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2365 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2366 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2367 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2368 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2369 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2370 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2371 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2373 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2374 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2378 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
2384 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2392 cp
= ___lc_codepage_func();
2396 *out
= (unsigned char)*in
;
2403 ((char*)state
)[1] = *in
;
2405 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
2415 GetCPInfo(cp
, &cp_info
);
2417 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2418 if(!cp_info
.LeadByte
[i
+1])
2420 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2428 *state
= (unsigned char)*in
;
2432 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2439 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2446 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
2451 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
2454 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2455 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2456 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2457 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2458 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2459 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2463 TRACE("(%p %d)\n", this, ch
);
2464 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2467 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2468 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2469 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2470 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2471 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2472 #if _MSVCP_VER <= 100
2473 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2474 wchar_t, (const ctype_wchar*, char), (this, ch))
2476 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 48, \
2477 wchar_t, (const ctype_wchar*, char), (this, ch))
2479 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2481 return ctype_wchar__Dowiden(this, ch
);
2484 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2485 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2486 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2487 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2488 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2489 #if _MSVCP_VER <= 100
2490 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2491 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2492 (this, first, last, dest))
2494 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 44, \
2495 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2496 (this, first, last, dest))
2498 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2499 const char *first
, const char *last
, wchar_t *dest
)
2501 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2502 for(; first
<last
; first
++)
2503 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2507 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2508 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2509 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2510 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2511 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2512 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2513 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2514 (this, first, last, dest, size))
2515 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2516 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2518 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2519 /* This function converts all multi-byte characters to WEOF,
2520 * thanks to it result size is known before converting */
2521 if(size
< last
-first
)
2523 return ctype_wchar_do_widen(this, first
, last
, dest
);
2526 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2527 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2528 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2529 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2530 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2531 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2533 TRACE("(%p %d)\n", this, ch
);
2534 return call_ctype_wchar_do_widen_ch(this, ch
);
2537 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2538 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2539 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2540 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2541 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2542 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2543 const char *first
, const char *last
, wchar_t *dest
)
2545 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2546 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2549 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2550 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2551 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2552 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2553 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2554 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2555 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2557 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2558 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2561 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2562 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2563 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2565 TRACE("(%p %p)\n", facet
, loc
);
2567 if(facet
&& !*facet
) {
2570 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2572 ERR("Out of memory\n");
2573 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2577 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
2578 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2579 _Locinfo_dtor(&locinfo
);
2585 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2586 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2587 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2589 return ctype_wchar__Getcat(facet
, locale_classic());
2592 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2593 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2594 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2596 if(facet
&& !*facet
) {
2597 ctype_wchar__Getcat(facet
, loc
);
2598 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2604 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2605 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2606 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2608 return ctype_short__Getcat(facet
, locale_classic());
2612 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2614 TRACE("(%d %p)\n", ch
, ctype
);
2615 return tolowerW(ch
);
2618 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2620 static ctype_wchar
*obj
= NULL
;
2623 const locale_facet
*fac
;
2625 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2626 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2628 _Lockit_dtor(&lock
);
2629 return (ctype_wchar
*)fac
;
2633 _Lockit_dtor(&lock
);
2637 ctype_wchar__Getcat(&fac
, loc
);
2638 obj
= (ctype_wchar
*)fac
;
2639 call_locale_facet__Incref(&obj
->base
.facet
);
2640 locale_facet_register(&obj
->base
.facet
);
2641 _Lockit_dtor(&lock
);
2646 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2648 static ctype_wchar
*obj
= NULL
;
2651 const locale_facet
*fac
;
2653 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2654 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2656 _Lockit_dtor(&lock
);
2657 return (ctype_wchar
*)fac
;
2661 _Lockit_dtor(&lock
);
2665 ctype_short__Getcat(&fac
, loc
);
2666 obj
= (ctype_wchar
*)fac
;
2667 call_locale_facet__Incref(&obj
->base
.facet
);
2668 locale_facet_register(&obj
->base
.facet
);
2669 _Lockit_dtor(&lock
);
2674 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2675 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2676 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2677 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2678 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2679 #if _MSVCP_VER <= 100
2680 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2681 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2683 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2684 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2686 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2688 return _Towlower(ch
, &this->ctype
);
2691 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2692 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2693 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2694 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2695 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2696 #if _MSVCP_VER <= 100
2697 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2698 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2699 (this, first, last))
2701 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 28, \
2702 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2703 (this, first, last))
2705 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2706 wchar_t *first
, const wchar_t *last
)
2708 TRACE("(%p %p %p)\n", this, first
, last
);
2709 for(; first
<last
; first
++)
2710 *first
= _Towlower(*first
, &this->ctype
);
2714 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2715 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2716 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2717 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2718 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2719 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2721 TRACE("(%p %d)\n", this, ch
);
2722 return call_ctype_wchar_do_tolower_ch(this, ch
);
2725 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2726 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2727 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2728 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2729 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2730 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2731 wchar_t *first
, const wchar_t *last
)
2733 TRACE("(%p %p %p)\n", this, first
, last
);
2734 return call_ctype_wchar_do_tolower(this, first
, last
);
2738 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2740 TRACE("(%d %p)\n", ch
, ctype
);
2741 return toupperW(ch
);
2744 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2745 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2746 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2747 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2748 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2749 #if _MSVCP_VER <= 100
2750 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2751 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2753 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2754 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2756 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2758 return _Towupper(ch
, &this->ctype
);
2761 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2762 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2763 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2764 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2765 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2766 #if _MSVCP_VER <= 100
2767 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2768 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2769 (this, first, last))
2771 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 36, \
2772 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2773 (this, first, last))
2775 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2776 wchar_t *first
, const wchar_t *last
)
2778 TRACE("(%p %p %p)\n", this, first
, last
);
2779 for(; first
<last
; first
++)
2780 *first
= _Towupper(*first
, &this->ctype
);
2784 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2785 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2786 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2787 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2788 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2789 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2791 TRACE("(%p %d)\n", this, ch
);
2792 return call_ctype_wchar_do_toupper_ch(this, ch
);
2795 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2796 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2797 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2798 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2799 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2800 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2801 wchar_t *first
, const wchar_t *last
)
2803 TRACE("(%p %p %p)\n", this, first
, last
);
2804 return call_ctype_wchar_do_toupper(this, first
, last
);
2808 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2809 short *mask
, const _Ctypevec
*ctype
)
2811 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2812 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2817 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2820 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2824 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2825 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2826 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2827 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2828 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2829 #if _MSVCP_VER <= 100
2830 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2831 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2833 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 16, \
2834 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2836 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2838 TRACE("(%p %x %d)\n", this, mask
, ch
);
2839 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2842 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2843 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2844 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2845 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2846 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2847 #if _MSVCP_VER <= 100
2848 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2849 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2850 (this, first, last, dest))
2852 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 12, \
2853 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2854 (this, first, last, dest))
2856 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2857 const wchar_t *first
, const wchar_t *last
, short *dest
)
2859 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2860 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2863 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2864 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2865 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2866 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2867 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2868 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2870 TRACE("(%p %x %d)\n", this, mask
, ch
);
2871 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2874 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2875 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2876 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2877 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2878 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2879 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2880 const wchar_t *first
, const wchar_t *last
, short *dest
)
2882 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2883 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2886 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2887 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2888 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2889 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2890 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2891 #if _MSVCP_VER <= 100
2892 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2893 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2894 (this, mask, first, last))
2896 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 20, \
2897 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2898 (this, mask, first, last))
2900 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2901 short mask
, const wchar_t *first
, const wchar_t *last
)
2903 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2904 for(; first
<last
; first
++)
2905 if(!ctype_wchar_is_ch(this, mask
, *first
))
2910 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2911 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2912 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2913 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2914 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2915 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2916 short mask
, const wchar_t *first
, const wchar_t *last
)
2918 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2919 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2922 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2923 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2924 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2925 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2926 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2927 #if _MSVCP_VER <= 100
2928 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2929 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2930 (this, mask, first, last))
2932 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 24, \
2933 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2934 (this, mask, first, last))
2936 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2937 short mask
, const wchar_t *first
, const wchar_t *last
)
2939 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2940 for(; first
<last
; first
++)
2941 if(ctype_wchar_is_ch(this, mask
, *first
))
2946 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2947 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2948 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2949 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2950 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2951 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2952 short mask
, const wchar_t *first
, const wchar_t *last
)
2954 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2955 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2958 /* ??_7codecvt_base@std@@6B@ */
2959 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2961 /* ??0codecvt_base@std@@QAE@I@Z */
2962 /* ??0codecvt_base@std@@QEAA@_K@Z */
2963 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2964 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2966 TRACE("(%p %lu)\n", this, refs
);
2967 locale_facet_ctor_refs(&this->facet
, refs
);
2968 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2972 /* ??_Fcodecvt_base@std@@QAEXXZ */
2973 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2974 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
2975 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
2977 return codecvt_base_ctor_refs(this, 0);
2980 /* ??1codecvt_base@std@@UAE@XZ */
2981 /* ??1codecvt_base@std@@UEAA@XZ */
2982 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
2983 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
2985 TRACE("(%p)\n", this);
2986 locale_facet_dtor(&this->facet
);
2989 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
2990 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
2992 TRACE("(%p %x)\n", this, flags
);
2994 /* we have an array, with the number of elements stored before the first object */
2995 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2997 for(i
=*ptr
-1; i
>=0; i
--)
2998 codecvt_base_dtor(this+i
);
2999 MSVCRT_operator_delete(ptr
);
3001 codecvt_base_dtor(this);
3003 MSVCRT_operator_delete(this);
3009 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
3010 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
3011 #if _MSVCP_VER <= 100
3012 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
3013 MSVCP_bool, (const codecvt_base*), (this))
3015 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 12, \
3016 MSVCP_bool, (const codecvt_base*), (this))
3018 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
3019 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
3021 TRACE("(%p)\n", this);
3025 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
3026 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
3027 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
3028 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
3030 TRACE("(%p)\n", this);
3031 return call_codecvt_base_do_always_noconv(this);
3034 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
3035 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
3036 #if _MSVCP_VER <= 100
3037 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
3038 int, (const codecvt_base*), (this))
3040 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 16, \
3041 int, (const codecvt_base*), (this))
3043 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
3044 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
3046 TRACE("(%p)\n", this);
3050 /* ?max_length@codecvt_base@std@@QBEHXZ */
3051 /* ?max_length@codecvt_base@std@@QEBAHXZ */
3052 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
3053 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
3055 TRACE("(%p)\n", this);
3056 return call_codecvt_base_do_max_length(this);
3059 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
3060 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
3061 #if _MSVCP_VER <= 100
3062 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
3063 int, (const codecvt_base*), (this))
3065 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 20, \
3066 int, (const codecvt_base*), (this))
3068 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
3069 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
3071 TRACE("(%p)\n", this);
3075 /* ?encoding@codecvt_base@std@@QBEHXZ */
3076 /* ?encoding@codecvt_base@std@@QEBAHXZ */
3077 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
3078 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
3080 TRACE("(%p)\n", this);
3081 return call_codecvt_base_do_encoding(this);
3084 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
3085 locale_id codecvt_char_id
= {0};
3087 /* ??_7?$codecvt@DDH@std@@6B@ */
3088 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
3090 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
3091 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3092 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
3093 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
3095 TRACE("(%p %p)\n", this, locinfo
);
3098 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
3099 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3100 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
3101 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3103 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
3104 codecvt_base_ctor_refs(&this->base
, refs
);
3105 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
3109 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
3110 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
3111 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
3112 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
3114 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
3117 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
3118 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
3119 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
3120 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
3122 return codecvt_char_ctor_locinfo(this, NULL
, 0);
3125 /* ??1?$codecvt@DDH@std@@UAE@XZ */
3126 /* ??1?$codecvt@DDH@std@@UEAA@XZ */
3127 /* ??1?$codecvt@DDH@std@@MAE@XZ */
3128 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
3129 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
3130 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
3132 TRACE("(%p)\n", this);
3133 codecvt_base_dtor(&this->base
);
3136 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
3137 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
3139 TRACE("(%p %x)\n", this, flags
);
3141 /* we have an array, with the number of elements stored before the first object */
3142 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3144 for(i
=*ptr
-1; i
>=0; i
--)
3145 codecvt_char_dtor(this+i
);
3146 MSVCRT_operator_delete(ptr
);
3148 codecvt_char_dtor(this);
3150 MSVCRT_operator_delete(this);
3156 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3157 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3158 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3160 TRACE("(%p %p)\n", facet
, loc
);
3162 if(facet
&& !*facet
) {
3163 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
3165 ERR("Out of memory\n");
3166 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3169 codecvt_char_ctor((codecvt_char
*)*facet
);
3175 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
3176 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3177 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
3179 return codecvt_char__Getcat(facet
, locale_classic());
3182 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
3184 static codecvt_char
*obj
= NULL
;
3187 const locale_facet
*fac
;
3189 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3190 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
3192 _Lockit_dtor(&lock
);
3193 return (codecvt_char
*)fac
;
3197 _Lockit_dtor(&lock
);
3201 codecvt_char__Getcat(&fac
, loc
);
3202 obj
= (codecvt_char
*)fac
;
3203 call_locale_facet__Incref(&obj
->base
.facet
);
3204 locale_facet_register(&obj
->base
.facet
);
3205 _Lockit_dtor(&lock
);
3210 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3211 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3212 #if _MSVCP_VER <= 100
3213 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3214 CALL_VTBL_FUNC(this, 16, int, \
3215 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3216 (this, state, from, from_end, from_next, to, to_end, to_next))
3218 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3219 CALL_VTBL_FUNC(this, 24, int, \
3220 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3221 (this, state, from, from_end, from_next, to, to_end, to_next))
3223 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
3224 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
3225 const char *from
, const char *from_end
, const char **from_next
,
3226 char *to
, char *to_end
, char **to_next
)
3228 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3229 from_next
, to
, to_end
, to_next
);
3232 return CODECVT_noconv
;
3235 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3236 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3237 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
3238 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
3239 const char *from
, const char *from_end
, const char **from_next
,
3240 char *to
, char *to_end
, char **to_next
)
3242 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3243 from_next
, to
, to_end
, to_next
);
3244 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
3245 to
, to_end
, to_next
);
3248 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3249 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3250 #if _MSVCP_VER <= 100
3251 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3252 CALL_VTBL_FUNC(this, 20, int, \
3253 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3254 (this, state, from, from_end, from_next, to, to_end, to_next))
3256 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3257 CALL_VTBL_FUNC(this, 28, int, \
3258 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3259 (this, state, from, from_end, from_next, to, to_end, to_next))
3261 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
3262 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
3263 const char *from
, const char *from_end
, const char **from_next
,
3264 char *to
, char *to_end
, char **to_next
)
3266 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3267 from_end
, from_next
, to
, to_end
, to_next
);
3270 return CODECVT_noconv
;
3273 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3274 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3275 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
3276 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
3277 const char *from
, const char *from_end
, const char **from_next
,
3278 char *to
, char *to_end
, char **to_next
)
3280 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3281 from_next
, to
, to_end
, to_next
);
3282 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
3283 to
, to_end
, to_next
);
3286 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
3287 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3288 #if _MSVCP_VER <= 100
3289 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3290 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3292 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3293 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3295 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
3296 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
3297 int *state
, char *to
, char *to_end
, char **to_next
)
3299 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3301 return CODECVT_noconv
;
3304 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
3305 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3306 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
3307 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
3308 int *state
, char *to
, char *to_end
, char **to_next
)
3310 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3311 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
3314 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
3315 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
3316 #if _MSVCP_VER <= 100
3317 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3318 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3319 (this, state, from, from_end, max))
3321 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3322 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3323 (this, state, from, from_end, max))
3325 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
3326 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
3327 const char *from
, const char *from_end
, MSVCP_size_t max
)
3329 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3330 return (from_end
-from
> max
? max
: from_end
-from
);
3333 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
3334 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
3335 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
3336 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
3337 const char *from
, const char *from_end
, MSVCP_size_t max
)
3339 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3340 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
3343 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
3344 locale_id codecvt_wchar_id
= {0};
3345 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
3346 locale_id codecvt_short_id
= {0};
3348 /* ??_7?$codecvt@_WDH@std@@6B@ */
3349 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
3350 /* ??_7?$codecvt@GDH@std@@6B@ */
3351 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
3353 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
3354 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3355 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
3356 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3357 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
3358 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
3360 TRACE("(%p %p)\n", this, locinfo
);
3361 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3364 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
3365 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3366 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
3367 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3369 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3371 codecvt_base_ctor_refs(&this->base
, refs
);
3372 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
3374 codecvt_wchar__Init(this, locinfo
);
3378 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
3379 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3380 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
3381 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3383 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3385 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
3386 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
3390 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
3391 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
3392 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
3393 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3397 TRACE("(%p %ld)\n", this, refs
);
3399 _Locinfo_ctor(&locinfo
);
3400 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
3401 _Locinfo_dtor(&locinfo
);
3405 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
3406 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
3407 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
3408 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3412 TRACE("(%p %ld)\n", this, refs
);
3414 _Locinfo_ctor(&locinfo
);
3415 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3416 _Locinfo_dtor(&locinfo
);
3420 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
3421 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
3422 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
3423 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
3427 TRACE("(%p %s %ld)\n", this, name
, refs
);
3429 _Locinfo_ctor_cstr(&locinfo
, name
);
3430 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3431 _Locinfo_dtor(&locinfo
);
3435 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3436 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3437 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3438 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3440 return codecvt_wchar_ctor_refs(this, 0);
3443 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3444 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3445 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3446 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3448 return codecvt_short_ctor_refs(this, 0);
3451 /* ??1?$codecvt@GDH@std@@UAE@XZ */
3452 /* ??1?$codecvt@GDH@std@@UEAA@XZ */
3453 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3454 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3455 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3456 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3457 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3458 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3460 TRACE("(%p)\n", this);
3461 codecvt_base_dtor(&this->base
);
3464 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3465 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3467 TRACE("(%p %x)\n", this, flags
);
3469 /* we have an array, with the number of elements stored before the first object */
3470 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3472 for(i
=*ptr
-1; i
>=0; i
--)
3473 codecvt_wchar_dtor(this+i
);
3474 MSVCRT_operator_delete(ptr
);
3476 codecvt_wchar_dtor(this);
3478 MSVCRT_operator_delete(this);
3484 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3485 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3486 MSVCP_size_t __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3488 TRACE("(%p %p)\n", facet
, loc
);
3490 if(facet
&& !*facet
) {
3493 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3495 ERR("Out of memory\n");
3496 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3500 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3501 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3502 _Locinfo_dtor(&locinfo
);
3508 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
3509 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3510 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
3512 return codecvt_wchar__Getcat(facet
, locale_classic());
3515 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3517 static codecvt_wchar
*obj
= NULL
;
3520 const locale_facet
*fac
;
3522 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3523 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3525 _Lockit_dtor(&lock
);
3526 return (codecvt_wchar
*)fac
;
3530 _Lockit_dtor(&lock
);
3534 codecvt_wchar__Getcat(&fac
, loc
);
3535 obj
= (codecvt_wchar
*)fac
;
3536 call_locale_facet__Incref(&obj
->base
.facet
);
3537 locale_facet_register(&obj
->base
.facet
);
3538 _Lockit_dtor(&lock
);
3543 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3544 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3545 MSVCP_size_t __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3547 TRACE("(%p %p)\n", facet
, loc
);
3549 if(facet
&& !*facet
) {
3552 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3554 ERR("Out of memory\n");
3555 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3559 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3560 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3561 _Locinfo_dtor(&locinfo
);
3567 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
3568 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3569 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
3571 return codecvt_short__Getcat(facet
, locale_classic());
3574 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3576 static codecvt_wchar
*obj
= NULL
;
3579 const locale_facet
*fac
;
3581 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3582 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3584 _Lockit_dtor(&lock
);
3585 return (codecvt_wchar
*)fac
;
3589 _Lockit_dtor(&lock
);
3593 codecvt_short__Getcat(&fac
, loc
);
3594 obj
= (codecvt_wchar
*)fac
;
3595 call_locale_facet__Incref(&obj
->base
.facet
);
3596 locale_facet_register(&obj
->base
.facet
);
3597 _Lockit_dtor(&lock
);
3602 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3603 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3604 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3607 return &codecvt_wchar_id
;
3610 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3611 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3612 locale_id
* __cdecl
codecvt_short__Id_func(void)
3615 return &codecvt_short_id
;
3618 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3619 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3620 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3621 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3622 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3623 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3625 TRACE("(%p)\n", this);
3629 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3630 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3631 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3632 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3633 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3634 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3636 TRACE("(%p)\n", this);
3640 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3641 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3642 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3643 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3644 #if _MSVCP_VER <= 100
3645 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3646 CALL_VTBL_FUNC(this, 16, int, \
3647 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3648 (this, state, from, from_end, from_next, to, to_end, to_next))
3650 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3651 CALL_VTBL_FUNC(this, 24, int, \
3652 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3653 (this, state, from, from_end, from_next, to, to_end, to_next))
3655 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3656 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3657 const char *from
, const char *from_end
, const char **from_next
,
3658 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3660 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3661 from_end
, from_next
, to
, to_end
, to_next
);
3666 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3667 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3669 *from_next
= from_end
;
3670 return CODECVT_partial
;
3672 return CODECVT_error
;
3686 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3687 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3688 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3689 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3690 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3691 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3692 const char *from
, const char *from_end
, const char **from_next
,
3693 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3695 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3696 from_end
, from_next
, to
, to_end
, to_next
);
3697 return call_codecvt_wchar_do_in(this, state
, from
,
3698 from_end
, from_next
, to
, to_end
, to_next
);
3701 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3702 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3703 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3704 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3705 #if _MSVCP_VER <= 100
3706 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3707 CALL_VTBL_FUNC(this, 20, int, \
3708 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3709 (this, state, from, from_end, from_next, to, to_end, to_next))
3711 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3712 CALL_VTBL_FUNC(this, 28, int, \
3713 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3714 (this, state, from, from_end, from_next, to, to_end, to_next))
3716 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3717 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3718 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3719 char *to
, char *to_end
, char **to_next
)
3721 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3722 from_end
, from_next
, to
, to_end
, to_next
);
3727 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3728 int old_state
= *state
, size
;
3729 char buf
[MB_LEN_MAX
];
3731 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3733 return CODECVT_error
;
3735 if(size
> from_end
-*from_next
) {
3737 return CODECVT_partial
;
3741 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
3749 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3750 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3751 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3752 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3753 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3754 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3755 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3756 char *to
, char *to_end
, char **to_next
)
3758 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3759 from_end
, from_next
, to
, to_end
, to_next
);
3760 return call_codecvt_wchar_do_out(this, state
, from
,
3761 from_end
, from_next
, to
, to_end
, to_next
);
3764 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3765 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3766 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3767 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3768 #if _MSVCP_VER <= 100
3769 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3770 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3772 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3773 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3775 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3776 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3777 int *state
, char *to
, char *to_end
, char **to_next
)
3779 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3781 WARN("unexpected state: %x\n", *state
);
3787 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3788 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3789 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3790 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3791 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3792 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3793 int *state
, char *to
, char *to_end
, char **to_next
)
3795 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3796 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3799 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3800 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3801 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3802 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3803 #if _MSVCP_VER <= 100
3804 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3805 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3806 (this, state, from, from_end, max))
3808 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3809 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3810 (this, state, from, from_end, max))
3812 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3813 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3814 const char *from
, const char *from_end
, MSVCP_size_t max
)
3816 int tmp_state
= *state
, ret
=0;
3818 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3820 while(ret
<max
&& from
!=from_end
) {
3821 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3838 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3839 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3840 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3841 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3842 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3843 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3844 const char *from
, const char *from_end
, MSVCP_size_t max
)
3846 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3847 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3850 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3851 locale_id numpunct_char_id
= {0};
3853 /* ??_7?$numpunct@D@std@@6B@ */
3854 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3856 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3857 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3858 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
3859 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3863 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3865 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3866 this->false_name
= MSVCRT_operator_new(len
);
3867 if(this->false_name
)
3868 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3870 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3871 this->true_name
= MSVCRT_operator_new(len
);
3873 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3876 this->grouping
= MSVCRT_operator_new(1);
3878 *(char*)this->grouping
= 0;
3883 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3885 len
= strlen(lc
->grouping
)+1;
3886 this->grouping
= MSVCRT_operator_new(len
);
3888 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3890 this->dp
= lc
->decimal_point
[0];
3891 this->sep
= lc
->thousands_sep
[0];
3894 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3895 MSVCRT_operator_delete((char*)this->grouping
);
3896 MSVCRT_operator_delete((char*)this->false_name
);
3897 MSVCRT_operator_delete((char*)this->true_name
);
3899 ERR("Out of memory\n");
3900 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3904 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3905 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3906 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
3907 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
3909 TRACE("(%p)\n", this);
3911 MSVCRT_operator_delete((char*)this->grouping
);
3912 MSVCRT_operator_delete((char*)this->false_name
);
3913 MSVCRT_operator_delete((char*)this->true_name
);
3916 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3917 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3918 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
3919 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
3920 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3922 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3923 locale_facet_ctor_refs(&this->facet
, refs
);
3924 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3925 numpunct_char__Init(this, locinfo
, usedef
);
3929 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3930 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3931 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
3932 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
3933 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3937 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3938 locale_facet_ctor_refs(&this->facet
, refs
);
3939 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3941 _Locinfo_ctor_cstr(&locinfo
, name
);
3942 numpunct_char__Init(this, &locinfo
, usedef
);
3943 _Locinfo_dtor(&locinfo
);
3947 /* ??0?$numpunct@D@std@@QAE@I@Z */
3948 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3949 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3950 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3952 TRACE("(%p %lu)\n", this, refs
);
3953 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3956 /* ??_F?$numpunct@D@std@@QAEXXZ */
3957 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3958 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3959 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3961 return numpunct_char_ctor_refs(this, 0);
3964 /* ??1?$numpunct@D@std@@UAE@XZ */
3965 /* ??1?$numpunct@D@std@@UEAA@XZ */
3966 /* ??1?$numpunct@D@std@@MAE@XZ */
3967 /* ??1?$numpunct@D@std@@MEAA@XZ */
3968 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
3969 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
3971 TRACE("(%p)\n", this);
3972 numpunct_char__Tidy(this);
3975 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
3976 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
3978 TRACE("(%p %x)\n", this, flags
);
3980 /* we have an array, with the number of elements stored before the first object */
3981 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3983 for(i
=*ptr
-1; i
>=0; i
--)
3984 numpunct_char_dtor(this+i
);
3985 MSVCRT_operator_delete(ptr
);
3987 numpunct_char_dtor(this);
3989 MSVCRT_operator_delete(this);
3995 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3996 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3997 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3999 TRACE("(%p %p)\n", facet
, loc
);
4001 if(facet
&& !*facet
) {
4002 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
4004 ERR("Out of memory\n");
4005 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4008 numpunct_char_ctor_name((numpunct_char
*)*facet
,
4009 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4015 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
4016 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4017 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
4019 return numpunct_char__Getcat(facet
, locale_classic());
4022 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
4024 static numpunct_char
*obj
= NULL
;
4027 const locale_facet
*fac
;
4029 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4030 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
4032 _Lockit_dtor(&lock
);
4033 return (numpunct_char
*)fac
;
4037 _Lockit_dtor(&lock
);
4041 numpunct_char__Getcat(&fac
, loc
);
4042 obj
= (numpunct_char
*)fac
;
4043 call_locale_facet__Incref(&obj
->facet
);
4044 locale_facet_register(&obj
->facet
);
4045 _Lockit_dtor(&lock
);
4050 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
4051 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
4052 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
4053 #if _MSVCP_VER <= 100
4054 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4055 char, (const numpunct_char *this), (this))
4057 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4058 char, (const numpunct_char *this), (this))
4060 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
4062 TRACE("(%p)\n", this);
4066 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
4067 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
4068 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
4069 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
4071 TRACE("(%p)\n", this);
4072 return call_numpunct_char_do_decimal_point(this);
4075 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
4076 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
4077 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
4078 #if _MSVCP_VER <= 100
4079 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4080 char, (const numpunct_char*), (this))
4082 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4083 char, (const numpunct_char*), (this))
4085 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
4087 TRACE("(%p)\n", this);
4091 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
4092 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
4093 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
4094 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
4096 TRACE("(%p)\n", this);
4097 return call_numpunct_char_do_thousands_sep(this);
4100 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4101 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4102 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
4103 #if _MSVCP_VER <= 100
4104 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4105 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4107 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4108 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4110 basic_string_char
* __thiscall
numpunct_char_do_grouping(
4111 const numpunct_char
*this, basic_string_char
*ret
)
4113 TRACE("(%p)\n", this);
4114 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4117 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4118 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4119 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
4120 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
4122 TRACE("(%p)\n", this);
4123 return call_numpunct_char_do_grouping(this, ret
);
4126 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4127 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4128 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
4129 #if _MSVCP_VER <= 100
4130 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4131 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4133 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4134 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4136 basic_string_char
* __thiscall
numpunct_char_do_falsename(
4137 const numpunct_char
*this, basic_string_char
*ret
)
4139 TRACE("(%p)\n", this);
4140 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
4143 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4144 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4145 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
4146 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
4148 TRACE("(%p)\n", this);
4149 return call_numpunct_char_do_falsename(this, ret
);
4152 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4153 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4154 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
4155 #if _MSVCP_VER <= 100
4156 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4157 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4159 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4160 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4162 basic_string_char
* __thiscall
numpunct_char_do_truename(
4163 const numpunct_char
*this, basic_string_char
*ret
)
4165 TRACE("(%p)\n", this);
4166 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
4169 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4170 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4171 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
4172 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
4174 TRACE("(%p)\n", this);
4175 return call_numpunct_char_do_truename(this, ret
);
4178 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
4179 locale_id numpunct_wchar_id
= {0};
4180 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
4181 locale_id numpunct_short_id
= {0};
4183 /* ??_7?$numpunct@_W@std@@6B@ */
4184 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
4185 /* ??_7?$numpunct@G@std@@6B@ */
4186 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
4188 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
4189 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4190 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
4191 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4192 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
4193 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
4194 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
4196 const char *to_convert
;
4200 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4202 _Locinfo__Getcvt(locinfo
, &cvt
);
4204 to_convert
= _Locinfo__Getfalse(locinfo
);
4205 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4206 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4207 if(this->false_name
)
4208 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4209 (wchar_t*)this->false_name
, len
);
4211 to_convert
= _Locinfo__Gettrue(locinfo
);
4212 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4213 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4215 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4216 (wchar_t*)this->true_name
, len
);
4219 this->grouping
= MSVCRT_operator_new(1);
4221 *(char*)this->grouping
= 0;
4226 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4228 len
= strlen(lc
->grouping
)+1;
4229 this->grouping
= MSVCRT_operator_new(len
);
4231 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4233 this->dp
= mb_to_wc(lc
->decimal_point
[0], &cvt
);
4234 this->sep
= mb_to_wc(lc
->thousands_sep
[0], &cvt
);
4237 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4238 MSVCRT_operator_delete((char*)this->grouping
);
4239 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4240 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4242 ERR("Out of memory\n");
4243 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4247 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
4248 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
4249 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
4250 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
4251 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
4252 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
4254 TRACE("(%p)\n", this);
4256 MSVCRT_operator_delete((char*)this->grouping
);
4257 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4258 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4261 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
4262 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4263 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
4264 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
4265 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4267 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4268 locale_facet_ctor_refs(&this->facet
, refs
);
4269 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4270 numpunct_wchar__Init(this, locinfo
, usedef
);
4274 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
4275 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4276 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
4277 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
4278 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4280 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
4281 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4285 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
4286 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
4287 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
4288 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
4289 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4293 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4294 locale_facet_ctor_refs(&this->facet
, refs
);
4295 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4297 _Locinfo_ctor_cstr(&locinfo
, name
);
4298 numpunct_wchar__Init(this, &locinfo
, usedef
);
4299 _Locinfo_dtor(&locinfo
);
4303 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
4304 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
4305 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
4306 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
4307 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4309 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
4310 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4314 /* ??0?$numpunct@_W@std@@QAE@I@Z */
4315 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
4316 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
4317 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4319 TRACE("(%p %lu)\n", this, refs
);
4320 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
4323 /* ??0?$numpunct@G@std@@QAE@I@Z */
4324 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
4325 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
4326 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4328 numpunct_wchar_ctor_refs(this, refs
);
4329 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4333 /* ??_F?$numpunct@_W@std@@QAEXXZ */
4334 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
4335 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
4336 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
4338 return numpunct_wchar_ctor_refs(this, 0);
4341 /* ??_F?$numpunct@G@std@@QAEXXZ */
4342 /* ??_F?$numpunct@G@std@@QEAAXXZ */
4343 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
4344 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
4346 return numpunct_short_ctor_refs(this, 0);
4349 /* ??1?$numpunct@G@std@@UAE@XZ */
4350 /* ??1?$numpunct@G@std@@UEAA@XZ */
4351 /* ??1?$numpunct@_W@std@@MAE@XZ */
4352 /* ??1?$numpunct@_W@std@@MEAA@XZ */
4353 /* ??1?$numpunct@G@std@@MAE@XZ */
4354 /* ??1?$numpunct@G@std@@MEAA@XZ */
4355 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
4356 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
4358 TRACE("(%p)\n", this);
4359 numpunct_wchar__Tidy(this);
4362 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
4363 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
4365 TRACE("(%p %x)\n", this, flags
);
4367 /* we have an array, with the number of elements stored before the first object */
4368 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4370 for(i
=*ptr
-1; i
>=0; i
--)
4371 numpunct_wchar_dtor(this+i
);
4372 MSVCRT_operator_delete(ptr
);
4374 numpunct_wchar_dtor(this);
4376 MSVCRT_operator_delete(this);
4382 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4383 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4384 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4386 TRACE("(%p %p)\n", facet
, loc
);
4388 if(facet
&& !*facet
) {
4389 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4391 ERR("Out of memory\n");
4392 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4395 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
4396 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4402 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
4403 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4404 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
4406 return numpunct_wchar__Getcat(facet
, locale_classic());
4409 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
4411 static numpunct_wchar
*obj
= NULL
;
4414 const locale_facet
*fac
;
4416 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4417 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
4419 _Lockit_dtor(&lock
);
4420 return (numpunct_wchar
*)fac
;
4424 _Lockit_dtor(&lock
);
4428 numpunct_wchar__Getcat(&fac
, loc
);
4429 obj
= (numpunct_wchar
*)fac
;
4430 call_locale_facet__Incref(&obj
->facet
);
4431 locale_facet_register(&obj
->facet
);
4432 _Lockit_dtor(&lock
);
4437 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4438 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4439 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4441 TRACE("(%p %p)\n", facet
, loc
);
4443 if(facet
&& !*facet
) {
4444 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4446 ERR("Out of memory\n");
4447 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4450 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
4451 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4457 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
4458 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4459 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
4461 return numpunct_short__Getcat(facet
, locale_classic());
4464 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
4466 static numpunct_wchar
*obj
= NULL
;
4469 const locale_facet
*fac
;
4471 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4472 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
4474 _Lockit_dtor(&lock
);
4475 return (numpunct_wchar
*)fac
;
4479 _Lockit_dtor(&lock
);
4483 numpunct_short__Getcat(&fac
, loc
);
4484 obj
= (numpunct_wchar
*)fac
;
4485 call_locale_facet__Incref(&obj
->facet
);
4486 locale_facet_register(&obj
->facet
);
4487 _Lockit_dtor(&lock
);
4492 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
4493 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
4494 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
4495 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
4496 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
4497 #if _MSVCP_VER <= 100
4498 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4499 wchar_t, (const numpunct_wchar *this), (this))
4501 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4502 wchar_t, (const numpunct_wchar *this), (this))
4504 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
4506 TRACE("(%p)\n", this);
4510 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
4511 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
4512 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
4513 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
4514 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
4515 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
4517 TRACE("(%p)\n", this);
4518 return call_numpunct_wchar_do_decimal_point(this);
4521 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
4522 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
4523 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
4524 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
4525 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
4526 #if _MSVCP_VER <= 100
4527 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4528 wchar_t, (const numpunct_wchar *this), (this))
4530 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4531 wchar_t, (const numpunct_wchar *this), (this))
4533 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
4535 TRACE("(%p)\n", this);
4539 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4540 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4541 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4542 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4543 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4544 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4546 TRACE("(%p)\n", this);
4547 return call_numpunct_wchar_do_thousands_sep(this);
4550 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4551 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4552 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4553 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4554 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4555 #if _MSVCP_VER <= 100
4556 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4557 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4559 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4560 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4562 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4564 TRACE("(%p)\n", this);
4565 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4568 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4569 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4570 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4571 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4572 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4573 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4575 TRACE("(%p)\n", this);
4576 return call_numpunct_wchar_do_grouping(this, ret
);
4579 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4580 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4581 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4582 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4583 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4584 #if _MSVCP_VER <= 100
4585 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4586 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4588 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4589 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4591 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4593 TRACE("(%p)\n", this);
4594 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4597 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4598 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4599 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4600 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4601 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4602 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4604 TRACE("(%p)\n", this);
4605 return call_numpunct_wchar_do_falsename(this, ret
);
4608 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4609 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4610 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4611 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4612 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4613 #if _MSVCP_VER <= 100
4614 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4615 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4617 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4618 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4620 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4622 TRACE("(%p)\n", this);
4623 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4626 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4627 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4628 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4629 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4630 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4631 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4633 TRACE("(%p)\n", this);
4634 return call_numpunct_wchar_do_truename(this, ret
);
4637 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4639 double ret
= strtod(buf
, buf_end
);
4642 ret
*= pow(10, exp
);
4646 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4652 ret
= _Stod(buf
, buf_end
, exp
);
4662 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4664 return _Stod(buf
, buf_end
, exp
);
4667 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4669 return _Stodx(buf
, buf_end
, exp
, err
);
4672 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4674 return _strtoi64(buf
, buf_end
, base
);
4677 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4683 ret
= _strtoi64(buf
, buf_end
, base
);
4693 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4695 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4696 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4701 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4703 return _strtoui64(buf
, buf_end
, base
);
4706 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4708 unsigned __int64 ret
;
4712 ret
= _strtoui64(buf
, buf_end
, base
);
4722 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4725 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4726 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4728 return buf
[0]=='-' ? -i
: i
;
4731 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4733 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4734 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4736 return buf
[0]=='-' ? -i
: i
;
4739 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4740 locale_id num_get_wchar_id
= {0};
4741 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4742 locale_id num_get_short_id
= {0};
4744 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4745 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4746 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4747 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4749 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4750 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4751 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4752 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4753 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4754 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4756 TRACE("(%p %p)\n", this, locinfo
);
4757 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4760 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4761 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4762 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4763 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4764 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4766 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4768 locale_facet_ctor_refs(&this->facet
, refs
);
4769 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4771 num_get_wchar__Init(this, locinfo
);
4775 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4776 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4777 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4778 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4779 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4781 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4782 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4786 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4787 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4788 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4789 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4793 TRACE("(%p %lu)\n", this, refs
);
4795 _Locinfo_ctor(&locinfo
);
4796 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4797 _Locinfo_dtor(&locinfo
);
4801 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4802 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4803 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4804 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4806 num_get_wchar_ctor_refs(this, refs
);
4807 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4811 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4812 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4813 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4814 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4816 return num_get_wchar_ctor_refs(this, 0);
4819 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4820 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4821 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4822 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4824 return num_get_short_ctor_refs(this, 0);
4827 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
4828 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
4829 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4830 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4831 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4832 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4833 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4834 void __thiscall
num_get_wchar_dtor(num_get
*this)
4836 TRACE("(%p)\n", this);
4837 locale_facet_dtor(&this->facet
);
4840 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4841 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4843 TRACE("(%p %x)\n", this, flags
);
4845 /* we have an array, with the number of elements stored before the first object */
4846 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4848 for(i
=*ptr
-1; i
>=0; i
--)
4849 num_get_wchar_dtor(this+i
);
4850 MSVCRT_operator_delete(ptr
);
4852 num_get_wchar_dtor(this);
4854 MSVCRT_operator_delete(this);
4860 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4861 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4862 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4864 TRACE("(%p %p)\n", facet
, loc
);
4866 if(facet
&& !*facet
) {
4869 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4871 ERR("Out of memory\n");
4872 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4876 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
4877 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4878 _Locinfo_dtor(&locinfo
);
4884 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
4885 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4886 MSVCP_size_t __cdecl
num_get_wchar__Getcat_old(const locale_facet
**facet
)
4888 return num_get_wchar__Getcat(facet
, locale_classic());
4891 num_get
* num_get_wchar_use_facet(const locale
*loc
)
4893 static num_get
*obj
= NULL
;
4896 const locale_facet
*fac
;
4898 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4899 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
4901 _Lockit_dtor(&lock
);
4902 return (num_get
*)fac
;
4906 _Lockit_dtor(&lock
);
4910 num_get_wchar__Getcat(&fac
, loc
);
4911 obj
= (num_get
*)fac
;
4912 call_locale_facet__Incref(&obj
->facet
);
4913 locale_facet_register(&obj
->facet
);
4914 _Lockit_dtor(&lock
);
4919 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4920 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4921 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4923 if(facet
&& !*facet
) {
4924 num_get_wchar__Getcat(facet
, loc
);
4925 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
4931 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
4932 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4933 MSVCP_size_t __cdecl
num_get_short__Getcat_old(const locale_facet
**facet
)
4935 return num_get_short__Getcat(facet
, locale_classic());
4938 num_get
* num_get_short_use_facet(const locale
*loc
)
4940 static num_get
*obj
= NULL
;
4943 const locale_facet
*fac
;
4945 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4946 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
4948 _Lockit_dtor(&lock
);
4949 return (num_get
*)fac
;
4953 _Lockit_dtor(&lock
);
4957 num_get_short__Getcat(&fac
, loc
);
4958 obj
= (num_get
*)fac
;
4959 call_locale_facet__Incref(&obj
->facet
);
4960 locale_facet_register(&obj
->facet
);
4961 _Lockit_dtor(&lock
);
4966 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4967 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
4969 basic_string_char grouping_bstr
;
4970 basic_string_char groups_found
;
4971 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
4972 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
4973 wchar_t sep
= 0, digits
[11], *digits_pos
;
4974 const char *grouping
, *groups
;
4975 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
4977 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
4980 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4983 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4984 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4985 #if _MSVCP_VER >= 70
4986 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
4990 MSVCP_basic_string_char_ctor(&groups_found
);
4992 istreambuf_iterator_wchar_val(first
);
4994 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4996 istreambuf_iterator_wchar_inc(first
);
4997 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4999 istreambuf_iterator_wchar_inc(first
);
5002 /* read possibly grouped numbers before decimal */
5003 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5004 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5005 if(sep
&& first
->val
==sep
) {
5006 if(!groups_no
) break; /* empty group - stop parsing */
5007 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5014 got_digit
= TRUE
; /* found a digit, zero or non-zero */
5015 /* write digit to dest if not a leading zero (to not waste dest buffer) */
5016 if(!got_nonzero
&& first
->val
== digits
[0])
5023 *dest
++ = '0'+digits_pos
-digits
;
5025 exp
++; /* too many digits, just multiply by 10 */
5026 if(sep
&& groups_no
<CHAR_MAX
)
5031 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
5032 if(got_digit
&& !got_nonzero
)
5035 /* get decimal, if any */
5036 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
5038 *dest
++ = *localeconv()->decimal_point
;
5039 istreambuf_iterator_wchar_inc(first
);
5042 /* read non-grouped after decimal */
5043 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5044 if(!(digits_pos
= wcschr(digits
, first
->val
)))
5046 else if(dest
<num_end
) {
5048 *dest
++ = '0'+digits_pos
-digits
;
5052 /* read exponent, if any */
5053 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
5055 istreambuf_iterator_wchar_inc(first
);
5057 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5059 istreambuf_iterator_wchar_inc(first
);
5060 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5062 istreambuf_iterator_wchar_inc(first
);
5065 got_digit
= got_nonzero
= FALSE
;
5067 /* skip any leading zeroes */
5068 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
5071 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
5072 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5075 *dest
++ = '0'+digits_pos
-digits
;
5078 /* if just found zeroes for exponent, use that */
5079 if(got_digit
&& !got_nonzero
)
5087 if(sep
&& groups_no
)
5088 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5090 if(!cur_group
) /* no groups, skip loop */
5092 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
5093 error
= TRUE
; /* trailing empty */
5095 for(; cur_group
>=0 && !error
; cur_group
--) {
5096 if(*grouping
== CHAR_MAX
) {
5100 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5101 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5104 }else if(grouping
[1]) {
5108 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5110 MSVCP_basic_string_char_dtor(&groups_found
);
5120 /* ?_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 */
5121 /* ?_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 */
5122 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5123 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5125 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
5128 /* ?_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 */
5129 /* ?_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 */
5130 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5131 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5133 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
5136 /* ?_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 */
5137 /* ?_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 */
5138 /* ?_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 */
5139 /* ?_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 */
5140 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5141 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
5143 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5147 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5148 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
5150 wchar_t digits
[23], *digits_pos
, sep
= 0;
5151 basic_string_char grouping_bstr
;
5152 basic_string_char groups_found
;
5153 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
5154 char *dest_beg
= dest
, *dest_end
= dest
+24;
5155 const char *grouping
, *groups
;
5156 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5158 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5161 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5162 for(i
=0; i
<6; i
++) {
5163 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
5164 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
5167 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5168 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5169 #if _MSVCP_VER >= 70
5170 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5173 basefield
= fmtflags
& FMTFLAG_basefield
;
5174 if(basefield
== FMTFLAG_oct
)
5176 else if(basefield
== FMTFLAG_hex
)
5177 base
= 22; /* equal to the size of digits buffer */
5183 istreambuf_iterator_wchar_val(first
);
5184 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5186 istreambuf_iterator_wchar_inc(first
);
5187 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5189 istreambuf_iterator_wchar_inc(first
);
5192 if(first
->strbuf
&& first
->val
==digits
[0]) {
5194 istreambuf_iterator_wchar_inc(first
);
5195 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
5196 if(!base
|| base
== 22) {
5198 istreambuf_iterator_wchar_inc(first
);
5208 if(!base
) base
= 10;
5213 MSVCP_basic_string_char_ctor(&groups_found
);
5214 if(found_zero
) ++groups_no
;
5217 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5218 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5219 if(sep
&& first
->val
==sep
) {
5220 if(!groups_no
) break; /* empty group - stop parsing */
5221 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5229 if(dest_empty
&& first
->val
== digits
[0]) {
5235 /* skip digits that can't be copied to dest buffer, other
5236 * functions are responsible for detecting overflows */
5238 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
5239 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
5240 'A'+digits_pos
-digits
-16));
5241 if(sep
&& groups_no
<CHAR_MAX
)
5246 if(sep
&& groups_no
)
5247 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5249 if(!cur_group
) { /* no groups, skip loop */
5251 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
5252 error
= TRUE
; /* trailing empty */
5256 for(; cur_group
>=0 && !error
; cur_group
--) {
5257 if(*grouping
== CHAR_MAX
) {
5261 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5262 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5265 }else if(grouping
[1]) {
5270 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5272 MSVCP_basic_string_char_dtor(&groups_found
);
5279 }else if(dest_empty
)
5283 return (base
==22 ? 16 : base
);
5286 /* ?_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 */
5287 /* ?_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 */
5288 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5289 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5291 return num_get__Getifld(this, dest
, first
, last
,
5292 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
5295 /* ?_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 */
5296 /* ?_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 */
5297 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5298 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5300 return num_get__Getifld(this, dest
, first
, last
,
5301 fmtflags
, loc
, numpunct_short_use_facet(loc
));
5304 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
5305 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
5306 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
5307 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
5308 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
5309 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
5311 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5315 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
5316 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5317 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5318 void **pval
, numpunct_wchar
*numpunct
)
5324 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5326 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5327 &last
, FMTFLAG_hex
, IOS_LOCALE(base
), numpunct
), &err
);
5328 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5329 *state
|= IOSTATE_failbit
;
5330 else if(end
!=tmp
&& !err
)
5331 *pval
= (void*)((INT_PTR
)v
);
5333 *state
|= IOSTATE_failbit
;
5336 *state
|= IOSTATE_eofbit
;
5342 /* ?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 */
5343 /* ?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 */
5344 #if _MSVCP_VER <= 100
5345 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
5346 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5347 (this, ret, first, last, base, state, pval))
5349 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5350 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5351 (this, ret, first, last, base, state, pval))
5353 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
5354 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5355 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5357 return num_get_do_get_void(this, ret
, first
, last
, base
,
5358 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5361 /* ?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 */
5362 /* ?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 */
5363 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
5364 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5365 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5367 return num_get_do_get_void(this, ret
, first
, last
, base
,
5368 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5371 /* ?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 */
5372 /* ?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 */
5373 /* ?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 */
5374 /* ?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 */
5375 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
5376 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5377 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5379 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5380 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5383 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
5384 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5385 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5386 double *pval
, numpunct_wchar
*numpunct
)
5392 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5394 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
), numpunct
), &err
);
5395 if(end
!=tmp
&& !err
)
5398 *state
|= IOSTATE_failbit
;
5401 *state
|= IOSTATE_eofbit
;
5407 /* ?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 */
5408 /* ?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 */
5409 /* ?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 */
5410 /* ?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 */
5411 #if _MSVCP_VER <= 100
5412 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
5413 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5414 (this, ret, first, last, base, state, pval))
5415 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5416 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5417 (this, ret, first, last, base, state, pval))
5419 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5420 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5421 (this, ret, first, last, base, state, pval))
5422 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5423 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5424 (this, ret, first, last, base, state, pval))
5426 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
5427 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5428 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5430 return num_get_do_get_double(this, ret
, first
, last
, base
,
5431 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5434 /* ?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 */
5435 /* ?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 */
5436 /* ?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 */
5437 /* ?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 */
5438 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
5439 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5440 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5442 return num_get_do_get_double(this, ret
, first
, last
, base
,
5443 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5446 /* ?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 */
5447 /* ?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 */
5448 /* ?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 */
5449 /* ?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 */
5450 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
5451 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5452 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5454 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5455 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5458 /* ?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 */
5459 /* ?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 */
5460 /* ?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 */
5461 /* ?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 */
5462 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
5463 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5464 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5466 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5467 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5470 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
5471 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5472 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5473 float *pval
, numpunct_wchar
*numpunct
)
5479 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5481 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
5482 &last
, IOS_LOCALE(base
), numpunct
), &err
);
5483 if(end
!=tmp
&& !err
)
5486 *state
|= IOSTATE_failbit
;
5489 *state
|= IOSTATE_eofbit
;
5495 /* ?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 */
5496 /* ?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 */
5497 #if _MSVCP_VER <= 100
5498 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5499 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5500 (this, ret, first, last, base, state, pval))
5502 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5503 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5504 (this, ret, first, last, base, state, pval))
5506 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
5507 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5508 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5510 return num_get_do_get_float(this, ret
, first
, last
, base
,
5511 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5514 /* ?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 */
5515 /* ?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 */
5516 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
5517 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5518 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5520 return num_get_do_get_float(this, ret
, first
, last
, base
,
5521 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5524 /* ?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 */
5525 /* ?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 */
5526 /* ?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 */
5527 /* ?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 */
5528 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
5529 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5530 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5532 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5533 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5536 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
5537 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5538 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5539 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
5545 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5547 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5548 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5549 if(end
!=tmp
&& !err
)
5552 *state
|= IOSTATE_failbit
;
5555 *state
|= IOSTATE_eofbit
;
5561 /* ?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 */
5562 /* ?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 */
5563 #if _MSVCP_VER <= 100
5564 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5565 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5566 (this, ret, first, last, base, state, pval))
5568 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5569 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5570 (this, ret, first, last, base, state, pval))
5572 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
5573 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5574 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5576 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5577 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5580 /* ?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 */
5581 /* ?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 */
5582 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
5583 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5584 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5586 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5587 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5590 /* ?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 */
5591 /* ?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 */
5592 /* ?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 */
5593 /* ?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 */
5594 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
5595 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5596 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5598 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5599 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5602 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5603 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5604 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5605 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5611 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5613 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5614 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5615 if(end
!=tmp
&& !err
)
5618 *state
|= IOSTATE_failbit
;
5621 *state
|= IOSTATE_eofbit
;
5627 /* ?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 */
5628 /* ?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 */
5629 #if _MSVCP_VER <= 100
5630 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5631 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5632 (this, ret, first, last, base, state, pval))
5634 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5635 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5636 (this, ret, first, last, base, state, pval))
5638 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5639 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5640 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5642 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5643 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5646 /* ?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 */
5647 /* ?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 */
5648 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5649 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5650 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5652 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5653 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5656 /* ?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 */
5657 /* ?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 */
5658 /* ?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 */
5659 /* ?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 */
5660 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5661 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5662 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5664 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5665 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5668 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5669 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5670 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5671 ULONG
*pval
, numpunct_wchar
*numpunct
)
5677 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5679 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5680 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5681 if(end
!=tmp
&& !err
)
5684 *state
|= IOSTATE_failbit
;
5687 *state
|= IOSTATE_eofbit
;
5693 /* ?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 */
5694 /* ?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 */
5695 #if _MSVCP_VER <= 100
5696 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5697 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5698 (this, ret, first, last, base, state, pval))
5700 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5701 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5702 (this, ret, first, last, base, state, pval))
5704 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5705 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5706 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5708 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5709 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5712 /* ?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 */
5713 /* ?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 */
5714 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5715 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5716 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5718 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5719 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5722 /* ?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 */
5723 /* ?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 */
5724 /* ?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 */
5725 /* ?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 */
5726 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5727 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5728 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5730 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5731 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5734 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5735 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5736 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5737 LONG
*pval
, numpunct_wchar
*numpunct
)
5743 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5745 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5746 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5747 if(end
!=tmp
&& !err
)
5750 *state
|= IOSTATE_failbit
;
5753 *state
|= IOSTATE_eofbit
;
5759 /* ?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 */
5760 /* ?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 */
5761 #if _MSVCP_VER <= 100
5762 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5763 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5764 (this, ret, first, last, base, state, pval))
5766 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5767 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5768 (this, ret, first, last, base, state, pval))
5770 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5771 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5772 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5774 return num_get_do_get_long(this, ret
, first
, last
, base
,
5775 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5778 /* ?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 */
5779 /* ?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 */
5780 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5781 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5782 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5784 return num_get_do_get_long(this, ret
, first
, last
, base
,
5785 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5788 /* ?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 */
5789 /* ?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 */
5790 /* ?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 */
5791 /* ?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 */
5792 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5793 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5794 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5796 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5797 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5800 /* ?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 */
5801 /* ?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 */
5802 #if _MSVCP_VER <= 100
5803 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5804 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5805 (this, ret, first, last, base, state, pval))
5807 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5808 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5809 (this, ret, first, last, base, state, pval))
5811 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5812 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5813 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5815 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5816 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5819 /* ?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 */
5820 /* ?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 */
5821 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5822 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5823 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5825 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5826 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5829 /* ?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 */
5830 /* ?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 */
5831 /* ?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 */
5832 /* ?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 */
5833 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5834 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5835 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5837 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5838 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5841 /* ?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 */
5842 /* ?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 */
5843 #if _MSVCP_VER <= 100
5844 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5845 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5846 (this, ret, first, last, base, state, pval))
5848 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_wchar*, \
5849 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5850 (this, ret, first, last, base, state, pval))
5852 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5853 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5854 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5857 char tmp
[25], *beg
, *end
;
5860 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5862 b
= num_get_wchar__Getifld(this, tmp
,
5863 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
5864 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5865 v
= _Stoulx(beg
, &end
, b
, &err
);
5867 if(v
!= (ULONG
)((unsigned short)v
))
5868 *state
|= IOSTATE_failbit
;
5869 else if(end
!=beg
&& !err
)
5870 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5872 *state
|= IOSTATE_failbit
;
5875 *state
|= IOSTATE_eofbit
;
5881 /* ?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 */
5882 /* ?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 */
5883 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
5884 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5885 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5887 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
5891 /* ?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 */
5892 /* ?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 */
5893 /* ?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@ */
5894 /* ?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 */
5895 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
5896 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5897 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5899 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5900 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5903 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
5904 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5905 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5906 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
5908 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5910 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5911 basic_string_wchar false_bstr
, true_bstr
;
5912 const wchar_t *pfalse
, *ptrue
;
5914 numpunct_wchar_falsename(numpunct
, &false_bstr
);
5915 numpunct_wchar_truename(numpunct
, &true_bstr
);
5916 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
5917 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
5919 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;) {
5920 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5922 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5925 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5927 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5936 istreambuf_iterator_wchar_inc(&first
);
5938 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5947 *state
|= IOSTATE_failbit
;
5949 MSVCP_basic_string_wchar_dtor(&false_bstr
);
5950 MSVCP_basic_string_wchar_dtor(&true_bstr
);
5954 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5955 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5957 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5960 *state
|= IOSTATE_failbit
;
5964 *state
|= IOSTATE_eofbit
;
5965 memcpy(ret
, &first
, sizeof(first
));
5969 /* ?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 */
5970 /* ?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 */
5971 #if _MSVCP_VER <= 100
5972 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5973 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5974 (this, ret, first, last, base, state, pval))
5976 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_wchar*, \
5977 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5978 (this, ret, first, last, base, state, pval))
5980 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
5981 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5982 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5984 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5985 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5988 /* ?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 */
5989 /* ?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 */
5990 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
5991 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5992 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5994 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5995 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5998 /* ?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 */
5999 /* ?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 */
6000 /* ?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 */
6001 /* ?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 */
6002 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
6003 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6004 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6006 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6007 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6010 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6011 locale_id num_get_char_id
= {0};
6013 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6014 extern const vtable_ptr MSVCP_num_get_char_vtable
;
6016 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6017 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6018 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
6019 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
6021 TRACE("(%p %p)\n", this, locinfo
);
6022 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6025 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6026 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6027 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
6028 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
6029 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6031 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
6033 locale_facet_ctor_refs(&this->facet
, refs
);
6034 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
6036 num_get_char__Init(this, locinfo
);
6040 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6041 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6042 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
6043 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
6047 TRACE("(%p %lu)\n", this, refs
);
6049 _Locinfo_ctor(&locinfo
);
6050 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
6051 _Locinfo_dtor(&locinfo
);
6055 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6056 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6057 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
6058 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
6060 return num_get_char_ctor_refs(this, 0);
6063 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
6064 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
6065 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6066 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6067 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
6068 void __thiscall
num_get_char_dtor(num_get
*this)
6070 TRACE("(%p)\n", this);
6071 locale_facet_dtor(&this->facet
);
6074 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
6075 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
6077 TRACE("(%p %x)\n", this, flags
);
6079 /* we have an array, with the number of elements stored before the first object */
6080 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6082 for(i
=*ptr
-1; i
>=0; i
--)
6083 num_get_char_dtor(this+i
);
6084 MSVCRT_operator_delete(ptr
);
6086 num_get_char_dtor(this);
6088 MSVCRT_operator_delete(this);
6094 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6095 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6096 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6098 TRACE("(%p %p)\n", facet
, loc
);
6100 if(facet
&& !*facet
) {
6103 *facet
= MSVCRT_operator_new(sizeof(num_get
));
6105 ERR("Out of memory\n");
6106 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6110 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6111 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
6112 _Locinfo_dtor(&locinfo
);
6118 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6119 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6120 MSVCP_size_t __cdecl
num_get_char__Getcat_old(const locale_facet
**facet
)
6122 return num_get_char__Getcat(facet
, locale_classic());
6125 num_get
* num_get_char_use_facet(const locale
*loc
)
6127 static num_get
*obj
= NULL
;
6130 const locale_facet
*fac
;
6132 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6133 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
6135 _Lockit_dtor(&lock
);
6136 return (num_get
*)fac
;
6140 _Lockit_dtor(&lock
);
6144 num_get_char__Getcat(&fac
, loc
);
6145 obj
= (num_get
*)fac
;
6146 call_locale_facet__Incref(&obj
->facet
);
6147 locale_facet_register(&obj
->facet
);
6148 _Lockit_dtor(&lock
);
6153 /* ?_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 */
6154 /* ?_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 */
6155 /* Copies number to dest buffer, validates grouping and skips separators.
6156 * Updates first so it points past the number, all digits are skipped.
6157 * Returns how exponent needs to changed.
6158 * Size of dest buffer is not specified, assuming it's not smaller than 32:
6159 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
6161 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6162 istreambuf_iterator_char
*last
, const locale
*loc
)
6164 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6165 basic_string_char grouping_bstr
;
6166 basic_string_char groups_found
;
6167 int groups_no
= 0, cur_group
= 0, exp
= 0;
6168 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
= 0;
6169 const char *grouping
, *groups
;
6170 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
6172 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
6174 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6175 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6176 #if _MSVCP_VER >= 70
6177 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6181 MSVCP_basic_string_char_ctor(&groups_found
);
6183 istreambuf_iterator_char_val(first
);
6185 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6186 *dest
++ = first
->val
;
6187 istreambuf_iterator_char_inc(first
);
6190 /* read possibly grouped numbers before decimal */
6191 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6192 if(first
->val
<'0' || first
->val
>'9') {
6193 if(sep
&& first
->val
==sep
) {
6194 if(!groups_no
) break; /* empty group - stop parsing */
6195 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6202 got_digit
= TRUE
; /* found a digit, zero or non-zero */
6203 /* write digit to dest if not a leading zero (to not waste dest buffer) */
6204 if(!got_nonzero
&& first
->val
== '0')
6211 *dest
++ = first
->val
;
6213 exp
++; /* too many digits, just multiply by 10 */
6214 if(sep
&& groups_no
<CHAR_MAX
)
6219 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
6220 if(got_digit
&& !got_nonzero
)
6223 /* get decimal, if any */
6224 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
6226 *dest
++ = *localeconv()->decimal_point
;
6227 istreambuf_iterator_char_inc(first
);
6230 /* read non-grouped after decimal */
6231 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6232 if(first
->val
<'0' || first
->val
>'9')
6234 else if(dest
<num_end
) {
6236 *dest
++ = first
->val
;
6240 /* read exponent, if any */
6241 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
6242 *dest
++ = first
->val
;
6243 istreambuf_iterator_char_inc(first
);
6245 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6246 *dest
++ = first
->val
;
6247 istreambuf_iterator_char_inc(first
);
6250 got_digit
= got_nonzero
= FALSE
;
6252 /* skip any leading zeroes */
6253 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
6256 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
6257 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
6260 *dest
++ = first
->val
;
6263 /* if just found zeroes for exponent, use that */
6264 if(got_digit
&& !got_nonzero
)
6272 if(sep
&& groups_no
)
6273 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6275 if(!cur_group
) /* no groups, skip loop */
6277 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
6278 error
= TRUE
; /* trailing empty */
6280 for(; cur_group
>=0 && !error
; cur_group
--) {
6281 if(*grouping
== CHAR_MAX
) {
6285 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6286 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6289 }else if(grouping
[1]) {
6293 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6295 MSVCP_basic_string_char_dtor(&groups_found
);
6305 /* ?_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 */
6306 /* ?_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 */
6307 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6308 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
6310 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
6314 /* ?_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 */
6315 /* ?_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 */
6316 /* Copies number to dest buffer, validates grouping and skips separators.
6317 * Updates first so it points past the number, all digits are skipped.
6318 * Returns number base (8, 10 or 16).
6319 * Size of dest buffer is not specified, assuming it's not smaller than 25:
6320 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
6322 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6323 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
6325 static const char digits
[] = "0123456789abcdefABCDEF";
6327 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6328 basic_string_char grouping_bstr
;
6329 basic_string_char groups_found
;
6330 int basefield
, base
, groups_no
= 0, cur_group
= 0;
6331 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
= 0;
6332 const char *grouping
, *groups
;
6333 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
6335 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
6337 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6338 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6339 #if _MSVCP_VER >= 70
6340 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6343 basefield
= fmtflags
& FMTFLAG_basefield
;
6344 if(basefield
== FMTFLAG_oct
)
6346 else if(basefield
== FMTFLAG_hex
)
6347 base
= 22; /* equal to the size of digits buffer */
6353 istreambuf_iterator_char_val(first
);
6354 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6355 *dest
++ = first
->val
;
6356 istreambuf_iterator_char_inc(first
);
6359 if(first
->strbuf
&& first
->val
=='0') {
6361 istreambuf_iterator_char_inc(first
);
6362 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
6363 if(!base
|| base
== 22) {
6365 istreambuf_iterator_char_inc(first
);
6375 if (!base
) base
= 10;
6380 MSVCP_basic_string_char_ctor(&groups_found
);
6381 if(found_zero
) ++groups_no
;
6384 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6385 if(!memchr(digits
, first
->val
, base
)) {
6386 if(sep
&& first
->val
==sep
) {
6387 if(!groups_no
) break; /* empty group - stop parsing */
6388 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6396 if(dest_empty
&& first
->val
== '0')
6403 /* skip digits that can't be copied to dest buffer, other
6404 * functions are responsible for detecting overflows */
6406 *dest
++ = first
->val
;
6407 if(sep
&& groups_no
<CHAR_MAX
)
6412 if(sep
&& groups_no
)
6413 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6415 if(!cur_group
) { /* no groups, skip loop */
6417 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
6418 error
= TRUE
; /* trailing empty */
6422 for(; cur_group
>=0 && !error
; cur_group
--) {
6423 if(*grouping
== CHAR_MAX
) {
6427 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6428 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6431 }else if(grouping
[1]) {
6436 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6438 MSVCP_basic_string_char_dtor(&groups_found
);
6445 }else if(dest_empty
)
6449 return (base
==22 ? 16 : base
);
6452 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
6453 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
6454 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
6455 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
6457 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
6461 /* ?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 */
6462 /* ?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 */
6463 #if _MSVCP_VER <= 100
6464 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
6465 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6466 (this, ret, first, last, base, state, pval))
6468 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6469 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6470 (this, ret, first, last, base, state, pval))
6472 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
6473 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6474 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6480 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6482 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6483 &first
, &last
, FMTFLAG_hex
, IOS_LOCALE(base
)), &err
);
6484 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
6485 *state
|= IOSTATE_failbit
;
6486 else if(end
!=tmp
&& !err
)
6487 *pval
= (void*)((INT_PTR
)v
);
6489 *state
|= IOSTATE_failbit
;
6492 *state
|= IOSTATE_eofbit
;
6498 /* ?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 */
6499 /* ?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 */
6500 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
6501 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6502 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6504 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6505 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
6508 /* ?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 */
6509 /* ?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 */
6510 /* ?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 */
6511 /* ?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 */
6512 #if _MSVCP_VER <= 100
6513 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
6514 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6515 (this, ret, first, last, base, state, pval))
6516 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6517 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6518 (this, ret, first, last, base, state, pval))
6520 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6521 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6522 (this, ret, first, last, base, state, pval))
6523 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6524 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6525 (this, ret, first, last, base, state, pval))
6527 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
6528 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6529 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6535 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6537 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6538 if(end
!=tmp
&& !err
)
6541 *state
|= IOSTATE_failbit
;
6544 *state
|= IOSTATE_eofbit
;
6550 /* ?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 */
6551 /* ?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 */
6552 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
6553 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
6554 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6556 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6557 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
6560 /* ?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 */
6561 /* ?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 */
6562 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
6563 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6564 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6566 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6567 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
6570 /* ?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 */
6571 /* ?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 */
6572 #if _MSVCP_VER <= 100
6573 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6574 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6575 (this, ret, first, last, base, state, pval))
6577 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6578 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6579 (this, ret, first, last, base, state, pval))
6581 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
6582 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6583 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6589 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6591 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6592 if(end
!=tmp
&& !err
)
6595 *state
|= IOSTATE_failbit
;
6598 *state
|= IOSTATE_eofbit
;
6604 /* ?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 */
6605 /* ?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 */
6606 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
6607 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6608 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6610 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6611 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
6614 /* ?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 */
6615 /* ?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 */
6616 #if _MSVCP_VER <= 100
6617 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6618 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6619 (this, ret, first, last, base, state, pval))
6621 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6622 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6623 (this, ret, first, last, base, state, pval))
6625 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
6626 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6627 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6633 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6635 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6636 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6637 if(end
!=tmp
&& !err
)
6640 *state
|= IOSTATE_failbit
;
6643 *state
|= IOSTATE_eofbit
;
6649 /* ?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 */
6650 /* ?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 */
6651 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
6652 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6653 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6655 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6656 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
6659 /* ?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 */
6660 /* ?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 */
6661 #if _MSVCP_VER <= 100
6662 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6663 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6664 (this, ret, first, last, base, state, pval))
6666 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6667 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6668 (this, ret, first, last, base, state, pval))
6670 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
6671 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6672 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6678 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6680 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6681 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6682 if(end
!=tmp
&& !err
)
6685 *state
|= IOSTATE_failbit
;
6688 *state
|= IOSTATE_eofbit
;
6694 /* ?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 */
6695 /* ?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 */
6696 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6697 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6698 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6700 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6701 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
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@AAHAAK@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@AEAHAEAK@Z */
6706 #if _MSVCP_VER <= 100
6707 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6708 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6709 (this, ret, first, last, base, state, pval))
6711 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6712 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6713 (this, ret, first, last, base, state, pval))
6715 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6716 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6717 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6723 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6725 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6726 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6727 if(end
!=tmp
&& !err
)
6730 *state
|= IOSTATE_failbit
;
6733 *state
|= IOSTATE_eofbit
;
6739 /* ?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 */
6740 /* ?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 */
6741 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6742 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6743 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6745 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6746 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6749 /* ?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 */
6750 /* ?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 */
6751 #if _MSVCP_VER <= 100
6752 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6753 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6754 (this, ret, first, last, base, state, pval))
6756 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6757 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6758 (this, ret, first, last, base, state, pval))
6760 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6761 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6762 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6768 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6770 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6771 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6772 if(end
!=tmp
&& !err
)
6775 *state
|= IOSTATE_failbit
;
6778 *state
|= IOSTATE_eofbit
;
6784 /* ?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 */
6785 /* ?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 */
6786 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6787 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6788 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6790 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6791 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6794 /* ?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 */
6795 /* ?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 */
6796 #if _MSVCP_VER <= 100
6797 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6798 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6799 (this, ret, first, last, base, state, pval))
6801 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6802 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6803 (this, ret, first, last, base, state, pval))
6805 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
6806 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6807 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6809 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6810 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6813 /* ?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 */
6814 /* ?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 */
6815 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
6816 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6817 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6819 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6820 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6823 /* ?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 */
6824 /* ?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 */
6825 #if _MSVCP_VER <= 100
6826 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6827 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6828 (this, ret, first, last, base, state, pval))
6830 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_char*, \
6831 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6832 (this, ret, first, last, base, state, pval))
6834 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
6835 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6836 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6839 char tmp
[25], *beg
, *end
;
6842 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6844 b
= num_get_char__Getifld(this, tmp
,
6845 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
6846 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6847 v
= _Stoulx(beg
, &end
, b
, &err
);
6849 if(v
!= (ULONG
)((unsigned short)v
))
6850 *state
|= IOSTATE_failbit
;
6851 else if(end
!=beg
&& !err
)
6852 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6854 *state
|= IOSTATE_failbit
;
6857 *state
|= IOSTATE_eofbit
;
6863 /* ?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 */
6864 /* ?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 */
6865 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
6866 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6867 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6869 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6870 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6873 /* ?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 */
6874 /* ?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 */
6875 #if _MSVCP_VER <= 100
6876 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6877 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6878 (this, ret, first, last, base, state, pval))
6880 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_char*, \
6881 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6882 (this, ret, first, last, base, state, pval))
6884 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
6885 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6886 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6888 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6890 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6891 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
6892 basic_string_char false_bstr
, true_bstr
;
6893 const char *pfalse
, *ptrue
;
6895 numpunct_char_falsename(numpunct
, &false_bstr
);
6896 numpunct_char_truename(numpunct
, &true_bstr
);
6897 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
6898 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
6900 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;) {
6901 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6903 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6906 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6908 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6917 istreambuf_iterator_char_inc(&first
);
6919 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6928 *state
|= IOSTATE_failbit
;
6930 MSVCP_basic_string_char_dtor(&false_bstr
);
6931 MSVCP_basic_string_char_dtor(&true_bstr
);
6935 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6936 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6938 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6941 *state
|= IOSTATE_failbit
;
6945 *state
|= IOSTATE_eofbit
;
6946 memcpy(ret
, &first
, sizeof(first
));
6950 /* ?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 */
6951 /* ?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 */
6952 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
6953 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6954 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6956 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6957 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6960 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6961 locale_id num_put_char_id
= {0};
6963 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6964 extern const vtable_ptr MSVCP_num_put_char_vtable
;
6966 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6967 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6968 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
6969 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
6971 TRACE("(%p %p)\n", this, locinfo
);
6972 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6975 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6976 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6977 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
6978 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6980 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6982 locale_facet_ctor_refs(&this->facet
, refs
);
6983 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
6985 num_put_char__Init(this, locinfo
);
6989 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6990 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6991 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
6992 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6996 TRACE("(%p %lu)\n", this, refs
);
6998 _Locinfo_ctor(&locinfo
);
6999 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
7000 _Locinfo_dtor(&locinfo
);
7004 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
7005 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
7006 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
7007 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
7009 return num_put_char_ctor_refs(this, 0);
7012 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
7013 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
7014 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
7015 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
7016 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
7017 void __thiscall
num_put_char_dtor(num_put
*this)
7019 TRACE("(%p)\n", this);
7020 locale_facet_dtor(&this->facet
);
7023 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
7024 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
7026 TRACE("(%p %x)\n", this, flags
);
7028 /* we have an array, with the number of elements stored before the first object */
7029 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7031 for(i
=*ptr
-1; i
>=0; i
--)
7032 num_put_char_dtor(this+i
);
7033 MSVCRT_operator_delete(ptr
);
7035 num_put_char_dtor(this);
7037 MSVCRT_operator_delete(this);
7043 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7044 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7045 MSVCP_size_t __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
7047 TRACE("(%p %p)\n", facet
, loc
);
7049 if(facet
&& !*facet
) {
7052 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7054 ERR("Out of memory\n");
7055 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7059 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7060 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7061 _Locinfo_dtor(&locinfo
);
7067 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7068 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7069 MSVCP_size_t __cdecl
num_put_char__Getcat_old(const locale_facet
**facet
)
7071 return num_put_char__Getcat(facet
, locale_classic());
7074 num_put
* num_put_char_use_facet(const locale
*loc
)
7076 static num_put
*obj
= NULL
;
7079 const locale_facet
*fac
;
7081 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7082 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
7084 _Lockit_dtor(&lock
);
7085 return (num_put
*)fac
;
7089 _Lockit_dtor(&lock
);
7093 num_put_char__Getcat(&fac
, loc
);
7094 obj
= (num_put
*)fac
;
7095 call_locale_facet__Incref(&obj
->facet
);
7096 locale_facet_register(&obj
->facet
);
7097 _Lockit_dtor(&lock
);
7102 /* ?_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 */
7103 /* ?_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 */
7104 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
7105 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7107 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7109 for(; count
>0; count
--)
7110 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7116 /* ?_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 */
7117 /* ?_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 */
7118 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
7119 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7121 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7123 for(; count
>0; count
--)
7124 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7130 /* ?_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 */
7131 /* ?_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 */
7132 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
7133 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
7135 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7139 /* ?_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 */
7140 /* ?_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 */
7141 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
7142 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
7144 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7146 for(; count
>0; count
--)
7147 ostreambuf_iterator_char_put(&dest
, c
);
7153 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
7154 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7155 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7157 int type
= fmtfl
& FMTFLAG_floatfield
;
7160 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7163 if(fmtfl
& FMTFLAG_showpos
)
7165 if(fmtfl
& FMTFLAG_showpoint
)
7172 if(type
== FMTFLAG_fixed
)
7174 else if(type
== FMTFLAG_scientific
)
7175 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7176 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7177 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7179 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7185 /* ?_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 */
7186 /* ?_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 */
7187 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7188 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
7189 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7191 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7192 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7196 /* TODO: This function should be removed when num_put_char__Fput is implemented */
7197 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7198 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7200 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7201 basic_string_char grouping_bstr
;
7202 const char *grouping
;
7203 char *p
, sep
= 0, dec_point
= *localeconv()->decimal_point
;
7204 int cur_group
= 0, group_size
= 0;
7205 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7208 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7210 /* Change decimal point */
7211 for(p
=buf
; p
<buf
+count
; p
++) {
7212 if(*p
== dec_point
) {
7213 *p
= numpunct_char_decimal_point(numpunct
);
7219 /* Add separators to number */
7220 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7221 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7222 #if _MSVCP_VER >= 70
7223 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7226 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7228 if(group_size
== grouping
[cur_group
]) {
7230 if(grouping
[cur_group
+1])
7233 memmove(p
+1, p
, buf
+count
-p
);
7238 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7240 /* Display number with padding */
7241 if(count
>= base
->wide
)
7244 pad
= base
->wide
-count
;
7247 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7248 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7251 if(adjustfield
!= FMTFLAG_left
) {
7252 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7255 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7256 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7259 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
7260 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7261 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7263 int base
= fmtfl
& FMTFLAG_basefield
;
7266 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7269 if(fmtfl
& FMTFLAG_showpos
)
7271 if(fmtfl
& FMTFLAG_showbase
)
7278 if(base
== FMTFLAG_oct
)
7280 else if(base
== FMTFLAG_hex
)
7281 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7289 /* ?_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 */
7290 /* ?_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 */
7291 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7292 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7294 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7295 basic_string_char grouping_bstr
;
7296 const char *grouping
;
7298 int cur_group
= 0, group_size
= 0;
7299 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7302 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7304 /* Add separators to number */
7305 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7306 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7307 #if _MSVCP_VER >= 70
7308 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7311 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7313 if(group_size
== grouping
[cur_group
]) {
7315 if(grouping
[cur_group
+1])
7318 memmove(p
+1, p
, buf
+count
-p
);
7323 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7325 /* Display number with padding */
7326 if(count
>= base
->wide
)
7329 pad
= base
->wide
-count
;
7332 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7333 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7335 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7336 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
7339 if(adjustfield
!= FMTFLAG_left
) {
7340 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7343 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7344 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7347 /* ?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 */
7348 /* ?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 */
7349 #if _MSVCP_VER <= 100
7350 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7351 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7352 (this, ret, dest, base, fill, v))
7354 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_char*, \
7355 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7356 (this, ret, dest, base, fill, v))
7358 #if _MSVCP_VER != 80
7359 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
7361 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 32)
7363 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7364 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7366 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7367 char fmt
[7]; /* strlen("%+#lld")+1 */
7369 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7371 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7372 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7375 /* ?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 */
7376 /* ?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 */
7377 #if _MSVCP_VER != 80
7378 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
7380 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 32)
7382 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7383 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7385 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7386 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
7389 /* ?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 */
7390 /* ?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 */
7391 #if _MSVCP_VER <= 100
7392 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7393 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7394 (this, ret, dest, base, fill, v))
7396 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7397 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7398 (this, ret, dest, base, fill, v))
7400 #if _MSVCP_VER != 80
7401 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
7403 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 32)
7405 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7406 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7408 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7409 char fmt
[7]; /* strlen("%+#lld")+1 */
7411 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7413 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7414 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7417 /* ?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 */
7418 /* ?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 */
7419 #if _MSVCP_VER != 80
7420 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
7422 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 32)
7424 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7425 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7427 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7428 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7431 static inline unsigned get_precision(const ios_base
*base
)
7433 streamsize ret
= base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
7439 /* ?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 */
7440 /* ?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 */
7441 /* ?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 */
7442 /* ?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 */
7443 #if _MSVCP_VER <= 100
7444 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7445 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7446 (this, ret, dest, base, fill, v))
7447 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
7448 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7449 (this, ret, dest, base, fill, v))
7451 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7452 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7453 (this, ret, dest, base, fill, v))
7454 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7455 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7456 (this, ret, dest, base, fill, v))
7458 #if _MSVCP_VER != 80
7459 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
7461 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 36)
7463 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7464 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7467 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7471 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7473 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7474 prec
= get_precision(base
);
7475 size
= _scprintf(fmt
, prec
, v
);
7477 /* TODO: don't use dynamic allocation */
7478 tmp
= MSVCRT_operator_new(size
*2);
7480 ERR("Out of memory\n");
7481 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7483 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
7484 MSVCRT_operator_delete(tmp
);
7488 /* ?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 */
7489 /* ?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 */
7490 #if _MSVCP_VER != 80
7491 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
7493 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 36)
7495 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7496 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7498 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7499 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
7502 /* ?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 */
7503 /* ?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 */
7504 #if _MSVCP_VER != 80
7505 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
7507 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 36)
7509 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
7510 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7512 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7513 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7516 /* ?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 */
7517 /* ?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 */
7518 #if _MSVCP_VER <= 100
7519 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
7520 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7521 (this, ret, dest, base, fill, v))
7523 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7524 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7525 (this, ret, dest, base, fill, v))
7527 #if _MSVCP_VER != 80
7528 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
7530 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 32)
7532 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7533 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7535 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7537 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7539 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7542 /* ?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 */
7543 /* ?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 */
7544 #if _MSVCP_VER != 80
7545 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
7547 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 32)
7549 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7550 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7552 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7553 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7556 /* ?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 */
7557 /* ?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 */
7558 #if _MSVCP_VER <= 100
7559 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7560 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7561 (this, ret, dest, base, fill, v))
7563 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7564 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7565 (this, ret, dest, base, fill, v))
7567 #if _MSVCP_VER != 80
7568 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
7570 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 36)
7572 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7573 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7575 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7576 char fmt
[7]; /* strlen("%+#lld")+1 */
7578 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7580 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7581 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7584 /* ?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 */
7585 /* ?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 */
7586 #if _MSVCP_VER != 80
7587 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
7589 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 36)
7591 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7592 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7594 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7595 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7598 /* ?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 */
7599 /* ?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 */
7600 #if _MSVCP_VER <= 100
7601 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7602 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7603 (this, ret, dest, base, fill, v))
7605 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7606 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7607 (this, ret, dest, base, fill, v))
7609 #if _MSVCP_VER != 80
7610 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
7612 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 36)
7614 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7615 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7617 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7618 char fmt
[7]; /* strlen("%+#lld")+1 */
7620 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7622 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7623 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7626 /* ?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 */
7627 /* ?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 */
7628 #if _MSVCP_VER != 80
7629 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
7631 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 36)
7633 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7634 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7636 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7637 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7640 /* ?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 */
7641 /* ?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 */
7642 #if _MSVCP_VER <= 100
7643 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7644 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7645 (this, ret, dest, base, fill, v))
7647 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_char*, \
7648 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7649 (this, ret, dest, base, fill, v))
7651 #if _MSVCP_VER != 80
7652 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
7654 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 32)
7656 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7657 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7659 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7661 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7662 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7663 basic_string_char str
;
7664 MSVCP_size_t pad
, len
;
7667 numpunct_char_truename(numpunct
, &str
);
7669 numpunct_char_falsename(numpunct
, &str
);
7671 len
= MSVCP_basic_string_char_length(&str
);
7672 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7675 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7676 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
7679 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
7680 MSVCP_basic_string_char_dtor(&str
);
7681 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7684 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
7687 /* ?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 */
7688 /* ?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 */
7689 #if _MSVCP_VER != 80
7690 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
7692 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 32)
7694 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7695 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7697 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7698 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7701 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
7702 locale_id num_put_wchar_id
= {0};
7703 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
7704 locale_id num_put_short_id
= {0};
7706 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
7707 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
7708 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
7709 extern const vtable_ptr MSVCP_num_put_short_vtable
;
7711 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7712 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7713 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
7714 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
7716 TRACE("(%p %p)\n", this, locinfo
);
7717 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7720 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7721 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7722 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
7723 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7725 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7727 locale_facet_ctor_refs(&this->facet
, refs
);
7728 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
7730 num_put_wchar__Init(this, locinfo
);
7734 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7735 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7736 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
7737 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7739 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
7740 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7744 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
7745 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
7746 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
7747 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7751 TRACE("(%p %lu)\n", this, refs
);
7753 _Locinfo_ctor(&locinfo
);
7754 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
7755 _Locinfo_dtor(&locinfo
);
7759 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
7760 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
7761 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
7762 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7764 num_put_wchar_ctor_refs(this, refs
);
7765 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7769 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
7770 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
7771 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
7772 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
7774 return num_put_wchar_ctor_refs(this, 0);
7777 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
7778 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
7779 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
7780 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
7782 return num_put_short_ctor_refs(this, 0);
7785 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
7786 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
7787 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
7788 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
7789 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
7790 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
7791 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
7792 void __thiscall
num_put_wchar_dtor(num_put
*this)
7794 TRACE("(%p)\n", this);
7795 locale_facet_dtor(&this->facet
);
7798 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
7799 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
7801 TRACE("(%p %x)\n", this, flags
);
7803 /* we have an array, with the number of elements stored before the first object */
7804 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7806 for(i
=*ptr
-1; i
>=0; i
--)
7807 num_put_wchar_dtor(this+i
);
7808 MSVCRT_operator_delete(ptr
);
7810 num_put_wchar_dtor(this);
7812 MSVCRT_operator_delete(this);
7818 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7819 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7820 MSVCP_size_t __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
7822 TRACE("(%p %p)\n", facet
, loc
);
7824 if(facet
&& !*facet
) {
7827 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7829 ERR("Out of memory\n");
7830 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7834 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7835 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7836 _Locinfo_dtor(&locinfo
);
7842 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7843 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7844 MSVCP_size_t __cdecl
num_put_wchar__Getcat_old(const locale_facet
**facet
)
7846 return num_put_wchar__Getcat(facet
, locale_classic());
7849 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7850 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7851 MSVCP_size_t __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
7853 TRACE("(%p %p)\n", facet
, loc
);
7855 if(facet
&& !*facet
) {
7858 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7860 ERR("Out of memory\n");
7861 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7865 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7866 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7867 _Locinfo_dtor(&locinfo
);
7873 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7874 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7875 MSVCP_size_t __cdecl
num_put_short__Getcat_old(const locale_facet
**facet
)
7877 return num_put_short__Getcat(facet
, locale_classic());
7880 num_put
* num_put_wchar_use_facet(const locale
*loc
)
7882 static num_put
*obj
= NULL
;
7885 const locale_facet
*fac
;
7887 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7888 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
7890 _Lockit_dtor(&lock
);
7891 return (num_put
*)fac
;
7895 _Lockit_dtor(&lock
);
7899 num_put_wchar__Getcat(&fac
, loc
);
7900 obj
= (num_put
*)fac
;
7901 call_locale_facet__Incref(&obj
->facet
);
7902 locale_facet_register(&obj
->facet
);
7903 _Lockit_dtor(&lock
);
7908 num_put
* num_put_short_use_facet(const locale
*loc
)
7910 static num_put
*obj
= NULL
;
7913 const locale_facet
*fac
;
7915 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7916 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
7918 _Lockit_dtor(&lock
);
7919 return (num_put
*)fac
;
7923 _Lockit_dtor(&lock
);
7927 num_put_short__Getcat(&fac
, loc
);
7928 obj
= (num_put
*)fac
;
7929 call_locale_facet__Incref(&obj
->facet
);
7930 locale_facet_register(&obj
->facet
);
7931 _Lockit_dtor(&lock
);
7936 /* ?_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 */
7937 /* ?_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 */
7938 /* ?_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 */
7939 /* ?_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 */
7940 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7941 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
7943 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
7945 for(; count
>0; count
--)
7946 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
7952 /* ?_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 */
7953 /* ?_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 */
7954 /* ?_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 */
7955 /* ?_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 */
7956 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7957 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
7962 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
7964 for(; count
>0; count
--) {
7965 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
7966 ostreambuf_iterator_wchar_put(&dest
, ch
);
7973 /* ?_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 */
7974 /* ?_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 */
7975 /* ?_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 */
7976 /* ?_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 */
7977 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7978 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
7980 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7984 /* ?_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 */
7985 /* ?_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 */
7986 /* ?_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 */
7987 /* ?_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 */
7988 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7989 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
7991 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7993 for(; count
>0; count
--)
7994 ostreambuf_iterator_wchar_put(&dest
, c
);
8000 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
8001 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8002 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
8003 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8004 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
8006 int type
= fmtfl
& FMTFLAG_floatfield
;
8009 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
8012 if(fmtfl
& FMTFLAG_showpos
)
8014 if(fmtfl
& FMTFLAG_showbase
)
8021 if(type
== FMTFLAG_fixed
)
8023 else if(type
== FMTFLAG_scientific
)
8024 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
8025 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
8026 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
8028 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
8034 /* ?_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 */
8035 /* ?_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 */
8036 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8037 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8038 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8040 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8041 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8045 /* ?_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 */
8046 /* ?_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 */
8047 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8048 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8049 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8051 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8052 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8056 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
8057 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8058 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8059 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8061 basic_string_char grouping_bstr
;
8062 const char *grouping
;
8063 char *p
, dec_point
= *localeconv()->decimal_point
;
8065 int cur_group
= 0, group_size
= 0;
8066 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8067 MSVCP_size_t i
, pad
;
8069 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8071 for(p
=buf
; p
<buf
+count
; p
++) {
8077 /* Add separators to number */
8078 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8079 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8080 #if _MSVCP_VER >= 70
8081 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
8084 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8086 if(group_size
== grouping
[cur_group
]) {
8088 if(grouping
[cur_group
+1])
8091 memmove(p
+1, p
, buf
+count
-p
);
8092 *p
= '\0'; /* mark thousands separator positions */
8096 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8098 /* Display number with padding */
8099 if(count
>= base
->wide
)
8102 pad
= base
->wide
-count
;
8105 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8106 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8109 if(adjustfield
!= FMTFLAG_left
) {
8110 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8114 for(i
=0; i
<count
; i
++) {
8115 if(buf
[i
] == dec_point
)
8116 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
8118 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8120 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8123 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8126 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
8127 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8128 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
8129 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8130 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
8132 int base
= fmtfl
& FMTFLAG_basefield
;
8135 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
8138 if(fmtfl
& FMTFLAG_showpos
)
8140 if(fmtfl
& FMTFLAG_showbase
)
8147 if(base
== FMTFLAG_oct
)
8149 else if(base
== FMTFLAG_hex
)
8150 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
8158 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8159 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8160 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8162 basic_string_char grouping_bstr
;
8163 const char *grouping
;
8166 int cur_group
= 0, group_size
= 0;
8167 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8168 MSVCP_size_t i
, pad
;
8170 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8172 /* Add separators to number */
8173 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8174 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8175 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8177 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8179 if(group_size
== grouping
[cur_group
]) {
8181 if(grouping
[cur_group
+1])
8184 memmove(p
+1, p
, buf
+count
-p
);
8185 *p
= '\0'; /* mark thousands separator positions */
8189 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8191 /* Display number with padding */
8192 if(count
>= base
->wide
)
8195 pad
= base
->wide
-count
;
8198 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8199 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8201 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
8202 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
8205 if(adjustfield
!= FMTFLAG_left
) {
8206 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8210 for(i
=0; i
<count
; i
++) {
8212 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8214 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8217 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8220 /* ?_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 */
8221 /* ?_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 */
8222 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8223 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8225 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8228 /* ?_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 */
8229 /* ?_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 */
8230 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8231 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8233 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(IOS_LOCALE(base
)));
8236 /* ?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 */
8237 /* ?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 */
8238 #if _MSVCP_VER <= 100
8239 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8240 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8241 (this, ret, dest, base, fill, v))
8243 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_wchar*, \
8244 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8245 (this, ret, dest, base, fill, v))
8247 #if _MSVCP_VER != 80
8248 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
8250 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 32)
8252 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8253 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8255 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8256 char fmt
[7]; /* strlen("%+#lld")+1 */
8258 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8260 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8261 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8264 /* ?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 */
8265 /* ?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 */
8266 #if _MSVCP_VER != 80
8267 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
8269 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 32)
8271 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8272 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8274 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8275 char fmt
[7]; /* strlen("%+#lld")+1 */
8277 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8279 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8280 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8283 /* ?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 */
8284 /* ?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 */
8285 /* ?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 */
8286 /* ?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 */
8287 #if _MSVCP_VER != 80
8288 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
8290 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 32)
8292 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8293 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8295 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8296 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
8299 /* ?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 */
8300 /* ?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 */
8301 #if _MSVCP_VER <= 100
8302 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8303 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8304 (this, ret, dest, base, fill, v))
8306 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8307 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8308 (this, ret, dest, base, fill, v))
8310 #if _MSVCP_VER != 80
8311 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
8313 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 32)
8315 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8316 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8318 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8319 char fmt
[7]; /* strlen("%+#lld")+1 */
8321 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8323 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8324 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8327 /* ?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 */
8328 /* ?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 */
8329 #if _MSVCP_VER != 80
8330 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
8332 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 32)
8334 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8335 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8337 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8338 char fmt
[7]; /* strlen("%+#lld")+1 */
8340 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8342 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8343 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8346 /* ?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 */
8347 /* ?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 */
8348 /* ?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 */
8349 /* ?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 */
8350 #if _MSVCP_VER != 80
8351 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
8353 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 32)
8355 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8356 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8358 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8359 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
8362 /* ?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 */
8363 /* ?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 */
8364 /* ?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 */
8365 /* ?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 */
8366 #if _MSVCP_VER <= 100
8367 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8368 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8369 (this, ret, dest, base, fill, v))
8370 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
8371 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8372 (this, ret, dest, base, fill, v))
8374 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8375 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8376 (this, ret, dest, base, fill, v))
8377 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8378 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8379 (this, ret, dest, base, fill, v))
8381 #if _MSVCP_VER != 80
8382 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
8384 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 36)
8386 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8387 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8390 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8394 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8396 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8397 prec
= get_precision(base
);
8398 size
= _scprintf(fmt
, prec
, v
);
8400 /* TODO: don't use dynamic allocation */
8401 tmp
= MSVCRT_operator_new(size
*2);
8403 ERR("Out of memory\n");
8404 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8406 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8407 numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8408 MSVCRT_operator_delete(tmp
);
8412 /* ?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 */
8413 /* ?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 */
8414 /* ?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 */
8415 /* ?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 */
8416 #if _MSVCP_VER != 80
8417 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
8419 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 36)
8421 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8422 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8425 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8429 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8431 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8432 prec
= get_precision(base
);
8433 size
= _scprintf(fmt
, prec
, v
);
8435 /* TODO: don't use dynamic allocation */
8436 tmp
= MSVCRT_operator_new(size
*2);
8438 ERR("Out of memory\n");
8439 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8441 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8442 numpunct_short_use_facet(IOS_LOCALE(base
)));
8443 MSVCRT_operator_delete(tmp
);
8447 /* ?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 */
8448 /* ?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 */
8449 /* ?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 */
8450 /* ?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 */
8451 #if _MSVCP_VER != 80
8452 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
8454 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 36)
8456 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8457 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8459 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8460 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
8463 /* ?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 */
8464 /* ?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 */
8465 /* ?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 */
8466 /* ?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 */
8467 #if _MSVCP_VER != 80
8468 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
8470 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 36)
8472 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8473 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8475 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8476 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
8479 /* ?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 */
8480 /* ?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 */
8481 #if _MSVCP_VER <= 100
8482 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
8483 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8484 (this, ret, dest, base, fill, v))
8486 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8487 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8488 (this, ret, dest, base, fill, v))
8490 #if _MSVCP_VER != 80
8491 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
8493 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 32)
8495 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8496 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8498 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8500 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8502 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8505 /* ?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 */
8506 /* ?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 */
8507 #if _MSVCP_VER != 80
8508 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
8510 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 32)
8512 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8513 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8515 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8517 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8519 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8522 /* ?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 */
8523 /* ?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 */
8524 /* ?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 */
8525 /* ?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 */
8526 #if _MSVCP_VER != 80
8527 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
8529 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 32)
8531 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8532 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8534 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8535 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
8538 /* ?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 */
8539 /* ?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 */
8540 #if _MSVCP_VER <= 100
8541 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8542 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8543 (this, ret, dest, base, fill, v))
8545 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8546 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8547 (this, ret, dest, base, fill, v))
8549 #if _MSVCP_VER != 80
8550 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
8552 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 36)
8554 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8555 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8557 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8558 char fmt
[7]; /* strlen("%+#lld")+1 */
8560 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8562 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8563 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8566 /* ?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 */
8567 /* ?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 */
8568 #if _MSVCP_VER != 80
8569 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
8571 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 36)
8573 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8574 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8576 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8577 char fmt
[7]; /* strlen("%+#lld")+1 */
8579 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8581 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8582 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8585 /* ?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 */
8586 /* ?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 */
8587 /* ?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 */
8588 /* ?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 */
8589 #if _MSVCP_VER != 80
8590 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
8592 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 36)
8594 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8595 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8597 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8598 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
8601 /* ?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 */
8602 /* ?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 */
8603 #if _MSVCP_VER <= 100
8604 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8605 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8606 (this, ret, dest, base, fill, v))
8608 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8609 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8610 (this, ret, dest, base, fill, v))
8612 #if _MSVCP_VER != 80
8613 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
8615 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 36)
8617 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8618 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8620 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8621 char fmt
[7]; /* strlen("%+#lld")+1 */
8623 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8625 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8626 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8629 /* ?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 */
8630 /* ?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 */
8631 #if _MSVCP_VER != 80
8632 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
8634 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 36)
8636 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8637 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8639 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8640 char fmt
[7]; /* strlen("%+#lld")+1 */
8642 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8644 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8645 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8648 /* ?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 */
8649 /* ?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 */
8650 /* ?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 */
8651 /* ?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 */
8652 #if _MSVCP_VER != 80
8653 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
8655 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 36)
8657 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8658 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8660 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8661 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
8664 /* ?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 */
8665 /* ?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 */
8666 #if _MSVCP_VER <= 100
8667 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8668 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8669 (this, ret, dest, base, fill, v))
8671 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_wchar*, \
8672 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8673 (this, ret, dest, base, fill, v))
8675 #if _MSVCP_VER != 80
8676 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
8678 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 32)
8680 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8681 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8683 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8685 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8686 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(IOS_LOCALE(base
));
8687 basic_string_wchar str
;
8688 MSVCP_size_t pad
, len
;
8691 numpunct_wchar_truename(numpunct
, &str
);
8693 numpunct_wchar_falsename(numpunct
, &str
);
8695 len
= MSVCP_basic_string_wchar_length(&str
);
8696 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8699 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8700 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8703 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8704 MSVCP_basic_string_wchar_dtor(&str
);
8705 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8708 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8711 /* ?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 */
8712 /* ?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 */
8713 #if _MSVCP_VER != 80
8714 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
8716 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 32)
8718 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8719 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8721 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8723 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8724 numpunct_wchar
*numpunct
= numpunct_short_use_facet(IOS_LOCALE(base
));
8725 basic_string_wchar str
;
8726 MSVCP_size_t pad
, len
;
8729 numpunct_wchar_truename(numpunct
, &str
);
8731 numpunct_wchar_falsename(numpunct
, &str
);
8733 len
= MSVCP_basic_string_wchar_length(&str
);
8734 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8737 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8738 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8741 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8742 MSVCP_basic_string_wchar_dtor(&str
);
8743 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8746 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8749 /* ?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 */
8750 /* ?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 */
8751 /* ?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 */
8752 /* ?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 */
8753 #if _MSVCP_VER != 80
8754 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
8756 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 32)
8758 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8759 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8761 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8762 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
8765 /* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
8766 locale_id time_put_char_id
= {0};
8768 /* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
8769 extern const vtable_ptr MSVCP_time_put_char_vtable
;
8771 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8772 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8773 DEFINE_THISCALL_WRAPPER(time_put_char__Init
, 8)
8774 void __thiscall
time_put_char__Init(time_put
*this, const _Locinfo
*locinfo
)
8776 TRACE("(%p %p)\n", this, locinfo
);
8777 _Locinfo__Gettnames(locinfo
, &this->time
);
8778 _Locinfo__Getcvt(locinfo
, &this->cvt
);
8781 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8782 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8783 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo
, 12)
8784 time_put
* __thiscall
time_put_char_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8786 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
8787 locale_facet_ctor_refs(&this->facet
, refs
);
8788 this->facet
.vtable
= &MSVCP_time_put_char_vtable
;
8789 time_put_char__Init(this, locinfo
);
8793 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
8794 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
8795 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs
, 8)
8796 time_put
* __thiscall
time_put_char_ctor_refs(time_put
*this, MSVCP_size_t refs
)
8800 TRACE("(%p %lu)\n", this, refs
);
8802 _Locinfo_ctor(&locinfo
);
8803 time_put_char_ctor_locinfo(this, &locinfo
, refs
);
8804 _Locinfo_dtor(&locinfo
);
8808 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
8809 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
8810 DEFINE_THISCALL_WRAPPER(time_put_char_ctor
, 4)
8811 time_put
* __thiscall
time_put_char_ctor(time_put
*this)
8813 return time_put_char_ctor_refs(this, 0);
8816 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
8817 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
8818 DEFINE_THISCALL_WRAPPER(time_put_char_dtor
, 4)
8819 void __thiscall
time_put_char_dtor(time_put
*this)
8821 TRACE("(%p)\n", this);
8822 _Timevec_dtor(&this->time
);
8825 DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor
, 8)
8826 time_put
* __thiscall
time_put_char_vector_dtor(time_put
*this, unsigned int flags
)
8828 TRACE("(%p %x)\n", this, flags
);
8830 /* we have an array, with the number of elements stored before the first object */
8831 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8833 for(i
=*ptr
-1; i
>=0; i
--)
8834 time_put_char_dtor(this+i
);
8835 MSVCRT_operator_delete(ptr
);
8837 time_put_char_dtor(this);
8839 MSVCRT_operator_delete(this);
8845 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8846 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8847 MSVCP_size_t __cdecl
time_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
8849 TRACE("(%p %p)\n", facet
, loc
);
8851 if(facet
&& !*facet
) {
8854 *facet
= MSVCRT_operator_new(sizeof(time_put
));
8856 ERR("Out of memory\n");
8857 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8861 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8862 time_put_char_ctor_locinfo((time_put
*)*facet
, &locinfo
, 0);
8863 _Locinfo_dtor(&locinfo
);
8869 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8870 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8871 MSVCP_size_t __cdecl
time_put_char__Getcat_old(const locale_facet
**facet
)
8873 return time_put_char__Getcat(facet
, locale_classic());
8876 static time_put
* time_put_char_use_facet(const locale
*loc
)
8878 static time_put
*obj
= NULL
;
8881 const locale_facet
*fac
;
8883 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8884 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_char_id
));
8886 _Lockit_dtor(&lock
);
8887 return (time_put
*)fac
;
8891 _Lockit_dtor(&lock
);
8895 time_put_char__Getcat(&fac
, loc
);
8896 obj
= (time_put
*)fac
;
8897 call_locale_facet__Incref(&obj
->facet
);
8898 locale_facet_register(&obj
->facet
);
8899 _Lockit_dtor(&lock
);
8904 #if _MSVCP_VER >= 70
8906 /* ?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 */
8907 /* ?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 */
8908 #if _MSVCP_VER != 80
8909 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 36)
8911 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 40)
8913 #if _MSVCP_VER <= 100
8914 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
8915 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
8916 (this, ret, dest, base, fill, t, spec, mod))
8918 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
8919 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
8920 (this, ret, dest, base, fill, t, spec, mod))
8922 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
8923 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
8925 char buf
[64], fmt
[4], *p
= fmt
;
8926 MSVCP_size_t i
, len
;
8928 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
8936 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
8937 for(i
=0; i
<len
; i
++)
8938 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
8944 /* ?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 */
8945 /* ?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 */
8946 #if _MSVCP_VER != 80
8947 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 36)
8949 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 40)
8951 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
8952 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
8954 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
8955 return call_time_put_char_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
8958 /* ?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 */
8959 /* ?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 */
8960 #if _MSVCP_VER != 80
8961 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 36)
8963 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 40)
8965 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
8966 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, const char *pat
, const char *pat_end
)
8968 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_an(pat
, pat_end
-pat
));
8970 while(pat
< pat_end
) {
8972 ostreambuf_iterator_char_put(&dest
, *pat
++);
8973 }else if(++pat
== pat_end
) {
8974 ostreambuf_iterator_char_put(&dest
, '%');
8975 }else if(*pat
=='#' && pat
+1==pat_end
) {
8976 ostreambuf_iterator_char_put(&dest
, '%');
8977 ostreambuf_iterator_char_put(&dest
, *pat
++);
8988 time_put_char_put(this, &dest
, dest
, base
, fill
, t
, *pat
++, mod
);
8996 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
8998 /* ?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 */
8999 /* ?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 */
9000 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 32)
9001 #define call_time_put_char_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9002 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, const struct tm*, char, char), \
9003 (this, ret, dest, base, t, spec, mod))
9004 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9005 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9007 char buf
[64], fmt
[4], *p
= fmt
;
9008 MSVCP_size_t i
, len
;
9010 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9018 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9019 for(i
=0; i
<len
; i
++)
9020 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9026 /* ?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 */
9027 /* ?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 */
9028 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 32)
9029 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9030 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9032 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9033 return call_time_put_char_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9036 /* ?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 */
9037 /* ?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 */
9038 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 32)
9039 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9040 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9042 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_an(pat
, pat_end
-pat
));
9044 while(pat
< pat_end
) {
9046 ostreambuf_iterator_char_put(&dest
, *pat
++);
9047 }else if(++pat
== pat_end
) {
9048 ostreambuf_iterator_char_put(&dest
, '%');
9049 }else if(*pat
=='#' && pat
+1==pat_end
) {
9050 ostreambuf_iterator_char_put(&dest
, '%');
9051 ostreambuf_iterator_char_put(&dest
, *pat
++);
9062 time_put_char_put(this, &dest
, dest
, base
, t
, *pat
++, mod
);
9070 #endif /* MSVCP_VER >= 70 */
9072 /* ?id@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
9073 locale_id time_put_wchar_id
= {0};
9074 /* ?id@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
9075 locale_id time_put_short_id
= {0};
9077 /* ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
9078 extern const vtable_ptr MSVCP_time_put_wchar_vtable
;
9079 /* ??_7?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
9080 extern const vtable_ptr MSVCP_time_put_short_vtable
;
9082 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9083 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9084 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9085 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9086 DEFINE_THISCALL_WRAPPER(time_put_wchar__Init
, 8)
9087 void __thiscall
time_put_wchar__Init(time_put
*this, const _Locinfo
*locinfo
)
9089 TRACE("(%p %p)\n", this, locinfo
);
9090 _Locinfo__Gettnames(locinfo
, &this->time
);
9091 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9094 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9095 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9096 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo
, 12)
9097 time_put
* __thiscall
time_put_wchar_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9099 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
9100 locale_facet_ctor_refs(&this->facet
, refs
);
9101 this->facet
.vtable
= &MSVCP_time_put_wchar_vtable
;
9102 time_put_wchar__Init(this, locinfo
);
9106 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9107 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9108 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo
, 12)
9109 time_put
* __thiscall
time_put_short_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9111 time_put_wchar_ctor_locinfo(this, locinfo
, refs
);
9112 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9116 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
9117 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
9118 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name
, 12)
9119 time_put
* __thiscall
time_put_wchar_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9123 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
9125 _Locinfo_ctor_cstr(&locinfo
, name
);
9126 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9127 _Locinfo_dtor(&locinfo
);
9131 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */
9132 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */
9133 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name
, 12)
9134 time_put
* __thiscall
time_put_short_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9136 time_put_wchar_ctor_name(this, name
, refs
);
9137 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9141 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
9142 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
9143 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs
, 8)
9144 time_put
* __thiscall
time_put_wchar_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9148 TRACE("(%p %lu)\n", this, refs
);
9150 _Locinfo_ctor(&locinfo
);
9151 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9152 _Locinfo_dtor(&locinfo
);
9156 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
9157 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
9158 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs
, 8)
9159 time_put
* __thiscall
time_put_short_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9161 time_put_wchar_ctor_refs(this, refs
);
9162 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9166 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
9167 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
9168 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor
, 4)
9169 time_put
* __thiscall
time_put_wchar_ctor(time_put
*this)
9171 return time_put_wchar_ctor_refs(this, 0);
9174 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
9175 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
9176 DEFINE_THISCALL_WRAPPER(time_put_short_ctor
, 4)
9177 time_put
* __thiscall
time_put_short_ctor(time_put
*this)
9179 time_put_wchar_ctor(this);
9180 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9184 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
9185 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
9186 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
9187 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
9188 DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor
, 4)
9189 void __thiscall
time_put_wchar_dtor(time_put
*this)
9191 TRACE("(%p)\n", this);
9192 _Timevec_dtor(&this->time
);
9195 DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor
, 8)
9196 time_put
* __thiscall
time_put_wchar_vector_dtor(time_put
*this, unsigned int flags
)
9198 TRACE("(%p %x)\n", this, flags
);
9200 /* we have an array, with the number of elements stored before the first object */
9201 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9203 for(i
=*ptr
-1; i
>=0; i
--)
9204 time_put_wchar_dtor(this+i
);
9205 MSVCRT_operator_delete(ptr
);
9207 time_put_wchar_dtor(this);
9209 MSVCRT_operator_delete(this);
9215 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9216 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9217 MSVCP_size_t __cdecl
time_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
9219 TRACE("(%p %p)\n", facet
, loc
);
9221 if(facet
&& !*facet
) {
9222 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9224 ERR("Out of memory\n");
9225 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9228 time_put_wchar_ctor_name((time_put
*)*facet
,
9229 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9235 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9236 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9237 MSVCP_size_t __cdecl
time_put_wchar__Getcat_old(const locale_facet
**facet
)
9239 return time_put_wchar__Getcat(facet
, locale_classic());
9242 static time_put
* time_put_wchar_use_facet(const locale
*loc
)
9244 static time_put
*obj
= NULL
;
9247 const locale_facet
*fac
;
9249 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9250 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_wchar_id
));
9252 _Lockit_dtor(&lock
);
9253 return (time_put
*)fac
;
9257 _Lockit_dtor(&lock
);
9261 time_put_wchar__Getcat(&fac
, loc
);
9262 obj
= (time_put
*)fac
;
9263 call_locale_facet__Incref(&obj
->facet
);
9264 locale_facet_register(&obj
->facet
);
9265 _Lockit_dtor(&lock
);
9270 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9271 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9272 MSVCP_size_t __cdecl
time_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
9274 TRACE("(%p %p)\n", facet
, loc
);
9276 if(facet
&& !*facet
) {
9277 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9279 ERR("Out of memory\n");
9280 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9283 time_put_short_ctor_name((time_put
*)*facet
,
9284 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9290 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9291 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9292 MSVCP_size_t __cdecl
time_put_short__Getcat_old(const locale_facet
**facet
)
9294 return time_put_short__Getcat(facet
, locale_classic());
9297 static time_put
* time_put_short_use_facet(const locale
*loc
)
9299 static time_put
*obj
= NULL
;
9302 const locale_facet
*fac
;
9304 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9305 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_short_id
));
9307 _Lockit_dtor(&lock
);
9308 return (time_put
*)fac
;
9312 _Lockit_dtor(&lock
);
9316 time_put_short__Getcat(&fac
, loc
);
9317 obj
= (time_put
*)fac
;
9318 call_locale_facet__Incref(&obj
->facet
);
9319 locale_facet_register(&obj
->facet
);
9320 _Lockit_dtor(&lock
);
9325 #if _MSVCP_VER >= 70
9327 /* ?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 */
9328 /* ?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 */
9329 /* ?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 */
9330 /* ?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 */
9331 #if _MSVCP_VER != 80
9332 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 36)
9334 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 40)
9336 #if _MSVCP_VER <= 100
9337 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9338 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9339 (this, ret, dest, base, fill, t, spec, mod))
9341 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
9342 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9343 (this, ret, dest, base, fill, t, spec, mod))
9345 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9346 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9347 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9349 char buf
[64], fmt
[4], *p
= fmt
;
9350 MSVCP_size_t i
, len
;
9353 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9361 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9362 for(i
=0; i
<len
; i
++) {
9363 c
= mb_to_wc(buf
[i
], &this->cvt
);
9364 ostreambuf_iterator_wchar_put(&dest
, c
);
9371 /* ?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 */
9372 /* ?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 */
9373 /* ?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 */
9374 /* ?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 */
9375 #if _MSVCP_VER != 80
9376 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 36)
9378 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 40)
9380 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9381 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9382 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9384 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9385 return call_time_put_wchar_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9388 /* ?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 */
9389 /* ?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 */
9390 /* ?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 */
9391 /* ?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 */
9392 #if _MSVCP_VER != 80
9393 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 36)
9395 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 40)
9397 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9398 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9399 wchar_t fill
, const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9401 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9404 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_wn(pat
, pat_end
-pat
));
9406 while(pat
< pat_end
) {
9407 if(*pat
!= percent
) {
9408 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9409 }else if(++pat
== pat_end
) {
9410 ostreambuf_iterator_wchar_put(&dest
, percent
);
9411 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9412 ostreambuf_iterator_wchar_put(&dest
, percent
);
9413 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9417 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9418 ostreambuf_iterator_wchar_put(&dest
, percent
);
9419 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9420 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9422 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, '#');
9425 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, 0);
9434 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9436 /* ?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 */
9437 /* ?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 */
9438 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 32)
9439 #define call_time_put_wchar_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9440 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, const struct tm*, char, char), \
9441 (this, ret, dest, base, t, spec, mod))
9442 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9443 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9444 const struct tm
*t
, char spec
, char mod
)
9446 char buf
[64], fmt
[4], *p
= fmt
;
9447 MSVCP_size_t i
, len
;
9450 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9458 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9459 for(i
=0; i
<len
; i
++) {
9460 c
= mb_to_wc(buf
[i
], &this->cvt
);
9461 ostreambuf_iterator_wchar_put(&dest
, c
);
9468 /* ?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 */
9469 /* ?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 */
9470 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 32)
9471 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9472 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9473 const struct tm
*t
, char spec
, char mod
)
9475 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9476 return call_time_put_wchar_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9479 /* ?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 */
9480 /* ?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 */
9481 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 32)
9482 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9483 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9484 const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9486 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9489 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_wn(pat
, pat_end
-pat
));
9491 while(pat
< pat_end
) {
9492 if(*pat
!= percent
) {
9493 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9494 }else if(++pat
== pat_end
) {
9495 ostreambuf_iterator_wchar_put(&dest
, percent
);
9496 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9497 ostreambuf_iterator_wchar_put(&dest
, percent
);
9498 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9502 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9503 ostreambuf_iterator_wchar_put(&dest
, percent
);
9504 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9505 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9507 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, '#');
9510 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, 0);
9519 #endif /* _MSVCP_VER >= 70 */
9521 /* ?id@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
9522 locale_id time_get_char_id
= {0};
9524 /* ??_7?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
9525 extern const vtable_ptr MSVCP_time_get_char_vtable
;
9527 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9528 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9529 DEFINE_THISCALL_WRAPPER(time_get_char__Init
, 8)
9530 void __thiscall
time_get_char__Init(time_get_char
*this, const _Locinfo
*locinfo
)
9532 FIXME("(%p %p) stub\n", this, locinfo
);
9535 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAE@PBDI@Z */
9536 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAA@PEBD_K@Z */
9537 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_name
, 12)
9538 time_get_char
* __thiscall
time_get_char_ctor_name(time_get_char
*this, const char *name
, unsigned int refs
)
9540 FIXME("(%p %p %d) stub\n", this, name
, refs
);
9541 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9545 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9546 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9547 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_locinfo
, 12)
9548 time_get_char
* __thiscall
time_get_char_ctor_locinfo(time_get_char
*this,
9549 const _Locinfo
*locinfo
, unsigned int refs
)
9551 FIXME("(%p %p %d) stub\n", this, locinfo
, refs
);
9552 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9556 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
9557 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
9558 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_refs
, 8)
9559 time_get_char
* __thiscall
time_get_char_ctor_refs(time_get_char
*this, unsigned int refs
)
9561 FIXME("(%p %d) stub\n", this, refs
);
9562 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9566 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9567 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9568 DEFINE_THISCALL_WRAPPER(time_get_char_ctor
, 4)
9569 time_get_char
* __thiscall
time_get_char_ctor(time_get_char
*this)
9571 return time_get_char_ctor_refs(this, 0);
9574 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AAEXXZ */
9575 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEAAXXZ */
9576 DEFINE_THISCALL_WRAPPER(time_get_char__Tidy
, 4)
9577 void __thiscall
time_get_char__Tidy(time_get_char
*this)
9579 FIXME("(%p) stub\n", this);
9582 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9583 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9584 DEFINE_THISCALL_WRAPPER(time_get_char_dtor
, 4) /* virtual */
9585 void __thiscall
time_get_char_dtor(time_get_char
*this)
9587 FIXME("(%p) stub\n", this);
9590 DEFINE_THISCALL_WRAPPER(time_get_char_vector_dtor
, 8)
9591 time_get_char
* __thiscall
time_get_char_vector_dtor(time_get_char
*this, unsigned int flags
)
9593 TRACE("(%p %x)\n", this, flags
);
9595 /* we have an array, with the number of elements stored before the first object */
9596 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9598 for(i
=*ptr
-1; i
>=0; i
--)
9599 time_get_char_dtor(this+i
);
9600 MSVCRT_operator_delete(ptr
);
9602 time_get_char_dtor(this);
9604 MSVCRT_operator_delete(this);
9610 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9611 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9612 unsigned int __cdecl
time_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9614 TRACE("(%p %p)\n", facet
, loc
);
9616 if(facet
&& !*facet
) {
9619 *facet
= MSVCRT_operator_new(sizeof(time_get_char
));
9621 ERR("Out of memory\n");
9622 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9626 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9627 time_get_char_ctor_locinfo((time_get_char
*)*facet
, &locinfo
, 0);
9628 _Locinfo_dtor(&locinfo
);
9634 static time_get_char
* time_get_char_use_facet(const locale
*loc
)
9636 static time_get_char
*obj
= NULL
;
9639 const locale_facet
*fac
;
9641 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9642 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_get_char_id
));
9644 _Lockit_dtor(&lock
);
9645 return (time_get_char
*)fac
;
9649 _Lockit_dtor(&lock
);
9653 time_get_char__Getcat(&fac
, loc
);
9654 obj
= (time_get_char
*)fac
;
9655 call_locale_facet__Incref(&obj
->facet
);
9656 locale_facet_register(&obj
->facet
);
9657 _Lockit_dtor(&lock
);
9662 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAAH@Z */
9663 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAEAH@Z */
9664 int __cdecl
time_get_char__Getint(const time_get_char
*this,
9665 istreambuf_iterator_char
*b
, istreambuf_iterator_char
*e
,
9666 int unk1
, int unk2
, int *val
)
9668 FIXME("(%p %p %p %d %d %p) stub\n", this, b
, e
, unk1
, unk2
, val
);
9672 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AW4dateorder@time_base@2@XZ */
9673 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AW4dateorder@time_base@2@XZ */
9674 DEFINE_THISCALL_WRAPPER(time_get_char_do_date_order
, 4) /* virtual */
9675 #if _MSVCP_VER <= 100
9676 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 4, dateorder, (const time_get_char*), (this))
9678 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 12, dateorder, (const time_get_char*), (this))
9680 dateorder __thiscall
time_get_char_do_date_order(const time_get_char
*this)
9682 TRACE("(%p)\n", this);
9683 return this->dateorder
;
9686 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AW4dateorder@time_base@2@XZ */
9687 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AW4dateorder@time_base@2@XZ */
9688 DEFINE_THISCALL_WRAPPER(time_get_char_date_order
, 4)
9689 dateorder __thiscall
time_get_char_date_order(const time_get_char
*this)
9691 return call_time_get_char_do_date_order(this);
9694 /* ?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 */
9695 /* ?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 */
9696 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_date
, 36) /* virtual */
9697 #if _MSVCP_VER <= 100
9698 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
9699 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9700 (this, ret, s, e, base, err, t))
9702 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9703 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9704 (this, ret, s, e, base, err, t))
9706 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_date(const time_get_char
*this,
9707 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9708 ios_base
*base
, int *err
, struct tm
*t
)
9710 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9714 /* ?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 */
9715 /* ?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 */
9716 DEFINE_THISCALL_WRAPPER(time_get_char_get_date
, 36)
9717 istreambuf_iterator_char
* __thiscall
time_get_char_get_date(const time_get_char
*this,
9718 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9719 ios_base
*base
, int *err
, struct tm
*t
)
9721 return call_time_get_char_do_get_date(this, ret
, s
, e
, base
, err
, t
);
9724 /* ?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 */
9725 /* ?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 */
9726 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_monthname
, 36) /* virtual */
9727 #if _MSVCP_VER <= 100
9728 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9729 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9730 (this, ret, s, e, base, err, t))
9732 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
9733 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9734 (this, ret, s, e, base, err, t))
9736 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_monthname(const time_get_char
*this,
9737 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9738 ios_base
*base
, int *err
, struct tm
*t
)
9740 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9744 /* ?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 */
9745 /* ?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 */
9746 DEFINE_THISCALL_WRAPPER(time_get_char_get_monthname
, 36)
9747 istreambuf_iterator_char
* __thiscall
time_get_char_get_monthname(const time_get_char
*this,
9748 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9749 ios_base
*base
, int *err
, struct tm
*t
)
9751 return call_time_get_char_do_get_monthname(this, ret
, s
, e
, base
, err
, t
);
9754 /* ?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 */
9755 /* ?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 */
9756 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_time
, 36) /* virtual */
9757 #if _MSVCP_VER <= 100
9758 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
9759 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9760 (this, ret, s, e, base, err, t))
9762 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
9763 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9764 (this, ret, s, e, base, err, t))
9766 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_time(const time_get_char
*this,
9767 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9768 ios_base
*base
, int *err
, struct tm
*t
)
9770 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9774 /* ?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 */
9775 /* ?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 */
9776 DEFINE_THISCALL_WRAPPER(time_get_char_get_time
, 36)
9777 istreambuf_iterator_char
* __thiscall
time_get_char_get_time(const time_get_char
*this,
9778 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9779 ios_base
*base
, int *err
, struct tm
*t
)
9781 return call_time_get_char_do_get_time(this, ret
, s
, e
, base
, err
, t
);
9784 /* ?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 */
9785 /* ?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 */
9786 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_weekday
, 36) /* virtual */
9787 #if _MSVCP_VER <= 100
9788 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
9789 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9790 (this, ret, s, e, base, err, t))
9792 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
9793 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9794 (this, ret, s, e, base, err, t))
9796 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_weekday(const time_get_char
*this,
9797 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9798 ios_base
*base
, int *err
, struct tm
*t
)
9800 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9804 /* ?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 */
9805 /* ?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 */
9806 DEFINE_THISCALL_WRAPPER(time_get_char_get_weekday
, 36)
9807 istreambuf_iterator_char
* __thiscall
time_get_char_get_weekday(const time_get_char
*this,
9808 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9809 ios_base
*base
, int *err
, struct tm
*t
)
9811 return call_time_get_char_do_get_weekday(this, ret
, s
, e
, base
, err
, t
);
9814 /* ?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 */
9815 /* ?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 */
9816 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_year
, 36) /* virtual */
9817 #if _MSVCP_VER <= 100
9818 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
9819 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9820 (this, ret, s, e, base, err, t))
9822 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
9823 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9824 (this, ret, s, e, base, err, t))
9826 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_year(const time_get_char
*this,
9827 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9828 ios_base
*base
, int *err
, struct tm
*t
)
9830 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9834 /* ?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 */
9835 /* ?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 */
9836 DEFINE_THISCALL_WRAPPER(time_get_char_get_year
, 36)
9837 istreambuf_iterator_char
* __thiscall
time_get_char_get_year(const time_get_char
*this,
9838 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9839 ios_base
*base
, int *err
, struct tm
*t
)
9841 return call_time_get_char_do_get_year(this, ret
, s
, e
, base
, err
, t
);
9844 /* ??0_Locimp@locale@std@@AAE@_N@Z */
9845 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
9846 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
9847 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
9849 TRACE("(%p %d)\n", this, transparent
);
9851 memset(this, 0, sizeof(locale__Locimp
));
9852 locale_facet_ctor_refs(&this->facet
, 1);
9853 this->transparent
= transparent
;
9854 locale_string_char_ctor_cstr(&this->name
, "*");
9858 /* ??_F_Locimp@locale@std@@QAEXXZ */
9859 /* ??_F_Locimp@locale@std@@QEAAXXZ */
9860 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
9861 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
9863 return locale__Locimp_ctor_transparent(this, FALSE
);
9866 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
9867 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
9868 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
9869 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
9874 TRACE("(%p %p)\n", this, copy
);
9876 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9877 memcpy(this, copy
, sizeof(locale__Locimp
));
9878 locale_facet_ctor_refs(&this->facet
, 1);
9879 if(copy
->facetvec
) {
9880 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
9881 if(!this->facetvec
) {
9882 _Lockit_dtor(&lock
);
9883 ERR("Out of memory\n");
9884 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9887 for(i
=0; i
<this->facet_cnt
; i
++)
9889 this->facetvec
[i
] = copy
->facetvec
[i
];
9890 if(this->facetvec
[i
])
9891 call_locale_facet__Incref(this->facetvec
[i
]);
9894 locale_string_char_copy_ctor(&this->name
, ©
->name
);
9895 _Lockit_dtor(&lock
);
9899 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
9900 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
9901 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
9903 return locale__Locimp_copy_ctor(this, copy
);
9906 /* ??1_Locimp@locale@std@@MAE@XZ */
9907 /* ??1_Locimp@locale@std@@MEAA@XZ */
9908 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
9909 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
9913 TRACE("(%p)\n", this);
9915 locale_facet_dtor(&this->facet
);
9916 for(i
=0; i
<this->facet_cnt
; i
++)
9917 if(this->facetvec
[i
] && call_locale_facet__Decref(this->facetvec
[i
]))
9918 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
9920 MSVCRT_operator_delete(this->facetvec
);
9921 locale_string_char_dtor(&this->name
);
9924 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
9925 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
9926 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
9928 locale__Locimp_dtor(this);
9931 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
9932 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
9934 TRACE("(%p %x)\n", this, flags
);
9936 /* we have an array, with the number of elements stored before the first object */
9937 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9939 for(i
=*ptr
-1; i
>=0; i
--)
9940 locale__Locimp_dtor(this+i
);
9941 MSVCRT_operator_delete(ptr
);
9943 locale__Locimp_dtor(this);
9945 MSVCRT_operator_delete(this);
9951 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@ABV123@@Z */
9952 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z */
9953 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp(const locale__Locimp
*copy
)
9955 locale__Locimp
*ret
;
9957 TRACE("(%p)\n", copy
);
9959 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9961 ERR("Out of memory\n");
9962 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9965 return locale__Locimp_copy_ctor(ret
, copy
);
9968 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z */
9969 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z */
9970 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp_transparent(MSVCP_bool transparent
)
9972 locale__Locimp
*ret
;
9974 TRACE("(%x)\n", transparent
);
9976 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9978 ERR("Out of memory\n");
9979 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9982 return locale__Locimp_ctor_transparent(ret
, transparent
);
9985 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
9986 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
9987 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
9991 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
9993 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9994 if(id
>= locimp
->facet_cnt
) {
9995 MSVCP_size_t new_size
= id
+1;
9996 locale_facet
**new_facetvec
;
9998 if(new_size
< locale_id__Id_cnt
+1)
9999 new_size
= locale_id__Id_cnt
+1;
10001 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
10002 if(!new_facetvec
) {
10003 _Lockit_dtor(&lock
);
10004 ERR("Out of memory\n");
10005 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10009 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
10010 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
10011 MSVCRT_operator_delete(locimp
->facetvec
);
10012 locimp
->facetvec
= new_facetvec
;
10013 locimp
->facet_cnt
= new_size
;
10016 if(locimp
->facetvec
[id
] && call_locale_facet__Decref(locimp
->facetvec
[id
]))
10017 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
10019 locimp
->facetvec
[id
] = facet
;
10021 call_locale_facet__Incref(facet
);
10022 _Lockit_dtor(&lock
);
10025 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
10026 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
10027 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
10028 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
10030 locale__Locimp__Locimp_Addfac(this, facet
, id
);
10033 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
10034 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
10035 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
10041 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10042 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10043 /* List of missing facets:
10044 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10046 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10048 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10050 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
10051 ctype_wchar
*ctype
;
10054 ctype
= ctype_short_use_facet(loc
);
10056 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10058 ERR("Out of memory\n");
10059 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10061 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
10063 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
10066 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
10070 numget
= num_get_short_use_facet(loc
);
10072 numget
= MSVCRT_operator_new(sizeof(num_get
));
10074 ERR("Out of memory\n");
10075 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10077 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
10079 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
10082 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
10086 numput
= num_put_short_use_facet(loc
);
10088 numput
= MSVCRT_operator_new(sizeof(num_put
));
10090 ERR("Out of memory\n");
10091 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10093 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
10095 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
10098 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
10099 numpunct_wchar
*numpunct
;
10102 numpunct
= numpunct_short_use_facet(loc
);
10104 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10106 ERR("Out of memory\n");
10107 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10109 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10111 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
10114 if(cat
& (1<<(collate_short__Getcat(NULL
, NULL
)-1))) {
10118 c
= collate_short_use_facet(loc
);
10120 c
= MSVCRT_operator_new(sizeof(collate
));
10122 ERR("Out of memory\n");
10123 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10125 collate_short_ctor_locinfo(c
, locinfo
, 0);
10127 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_short_id
));
10130 if(cat
& (1<<(time_put_short__Getcat(NULL
, NULL
)-1))) {
10134 t
= time_put_short_use_facet(loc
);
10136 t
= MSVCRT_operator_new(sizeof(time_put
));
10138 ERR("Out of memory\n");
10139 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10141 time_put_short_ctor_locinfo(t
, locinfo
, 0);
10143 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_short_id
));
10146 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
10147 codecvt_wchar
*codecvt
;
10150 codecvt
= codecvt_short_use_facet(loc
);
10152 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10154 ERR("Out of memory\n");
10155 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10157 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
10159 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
10163 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10164 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10165 /* List of missing facets:
10166 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10168 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10170 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10172 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
10173 ctype_wchar
*ctype
;
10176 ctype
= ctype_wchar_use_facet(loc
);
10178 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10180 ERR("Out of memory\n");
10181 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10183 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
10185 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
10188 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
10192 numget
= num_get_wchar_use_facet(loc
);
10194 numget
= MSVCRT_operator_new(sizeof(num_get
));
10196 ERR("Out of memory\n");
10197 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10199 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
10201 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
10204 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
10208 numput
= num_put_wchar_use_facet(loc
);
10210 numput
= MSVCRT_operator_new(sizeof(num_put
));
10212 ERR("Out of memory\n");
10213 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10215 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
10217 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
10220 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
10221 numpunct_wchar
*numpunct
;
10224 numpunct
= numpunct_wchar_use_facet(loc
);
10226 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10228 ERR("Out of memory\n");
10229 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10231 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10233 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
10236 if(cat
& (1<<(collate_wchar__Getcat(NULL
, NULL
)-1))) {
10240 c
= collate_wchar_use_facet(loc
);
10242 c
= MSVCRT_operator_new(sizeof(collate
));
10244 ERR("Out of memory\n");
10245 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10247 collate_wchar_ctor_locinfo(c
, locinfo
, 0);
10249 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_wchar_id
));
10252 if(cat
& (1<<(time_put_wchar__Getcat(NULL
, NULL
)-1))) {
10256 t
= time_put_wchar_use_facet(loc
);
10258 t
= MSVCRT_operator_new(sizeof(time_put
));
10260 ERR("Out of memory\n");
10261 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10263 time_put_wchar_ctor_locinfo(t
, locinfo
, 0);
10265 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_wchar_id
));
10268 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
10269 codecvt_wchar
*codecvt
;
10272 codecvt
= codecvt_wchar_use_facet(loc
);
10274 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10276 ERR("Out of memory\n");
10277 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10279 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
10281 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
10285 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10286 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10287 /* List of missing facets:
10288 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10290 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10292 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10294 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
10298 ctype
= ctype_char_use_facet(loc
);
10300 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
10302 ERR("Out of memory\n");
10303 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10305 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
10307 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
10310 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
10314 numget
= num_get_char_use_facet(loc
);
10316 numget
= MSVCRT_operator_new(sizeof(num_get
));
10318 ERR("Out of memory\n");
10319 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10321 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
10323 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
10326 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
10330 numput
= num_put_char_use_facet(loc
);
10332 numput
= MSVCRT_operator_new(sizeof(num_put
));
10334 ERR("Out of memory\n");
10335 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10337 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
10339 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
10342 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
10343 numpunct_char
*numpunct
;
10346 numpunct
= numpunct_char_use_facet(loc
);
10348 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
10350 ERR("Out of memory\n");
10351 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10353 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10355 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
10358 if(cat
& (1<<(collate_char__Getcat(NULL
, NULL
)-1))) {
10362 c
= collate_char_use_facet(loc
);
10364 c
= MSVCRT_operator_new(sizeof(collate
));
10366 ERR("Out of memory\n");
10367 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10369 collate_char_ctor_locinfo(c
, locinfo
, 0);
10371 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_char_id
));
10374 if(cat
& (1<<(time_get_char__Getcat(NULL
, NULL
)-1))) {
10378 t
= time_get_char_use_facet(loc
);
10380 t
= MSVCRT_operator_new(sizeof(time_get_char
));
10382 ERR("Out of memory\n");
10383 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10385 time_get_char_ctor_locinfo(t
, locinfo
, 0);
10387 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_get_char_id
));
10390 if(cat
& (1<<(time_put_char__Getcat(NULL
, NULL
)-1))) {
10394 t
= time_put_char_use_facet(loc
);
10396 t
= MSVCRT_operator_new(sizeof(time_put
));
10398 ERR("Out of memory\n");
10399 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10401 time_put_char_ctor_locinfo(t
, locinfo
, 0);
10403 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_char_id
));
10406 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
10407 codecvt_char
*codecvt
;
10410 codecvt
= codecvt_char_use_facet(loc
);
10412 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
10414 ERR("Out of memory\n");
10415 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10417 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
10419 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
10423 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
10424 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10425 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10427 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
10429 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
10430 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
10431 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
10433 locimp
->catmask
|= cat
;
10434 locale_string_char_assign(&locimp
->name
, &locinfo
->newlocname
);
10438 /* ??_7_Locimp@locale@std@@6B@ */
10439 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
10440 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
10443 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
10444 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
10445 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
10446 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
10448 TRACE("(%p %p)\n", this, locimp
);
10449 /* Don't change locimp reference counter */
10450 this->ptr
= locimp
;
10454 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
10455 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
10456 locale__Locimp
* __cdecl
locale__Init(void)
10462 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10463 if(global_locale
) {
10464 _Lockit_dtor(&lock
);
10465 return global_locale
;
10468 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10469 if(!global_locale
) {
10470 _Lockit_dtor(&lock
);
10471 ERR("Out of memory\n");
10472 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10476 locale__Locimp_ctor(global_locale
);
10477 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
10478 locale_string_char_dtor(&global_locale
->name
);
10479 locale_string_char_ctor_cstr(&global_locale
->name
, "C");
10481 locale__Locimp__Clocptr
= global_locale
;
10482 global_locale
->facet
.refs
++;
10483 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
10484 _Lockit_dtor(&lock
);
10486 return global_locale
;
10489 /* ?_Init@locale@std@@CAPAV_Locimp@12@_N@Z */
10490 /* ?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z */
10491 locale__Locimp
* __cdecl
locale__Init_ref(MSVCP_bool inc_ref
)
10493 locale__Locimp
*ret
;
10496 TRACE("(%x)\n", inc_ref
);
10498 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10499 if(inc_ref
&& global_locale
) {
10500 call_locale_facet__Incref(&global_locale
->facet
);
10501 _Lockit_dtor(&lock
);
10502 return global_locale
;
10505 ret
= locale__Init();
10506 _Lockit_dtor(&lock
);
10510 /* ?_Iscloc@locale@std@@QBE_NXZ */
10511 /* ?_Iscloc@locale@std@@QEBA_NXZ */
10512 DEFINE_THISCALL_WRAPPER(locale__Iscloc
, 4)
10513 MSVCP_bool __thiscall
locale__Iscloc(const locale
*this)
10515 TRACE("(%p)\n", this);
10516 return this->ptr
== locale__Locimp__Clocptr
;
10519 /* ??0locale@std@@QAE@ABV01@0H@Z */
10520 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
10521 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
10522 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
10526 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
10528 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10530 ERR("Out of memory\n");
10531 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10533 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10535 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, locale_string_char_c_str(&loc
->ptr
->name
));
10536 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, locale_string_char_c_str(&other
->ptr
->name
));
10537 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
10538 _Locinfo_dtor(&locinfo
);
10543 /* ??0locale@std@@QAE@ABV01@@Z */
10544 /* ??0locale@std@@QEAA@AEBV01@@Z */
10545 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
10546 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
10548 TRACE("(%p %p)\n", this, copy
);
10549 this->ptr
= copy
->ptr
;
10550 call_locale_facet__Incref(&this->ptr
->facet
);
10554 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
10555 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
10556 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
10557 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
10561 TRACE("(%p %p %s %d)\n", this, loc
, locname
, cat
);
10563 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10564 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10565 _Locinfo_dtor(&locinfo
);
10566 MSVCRT_operator_delete(this->ptr
);
10567 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10570 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10572 ERR("Out of memory\n");
10573 _Locinfo_dtor(&locinfo
);
10574 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10576 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10578 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10579 _Locinfo_dtor(&locinfo
);
10583 /* ??0locale@std@@QAE@PBDH@Z */
10584 /* ??0locale@std@@QEAA@PEBDH@Z */
10585 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
10586 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
10590 TRACE("(%p %s %d)\n", this, locname
, cat
);
10592 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10594 ERR("Out of memory\n");
10595 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10597 locale__Locimp_ctor(this->ptr
);
10601 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10602 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10603 _Locinfo_dtor(&locinfo
);
10604 MSVCRT_operator_delete(this->ptr
);
10605 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10608 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10609 _Locinfo_dtor(&locinfo
);
10614 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
10615 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
10616 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
10617 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
10619 TRACE("(%p)\n", this);
10624 /* ??0locale@std@@QAE@XZ */
10625 /* ??0locale@std@@QEAA@XZ */
10626 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
10627 locale
* __thiscall
locale_ctor(locale
*this)
10629 TRACE("(%p)\n", this);
10630 this->ptr
= locale__Init();
10631 call_locale_facet__Incref(&this->ptr
->facet
);
10635 /* ??1locale@std@@QAE@XZ */
10636 /* ??1locale@std@@QEAA@XZ */
10637 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
10638 void __thiscall
locale_dtor(locale
*this)
10640 TRACE("(%p)\n", this);
10641 if(this->ptr
&& call_locale_facet__Decref(&this->ptr
->facet
))
10643 locale__Locimp_dtor(this->ptr
);
10644 MSVCRT_operator_delete(this->ptr
);
10648 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
10649 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
10650 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
10651 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
10653 FIXME("(%p %p) stub\n", this, loc
);
10657 /* ??8locale@std@@QBE_NABV01@@Z */
10658 /* ??8locale@std@@QEBA_NAEBV01@@Z */
10659 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
10660 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
10662 FIXME("(%p %p) stub\n", this, loc
);
10666 /* ??9locale@std@@QBE_NABV01@@Z */
10667 /* ??9locale@std@@QEBA_NAEBV01@@Z */
10668 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
10669 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
10671 FIXME("(%p %p) stub\n", this, loc
);
10675 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
10676 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
10677 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
10678 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
10680 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
10682 if(this->ptr
->facet
.refs
> 1) {
10683 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10685 ERR("Out of memory\n");
10686 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10689 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
10690 call_locale_facet__Decref(&this->ptr
->facet
);
10691 this->ptr
= new_ptr
;
10694 locale__Locimp__Addfac(this->ptr
, facet
, id
);
10697 locale_string_char_dtor(&this->ptr
->name
);
10698 locale_string_char_ctor_cstr(&this->ptr
->name
, "*");
10703 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z */
10704 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K_N@Z */
10705 DEFINE_THISCALL_WRAPPER(locale__Getfacet_bool
, 12)
10706 const locale_facet
* __thiscall
locale__Getfacet_bool(const locale
*this,
10707 MSVCP_size_t id
, MSVCP_bool allow_transparent
)
10711 TRACE("(%p %lu)\n", this, id
);
10713 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
10714 if(fac
|| !this->ptr
->transparent
|| !allow_transparent
)
10717 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
10720 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
10721 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
10722 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
10723 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
10725 return locale__Getfacet_bool( this, id
, TRUE
);
10728 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
10729 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
10730 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
10733 return global_locale
;
10736 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
10737 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
10738 void __cdecl
locale__Setgloballocale(void *locimp
)
10740 TRACE("(%p)\n", locimp
);
10741 global_locale
= locimp
;
10744 /* ?classic@locale@std@@SAABV12@XZ */
10745 /* ?classic@locale@std@@SAAEBV12@XZ */
10746 const locale
* __cdecl
locale_classic(void)
10750 return &classic_locale
;
10753 /* ?empty@locale@std@@SA?AV12@XZ */
10754 locale
* __cdecl
locale_empty(locale
*ret
)
10760 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10762 ERR("Out of memory\n");
10763 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10765 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
10769 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
10770 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
10771 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
10776 TRACE("(%p %p)\n", loc
, ret
);
10778 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10781 if(loc
->ptr
!= global_locale
) {
10782 call_locale_facet__Decref(&global_locale
->facet
);
10783 global_locale
= loc
->ptr
;
10784 call_locale_facet__Incref(&global_locale
->facet
);
10786 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
10787 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
10789 setlocale(i
, locale_string_char_c_str(&global_locale
->name
));
10792 _Lockit_dtor(&lock
);
10796 #if _MSVCP_VER < 100
10798 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10799 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10800 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
10801 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
10803 TRACE("(%p)\n", this);
10805 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
10809 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10810 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10811 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
10812 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
10814 TRACE( "(%p)\n", this);
10815 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
10821 /* ?_Getname@_Locinfo@std@@QBEPBDXZ */
10822 /* ?_Getname@_Locinfo@std@@QEBAPEBDXZ */
10823 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 4)
10824 const char * __thiscall
_Locinfo__Getname( const _Locinfo
*this )
10826 return locale_string_char_c_str( &this->newlocname
);
10829 #endif /* _MSVCP_VER < 100 */
10832 wctrans_t __cdecl
wctrans(const char *property
)
10834 static const char str_tolower
[] = "tolower";
10835 static const char str_toupper
[] = "toupper";
10837 if(!strcmp(property
, str_tolower
))
10839 if(!strcmp(property
, str_toupper
))
10845 wint_t __cdecl
towctrans(wint_t c
, wctrans_t category
)
10848 return towupper(c
);
10849 return towlower(c
);
10853 wint_t __cdecl
btowc(int c
)
10859 if (c
== EOF
|| _Mbrtowc( &ret
, &ch
, 1, &state
, NULL
) != 1) return WEOF
;
10864 size_t __cdecl
mbrlen(const char *str
, size_t n
, mbstate_t *state
)
10866 static int local_state
;
10868 if (!state
) state
= &local_state
;
10869 return _Mbrtowc( NULL
, str
, n
, state
, NULL
);
10873 size_t __cdecl
mbrtowc(wchar_t *dst
, const char *str
, size_t n
, mbstate_t *state
)
10875 static int local_state
;
10877 if (!state
) state
= &local_state
;
10878 return _Mbrtowc( dst
, str
, n
, state
, NULL
);
10882 size_t __cdecl
mbsrtowcs(wchar_t *dst
, const char **pstr
, size_t n
, mbstate_t *state
)
10884 static int local_state
;
10890 if (!state
) state
= &local_state
;
10892 while (!dst
|| n
> ret
)
10894 int len
= _Mbrtowc( &wc
, src
, 2, state
, NULL
);
10895 if (len
< 0) return -1;
10897 if (dst
) dst
[ret
] = wc
;
10906 int __cdecl
wctob(wint_t wc
)
10908 char ret
[MB_LEN_MAX
];
10910 if (wc
== WEOF
|| _Wcrtomb( ret
, wc
, NULL
, NULL
) != 1) return EOF
;
10915 size_t __cdecl
wcrtomb(char *dst
, wchar_t wc
, mbstate_t *state
)
10917 return _Wcrtomb( dst
, wc
, state
, NULL
);
10921 size_t __cdecl
wcsrtombs(char *dst
, const wchar_t **pstr
, size_t n
, mbstate_t *state
)
10923 const wchar_t *src
;
10924 char buffer
[MB_LEN_MAX
];
10929 while (!dst
|| n
> ret
)
10931 int len
= _Wcrtomb( buffer
, *src
, state
, NULL
);
10932 if (len
<= 0) return -1;
10933 if (n
< ret
+ len
) break;
10934 memcpy( dst
+ ret
, buffer
, len
);
10936 if (!buffer
[0]) break;
10943 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@")
10944 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@")
10945 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@")
10946 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@")
10947 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@")
10948 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@")
10949 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@")
10950 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@")
10951 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@")
10952 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@")
10953 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@")
10954 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@")
10955 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@")
10956 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@")
10957 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@")
10958 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@@")
10959 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@@")
10960 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@@")
10961 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@@")
10962 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@@")
10963 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@@")
10964 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@@")
10965 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@@")
10966 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@@")
10967 DEFINE_RTTI_DATA1(time_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUtime_base@std@@")
10968 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@@")
10971 void __asm_dummy_vtables(void) {
10973 __ASM_VTABLE(locale_facet
,
10974 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
10975 #if _MSVCP_VER >= 110
10976 VTABLE_ADD_FUNC(locale_facet__Incref
)
10977 VTABLE_ADD_FUNC(locale_facet__Decref
)
10980 __ASM_VTABLE(collate_char
,
10981 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
10982 #if _MSVCP_VER >= 110
10983 VTABLE_ADD_FUNC(locale_facet__Incref
)
10984 VTABLE_ADD_FUNC(locale_facet__Decref
)
10986 VTABLE_ADD_FUNC(collate_char_do_compare
)
10987 VTABLE_ADD_FUNC(collate_char_do_transform
)
10988 VTABLE_ADD_FUNC(collate_char_do_hash
));
10989 __ASM_VTABLE(collate_wchar
,
10990 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
10991 #if _MSVCP_VER >= 110
10992 VTABLE_ADD_FUNC(locale_facet__Incref
)
10993 VTABLE_ADD_FUNC(locale_facet__Decref
)
10995 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
10996 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
10997 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
10998 __ASM_VTABLE(collate_short
,
10999 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11000 #if _MSVCP_VER >= 110
11001 VTABLE_ADD_FUNC(locale_facet__Incref
)
11002 VTABLE_ADD_FUNC(locale_facet__Decref
)
11004 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11005 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11006 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11007 __ASM_VTABLE(ctype_base
,
11008 VTABLE_ADD_FUNC(ctype_base_vector_dtor
)
11009 #if _MSVCP_VER >= 110
11010 VTABLE_ADD_FUNC(locale_facet__Incref
)
11011 VTABLE_ADD_FUNC(locale_facet__Decref
)
11014 __ASM_VTABLE(ctype_char
,
11015 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
11016 #if _MSVCP_VER >= 110
11017 VTABLE_ADD_FUNC(locale_facet__Incref
)
11018 VTABLE_ADD_FUNC(locale_facet__Decref
)
11020 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
11021 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
11022 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
11023 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
11024 VTABLE_ADD_FUNC(ctype_char_do_widen
)
11025 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
11026 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11027 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
11028 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11029 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11030 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
)
11032 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11033 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11036 __ASM_VTABLE(ctype_wchar
,
11037 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11038 #if _MSVCP_VER >= 110
11039 VTABLE_ADD_FUNC(locale_facet__Incref
)
11040 VTABLE_ADD_FUNC(locale_facet__Decref
)
11042 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11043 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11044 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11045 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11046 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11047 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11048 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11049 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11050 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11051 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11052 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11053 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11054 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11055 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11056 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11058 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11059 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11062 __ASM_VTABLE(ctype_short
,
11063 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11064 #if _MSVCP_VER >= 110
11065 VTABLE_ADD_FUNC(locale_facet__Incref
)
11066 VTABLE_ADD_FUNC(locale_facet__Decref
)
11068 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11069 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11070 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11071 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11072 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11073 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11074 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11075 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11076 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11077 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11078 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11079 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11080 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11081 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11082 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11084 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11085 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11088 __ASM_VTABLE(codecvt_base
,
11089 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
11090 #if _MSVCP_VER >= 110
11091 VTABLE_ADD_FUNC(locale_facet__Incref
)
11092 VTABLE_ADD_FUNC(locale_facet__Decref
)
11094 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11095 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11096 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
11097 __ASM_VTABLE(codecvt_char
,
11098 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
11099 #if _MSVCP_VER >= 110
11100 VTABLE_ADD_FUNC(locale_facet__Incref
)
11101 VTABLE_ADD_FUNC(locale_facet__Decref
)
11103 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11104 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11105 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11106 VTABLE_ADD_FUNC(codecvt_char_do_in
)
11107 VTABLE_ADD_FUNC(codecvt_char_do_out
)
11108 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
11109 VTABLE_ADD_FUNC(codecvt_char_do_length
));
11110 __ASM_VTABLE(codecvt_wchar
,
11111 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11112 #if _MSVCP_VER >= 110
11113 VTABLE_ADD_FUNC(locale_facet__Incref
)
11114 VTABLE_ADD_FUNC(locale_facet__Decref
)
11116 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11117 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11118 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11119 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11120 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11121 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11122 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11123 __ASM_VTABLE(codecvt_short
,
11124 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11125 #if _MSVCP_VER >= 110
11126 VTABLE_ADD_FUNC(locale_facet__Incref
)
11127 VTABLE_ADD_FUNC(locale_facet__Decref
)
11129 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11130 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11131 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11132 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11133 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11134 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11135 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11136 __ASM_VTABLE(numpunct_char
,
11137 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
11138 #if _MSVCP_VER >= 110
11139 VTABLE_ADD_FUNC(locale_facet__Incref
)
11140 VTABLE_ADD_FUNC(locale_facet__Decref
)
11142 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
11143 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
11144 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
11145 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
11146 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
11147 __ASM_VTABLE(numpunct_wchar
,
11148 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11149 #if _MSVCP_VER >= 110
11150 VTABLE_ADD_FUNC(locale_facet__Incref
)
11151 VTABLE_ADD_FUNC(locale_facet__Decref
)
11153 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11154 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11155 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11156 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11157 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11158 __ASM_VTABLE(numpunct_short
,
11159 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11160 #if _MSVCP_VER >= 110
11161 VTABLE_ADD_FUNC(locale_facet__Incref
)
11162 VTABLE_ADD_FUNC(locale_facet__Decref
)
11164 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11165 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11166 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11167 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11168 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11169 __ASM_VTABLE(num_get_char
,
11170 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
11171 #if _MSVCP_VER >= 110
11172 VTABLE_ADD_FUNC(locale_facet__Incref
)
11173 VTABLE_ADD_FUNC(locale_facet__Decref
)
11175 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
11176 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11177 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11178 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
11179 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
11180 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
11181 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
11182 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
11183 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
11184 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
11185 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
11186 __ASM_VTABLE(num_get_short
,
11187 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11188 #if _MSVCP_VER >= 110
11189 VTABLE_ADD_FUNC(locale_facet__Incref
)
11190 VTABLE_ADD_FUNC(locale_facet__Decref
)
11192 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
11193 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11194 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11195 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
11196 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
11197 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
11198 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
11199 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
11200 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
11201 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
11202 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
11203 __ASM_VTABLE(num_get_wchar
,
11204 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11205 #if _MSVCP_VER >= 110
11206 VTABLE_ADD_FUNC(locale_facet__Incref
)
11207 VTABLE_ADD_FUNC(locale_facet__Decref
)
11209 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
11210 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11211 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11212 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
11213 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
11214 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
11215 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
11216 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
11217 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
11218 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
11219 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
11220 __ASM_VTABLE(num_put_char
,
11221 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
11222 #if _MSVCP_VER >= 110
11223 VTABLE_ADD_FUNC(locale_facet__Incref
)
11224 VTABLE_ADD_FUNC(locale_facet__Decref
)
11226 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
11227 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11228 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11229 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
11230 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
11231 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
11232 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
11233 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
11234 __ASM_VTABLE(num_put_wchar
,
11235 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11236 #if _MSVCP_VER >= 110
11237 VTABLE_ADD_FUNC(locale_facet__Incref
)
11238 VTABLE_ADD_FUNC(locale_facet__Decref
)
11240 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
11241 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11242 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11243 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
11244 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
11245 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
11246 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
11247 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
11248 __ASM_VTABLE(num_put_short
,
11249 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11250 #if _MSVCP_VER >= 110
11251 VTABLE_ADD_FUNC(locale_facet__Incref
)
11252 VTABLE_ADD_FUNC(locale_facet__Decref
)
11254 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
11255 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11256 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11257 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
11258 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
11259 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
11260 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
11261 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
11262 __ASM_VTABLE(time_put_char
,
11263 VTABLE_ADD_FUNC(time_put_char_vector_dtor
)
11264 #if _MSVCP_VER >= 110
11265 VTABLE_ADD_FUNC(locale_facet__Incref
)
11266 VTABLE_ADD_FUNC(locale_facet__Decref
)
11268 VTABLE_ADD_FUNC(time_put_char_do_put
));
11269 __ASM_VTABLE(time_put_wchar
,
11270 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11271 #if _MSVCP_VER >= 110
11272 VTABLE_ADD_FUNC(locale_facet__Incref
)
11273 VTABLE_ADD_FUNC(locale_facet__Decref
)
11275 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11276 __ASM_VTABLE(time_put_short
,
11277 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11278 #if _MSVCP_VER >= 110
11279 VTABLE_ADD_FUNC(locale_facet__Incref
)
11280 VTABLE_ADD_FUNC(locale_facet__Decref
)
11282 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11283 __ASM_VTABLE(time_get_char
,
11284 VTABLE_ADD_FUNC(time_get_char_vector_dtor
)
11285 #if _MSVCP_VER >= 110
11286 VTABLE_ADD_FUNC(locale_facet__Incref
)
11287 VTABLE_ADD_FUNC(locale_facet__Decref
)
11289 VTABLE_ADD_FUNC(time_get_char_do_date_order
)
11290 VTABLE_ADD_FUNC(time_get_char_do_get_time
)
11291 VTABLE_ADD_FUNC(time_get_char_do_get_date
)
11292 VTABLE_ADD_FUNC(time_get_char_do_get_weekday
)
11293 VTABLE_ADD_FUNC(time_get_char_do_get_monthname
)
11294 VTABLE_ADD_FUNC(time_get_char_do_get_year
));
11299 void init_locale(void *base
)
11302 init_locale_facet_rtti(base
);
11303 init_collate_char_rtti(base
);
11304 init_collate_wchar_rtti(base
);
11305 init_collate_short_rtti(base
);
11306 init_ctype_base_rtti(base
);
11307 init_ctype_char_rtti(base
);
11308 init_ctype_wchar_rtti(base
);
11309 init_ctype_short_rtti(base
);
11310 init_codecvt_base_rtti(base
);
11311 init_codecvt_char_rtti(base
);
11312 init_codecvt_wchar_rtti(base
);
11313 init_codecvt_short_rtti(base
);
11314 init_numpunct_char_rtti(base
);
11315 init_numpunct_wchar_rtti(base
);
11316 init_numpunct_short_rtti(base
);
11317 init_num_get_char_rtti(base
);
11318 init_num_get_wchar_rtti(base
);
11319 init_num_get_short_rtti(base
);
11320 init_num_put_char_rtti(base
);
11321 init_num_put_wchar_rtti(base
);
11322 init_num_put_short_rtti(base
);
11323 init_time_put_char_rtti(base
);
11324 init_time_put_wchar_rtti(base
);
11325 init_time_put_short_rtti(base
);
11326 init_time_base_rtti(base
);
11327 init_time_get_char_rtti(base
);
11331 void free_locale(void)
11333 facets_elem
*iter
, *safe
;
11335 if(global_locale
) {
11336 locale_dtor(&classic_locale
);
11337 locale__Locimp_dtor(global_locale
);
11338 MSVCRT_operator_delete(global_locale
);
11341 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
11342 list_remove(&iter
->entry
);
11343 if(call_locale_facet__Decref(iter
->fac
))
11344 call_locale_facet_vector_dtor(iter
->fac
, 1);
11345 MSVCRT_operator_delete(iter
);