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
);
41 char* __cdecl
_Getdays(void);
42 char* __cdecl
_Getmonths(void);
43 void* __cdecl
_Gettnames(void);
44 unsigned int __cdecl
___lc_codepage_func(void);
45 int __cdecl
___lc_collate_cp_func(void);
46 const unsigned short* __cdecl
__pctype_func(void);
47 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, MSVCP_size_t
);
48 MSVCP_size_t __cdecl
_Strftime(char*, MSVCP_size_t
, const char*,
49 const struct tm
*, struct __lc_time_data
*);
50 const locale
* __cdecl
locale_classic(void);
53 static LCID
* ___lc_handle_func(void)
57 _locale_t loc
= _get_current_locale();
58 ret
= loc
->locinfo
->lc_handle
;
63 LCID
* __cdecl
___lc_handle_func(void);
67 #define locale_string basic_string_char
68 #define locale_string_char_ctor_cstr(this,str) MSVCP_basic_string_char_ctor_cstr(this,str)
69 #define locale_string_char_copy_ctor(this,copy) MSVCP_basic_string_char_copy_ctor(this,copy)
70 #define locale_string_char_dtor(this) MSVCP_basic_string_char_dtor(this)
71 #define locale_string_char_c_str(this) MSVCP_basic_string_char_c_str(this)
72 #define locale_string_char_assign(this,assign) MSVCP_basic_string_char_assign(this,assign)
74 #define locale_string _Yarn_char
75 #define locale_string_char_ctor_cstr(this,str) _Yarn_char_ctor_cstr(this,str)
76 #define locale_string_char_copy_ctor(this,copy) _Yarn_char_copy_ctor(this,copy)
77 #define locale_string_char_dtor(this) _Yarn_char_dtor(this)
78 #define locale_string_char_c_str(this) _Yarn_char_c_str(this)
79 #define locale_string_char_assign(this,assign) _Yarn_char_op_assign(this,assign)
88 typedef struct _locale__Locimp
{
90 locale_facet
**facetvec
;
91 MSVCP_size_t facet_cnt
;
93 MSVCP_bool transparent
;
104 locale_string months
;
105 locale_string oldlocname
;
106 locale_string newlocname
;
121 const char *grouping
;
124 const char *false_name
;
125 const char *true_name
;
130 const char *grouping
;
133 const wchar_t *false_name
;
134 const wchar_t *true_name
;
143 /* ?_Id_cnt@id@locale@std@@0HA */
144 int locale_id__Id_cnt
= 0;
146 static locale__Locimp
*global_locale
;
147 static locale classic_locale
;
149 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
150 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
151 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
153 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
155 if(this->strbuf
&& !this->got
) {
156 int c
= basic_streambuf_char_sgetc(this->strbuf
);
167 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
169 if(this->strbuf
&& !this->got
) {
170 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
181 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
183 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
188 istreambuf_iterator_char_val(this);
192 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
194 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
199 istreambuf_iterator_wchar_val(this);
203 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
205 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
209 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
211 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
215 /* ??1facet@locale@std@@UAE@XZ */
216 /* ??1facet@locale@std@@UEAA@XZ */
217 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
218 void __thiscall
locale_facet_dtor(locale_facet
*this)
220 TRACE("(%p)\n", this);
223 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
224 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
225 locale_facet*, (locale_facet*, unsigned int), (this, flags))
226 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
228 TRACE("(%p %x)\n", this, flags
);
230 /* we have an array, with the number of elements stored before the first object */
231 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
233 for(i
=*ptr
-1; i
>=0; i
--)
234 locale_facet_dtor(this+i
);
235 MSVCRT_operator_delete(ptr
);
237 locale_facet_dtor(this);
239 MSVCRT_operator_delete(this);
250 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
252 /* Not exported from msvcp90 */
253 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
254 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
255 void __cdecl
locale_facet_register(locale_facet
*add
)
257 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
259 ERR("Out of memory\n");
260 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
264 list_add_head(&lazy_facets
, &head
->entry
);
267 /* Not exported from msvcp90 */
268 /* ?_Register@facet@locale@std@@QAEXXZ */
269 /* ?_Register@facet@locale@std@@QEAAXXZ */
270 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
271 void __thiscall
locale_facet__Register(locale_facet
*this)
273 TRACE("(%p)\n", this);
274 locale_facet_register(this);
277 /* Not exported from msvcp90 */
278 /* ??_7facet@locale@std@@6B@ */
279 extern const vtable_ptr MSVCP_locale_facet_vtable
;
281 /* ??0id@locale@std@@QAE@I@Z */
282 /* ??0id@locale@std@@QEAA@_K@Z */
283 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
284 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
286 TRACE("(%p %lu)\n", this, id
);
292 /* ??_Fid@locale@std@@QAEXXZ */
293 /* ??_Fid@locale@std@@QEAAXXZ */
294 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
295 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
297 TRACE("(%p)\n", this);
303 /* ??Bid@locale@std@@QAEIXZ */
304 /* ??Bid@locale@std@@QEAA_KXZ */
305 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
306 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
310 TRACE("(%p)\n", this);
313 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
314 this->id
= ++locale_id__Id_cnt
;
321 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
322 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
323 int* __cdecl
locale_id__Id_cnt_func(void)
326 return &locale_id__Id_cnt
;
329 /* ??_Ffacet@locale@std@@QAEXXZ */
330 /* ??_Ffacet@locale@std@@QEAAXXZ */
331 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
332 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
334 TRACE("(%p)\n", this);
335 this->vtable
= &MSVCP_locale_facet_vtable
;
340 /* ??0facet@locale@std@@IAE@I@Z */
341 /* ??0facet@locale@std@@IEAA@_K@Z */
342 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
343 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
345 TRACE("(%p %lu)\n", this, refs
);
346 this->vtable
= &MSVCP_locale_facet_vtable
;
351 /* ?_Incref@facet@locale@std@@QAEXXZ */
352 /* ?_Incref@facet@locale@std@@QEAAXXZ */
353 /* ?_Incref@facet@locale@std@@UAEXXZ */
354 /* ?_Incref@facet@locale@std@@UEAAXXZ */
355 #if _MSVCP_VER >= 110
356 #define call_locale_facet__Incref(this) CALL_VTBL_FUNC(this, 4, void, (locale_facet*), (this))
358 #define call_locale_facet__Incref locale_facet__Incref
360 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
361 void __thiscall
locale_facet__Incref(locale_facet
*this)
365 TRACE("(%p)\n", this);
367 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
372 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
373 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
374 /* ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ */
375 /* ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ */
376 #if _MSVCP_VER >= 110
377 #define call_locale_facet__Decref(this) CALL_VTBL_FUNC(this, 8, \
378 locale_facet*, (locale_facet*), (this))
380 #define call_locale_facet__Decref locale_facet__Decref
382 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
383 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
388 TRACE("(%p)\n", this);
390 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
394 ret
= this->refs
? NULL
: this;
400 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
401 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
402 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
404 TRACE("(%p %p)\n", facet
, loc
);
408 /* ??0_Timevec@std@@QAE@ABV01@@Z */
409 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
410 /* This copy constructor modifies copied object */
411 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
412 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
414 TRACE("(%p %p)\n", this, copy
);
415 this->timeptr
= copy
->timeptr
;
416 copy
->timeptr
= NULL
;
420 /* ??0_Timevec@std@@QAE@PAX@Z */
421 /* ??0_Timevec@std@@QEAA@PEAX@Z */
422 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
423 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
425 TRACE("(%p %p)\n", this, timeptr
);
426 this->timeptr
= timeptr
;
430 /* ??_F_Timevec@std@@QAEXXZ */
431 /* ??_F_Timevec@std@@QEAAXXZ */
432 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
433 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
435 TRACE("(%p)\n", this);
436 this->timeptr
= NULL
;
440 /* ??1_Timevec@std@@QAE@XZ */
441 /* ??1_Timevec@std@@QEAA@XZ */
442 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
443 void __thiscall
_Timevec_dtor(_Timevec
*this)
445 TRACE("(%p)\n", this);
449 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
450 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
451 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
452 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
454 TRACE("(%p %p)\n", this, right
);
455 this->timeptr
= right
->timeptr
;
456 right
->timeptr
= NULL
;
460 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
461 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
462 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
463 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
465 TRACE("(%p)\n", this);
466 return this->timeptr
;
469 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
470 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
471 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
473 const char *locale
= NULL
;
475 /* This function is probably modifying more global objects */
476 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
479 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
481 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
482 locale_string_char_ctor_cstr(&locinfo
->days
, "");
483 locale_string_char_ctor_cstr(&locinfo
->months
, "");
484 locale_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
487 locale
= setlocale(LC_ALL
, locstr
);
489 locale
= setlocale(LC_ALL
, NULL
);
492 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
494 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
499 /* ??0_Locinfo@std@@QAE@HPBD@Z */
500 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
501 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
502 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
504 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
507 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
508 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
509 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
511 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
514 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
515 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
516 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
517 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
519 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
522 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
523 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
524 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
526 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
529 /* ??0_Locinfo@std@@QAE@PBD@Z */
530 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
531 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
532 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
534 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
537 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
538 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
539 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
541 TRACE("(%p)\n", locinfo
);
543 setlocale(LC_ALL
, locale_string_char_c_str(&locinfo
->oldlocname
));
544 locale_string_char_dtor(&locinfo
->days
);
545 locale_string_char_dtor(&locinfo
->months
);
546 locale_string_char_dtor(&locinfo
->oldlocname
);
547 locale_string_char_dtor(&locinfo
->newlocname
);
548 _Lockit_dtor(&locinfo
->lock
);
551 /* ??_F_Locinfo@std@@QAEXXZ */
552 /* ??_F_Locinfo@std@@QEAAXXZ */
553 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
554 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
556 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
559 /* ??1_Locinfo@std@@QAE@XZ */
560 /* ??1_Locinfo@std@@QEAA@XZ */
561 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
562 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
564 _Locinfo__Locinfo_dtor(this);
567 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
568 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
569 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
571 const char *locale
= NULL
;
573 /* This function is probably modifying more global objects */
574 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
576 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
578 locale_string_char_dtor(&locinfo
->newlocname
);
581 locale
= setlocale(LC_ALL
, locstr
);
583 locale
= setlocale(LC_ALL
, NULL
);
586 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
588 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
593 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
594 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
595 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
596 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
598 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
602 ULONGLONG __cdecl
_Getcoll(void)
611 ret
.collvec
.page
= ___lc_collate_cp_func();
612 ret
.collvec
.handle
= ___lc_handle_func()[LC_COLLATE
];
616 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
617 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
618 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
619 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
621 ULONGLONG ull
= _Getcoll();
622 memcpy(ret
, &ull
, sizeof(ull
));
627 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
633 ret
->page
= ___lc_codepage_func();
635 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
637 /* FIXME: use ___lc_locale_name_func() */
641 table
= malloc(sizeof(short[256]));
642 if(!table
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
643 memcpy(table
, __pctype_func(), sizeof(short[256]));
648 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
649 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
650 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
651 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
653 return _Getctype(ret
);
657 ULONGLONG __cdecl
_Getcvt(void)
666 ret
.cvtvec
.page
= ___lc_codepage_func();
667 ret
.cvtvec
.handle
= ___lc_handle_func()[LC_CTYPE
];
671 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
672 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
673 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
674 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
676 ULONGLONG ull
= _Getcvt();
677 memcpy(ret
, &ull
, sizeof(ull
));
681 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
682 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
683 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
684 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
686 FIXME("(%p) stub\n", this);
690 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
691 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
692 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
693 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
695 char *days
= _Getdays();
698 TRACE("(%p)\n", this);
701 locale_string_char_dtor(&this->days
);
702 locale_string_char_ctor_cstr(&this->days
, days
);
706 ret
= locale_string_char_c_str(&this->days
);
707 if (!ret
[0]) ret
= ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
711 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
712 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
713 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
714 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
716 char *months
= _Getmonths();
719 TRACE("(%p)\n", this);
722 locale_string_char_dtor(&this->months
);
723 locale_string_char_ctor_cstr(&this->months
, months
);
727 ret
= locale_string_char_c_str(&this->months
);
728 if (!ret
[0]) ret
= ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
729 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
733 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
734 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
735 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
736 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
738 TRACE("(%p)\n", this);
742 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
743 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
744 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
745 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
747 TRACE("(%p)\n", this);
751 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
752 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
753 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
754 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
756 TRACE("(%p)\n", this);
760 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
761 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
762 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
763 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
765 TRACE("(%p)\n", this);
767 _Timevec_ctor_timeptr(ret
, _Gettnames());
771 /* ?id@?$collate@D@std@@2V0locale@2@A */
772 locale_id collate_char_id
= {0};
774 /* ??_7?$collate@D@std@@6B@ */
775 extern const vtable_ptr MSVCP_collate_char_vtable
;
777 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
778 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
779 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
780 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
782 TRACE("(%p %p)\n", this, locinfo
);
783 _Locinfo__Getcoll(locinfo
, &this->coll
);
786 /* ??0?$collate@D@std@@IAE@PBDI@Z */
787 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
788 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
789 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
793 TRACE("(%p %s %lu)\n", this, name
, refs
);
795 locale_facet_ctor_refs(&this->facet
, refs
);
796 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
798 _Locinfo_ctor_cstr(&locinfo
, name
);
799 collate_char__Init(this, &locinfo
);
800 _Locinfo_dtor(&locinfo
);
804 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
805 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
806 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
807 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
809 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
811 locale_facet_ctor_refs(&this->facet
, refs
);
812 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
813 collate_char__Init(this, locinfo
);
817 /* ??0?$collate@D@std@@QAE@I@Z */
818 /* ??0?$collate@D@std@@QEAA@_K@Z */
819 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
820 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
822 return collate_char_ctor_name(this, "C", refs
);
825 /* ??1?$collate@D@std@@MAE@XZ */
826 /* ??1?$collate@D@std@@MEAA@XZ */
827 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
828 void __thiscall
collate_char_dtor(collate
*this)
830 TRACE("(%p)\n", this);
833 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
834 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
836 TRACE("(%p %x)\n", this, flags
);
838 /* we have an array, with the number of elements stored before the first object */
839 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
841 for(i
=*ptr
-1; i
>=0; i
--)
842 collate_char_dtor(this+i
);
843 MSVCRT_operator_delete(ptr
);
845 collate_char_dtor(this);
847 MSVCRT_operator_delete(this);
853 /* ??_F?$collate@D@std@@QAEXXZ */
854 /* ??_F?$collate@D@std@@QEAAXXZ */
855 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
856 collate
* __thiscall
collate_char_ctor(collate
*this)
858 return collate_char_ctor_name(this, "C", 0);
861 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
862 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
863 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
865 TRACE("(%p %p)\n", facet
, loc
);
867 if(facet
&& !*facet
) {
868 *facet
= MSVCRT_operator_new(sizeof(collate
));
870 ERR("Out of memory\n");
871 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
874 collate_char_ctor_name((collate
*)*facet
,
875 locale_string_char_c_str(&loc
->ptr
->name
), 0);
881 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
882 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
883 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
885 return collate_char__Getcat(facet
, locale_classic());
888 static collate
* collate_char_use_facet(const locale
*loc
)
890 static collate
*obj
= NULL
;
893 const locale_facet
*fac
;
895 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
896 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_char_id
));
899 return (collate
*)fac
;
907 collate_char__Getcat(&fac
, loc
);
909 call_locale_facet__Incref(&obj
->facet
);
910 locale_facet_register(&obj
->facet
);
917 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
918 const char *last2
, const _Collvec
*coll
)
922 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
927 lcid
= ___lc_handle_func()[LC_COLLATE
];
928 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
931 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
932 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
933 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
934 #if _MSVCP_VER <= 100
935 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
936 (const collate*, const char*, const char*, const char*, const char*), \
937 (this, first1, last1, first2, last2))
939 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
940 (const collate*, const char*, const char*, const char*, const char*), \
941 (this, first1, last1, first2, last2))
943 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
944 const char *last1
, const char *first2
, const char *last2
)
946 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
947 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
950 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
951 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
952 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
953 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
954 const char *last1
, const char *first2
, const char *last2
)
956 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
957 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
960 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
961 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
962 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
963 #if _MSVCP_VER <= 100
964 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
965 (const collate*, const char*, const char*), (this, first, last))
967 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
968 (const collate*, const char*, const char*), (this, first, last))
970 LONG __thiscall
collate_char_do_hash(const collate
*this,
971 const char *first
, const char *last
)
975 TRACE("(%p %p %p)\n", this, first
, last
);
977 for(; first
<last
; first
++)
978 ret
= (ret
<<8 | ret
>>24) + *first
;
982 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
983 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
984 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
985 LONG __thiscall
collate_char_hash(const collate
*this,
986 const char *first
, const char *last
)
988 TRACE("(%p %p %p)\n", this, first
, last
);
989 return call_collate_char_do_hash(this, first
, last
);
992 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
993 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
994 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
995 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
996 basic_string_char
*ret
, const char *first
, const char *last
)
998 FIXME("(%p %p %p) stub\n", this, first
, last
);
1002 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1003 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1004 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
1005 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
1006 basic_string_char
*ret
, const char *first
, const char *last
)
1008 FIXME("(%p %p %p) stub\n", this, first
, last
);
1012 /* ?id@?$collate@_W@std@@2V0locale@2@A */
1013 locale_id collate_wchar_id
= {0};
1014 /* ?id@?$collate@G@std@@2V0locale@2@A */
1015 locale_id collate_short_id
= {0};
1017 /* ??_7?$collate@_W@std@@6B@ */
1018 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
1019 /* ??_7?$collate@G@std@@6B@ */
1020 extern const vtable_ptr MSVCP_collate_short_vtable
;
1022 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
1023 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1024 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
1025 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1026 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
1027 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
1029 TRACE("(%p %p)\n", this, locinfo
);
1030 _Locinfo__Getcoll(locinfo
, &this->coll
);
1033 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
1034 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
1035 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
1036 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1040 TRACE("(%p %s %lu)\n", this, name
, refs
);
1042 locale_facet_ctor_refs(&this->facet
, refs
);
1043 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1045 _Locinfo_ctor_cstr(&locinfo
, name
);
1046 collate_wchar__Init(this, &locinfo
);
1047 _Locinfo_dtor(&locinfo
);
1051 /* ??0?$collate@G@std@@IAE@PBDI@Z */
1052 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
1053 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
1054 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1056 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
1057 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1061 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1062 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1063 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
1064 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1066 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1068 locale_facet_ctor_refs(&this->facet
, refs
);
1069 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1070 collate_wchar__Init(this, locinfo
);
1074 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
1075 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1076 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
1077 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1079 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
1080 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1084 /* ??0?$collate@_W@std@@QAE@I@Z */
1085 /* ??0?$collate@_W@std@@QEAA@_K@Z */
1086 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
1087 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
1089 return collate_wchar_ctor_name(this, "C", refs
);
1092 /* ??0?$collate@G@std@@QAE@I@Z */
1093 /* ??0?$collate@G@std@@QEAA@_K@Z */
1094 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1095 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
1097 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1098 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1102 /* ??1?$collate@_W@std@@MAE@XZ */
1103 /* ??1?$collate@_W@std@@MEAA@XZ */
1104 /* ??1?$collate@G@std@@MAE@XZ */
1105 /* ??1?$collate@G@std@@MEAA@XZ */
1106 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1107 void __thiscall
collate_wchar_dtor(collate
*this)
1109 TRACE("(%p)\n", this);
1112 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1113 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1115 TRACE("(%p %x)\n", this, flags
);
1117 /* we have an array, with the number of elements stored before the first object */
1118 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1120 for(i
=*ptr
-1; i
>=0; i
--)
1121 collate_wchar_dtor(this+i
);
1122 MSVCRT_operator_delete(ptr
);
1124 collate_wchar_dtor(this);
1126 MSVCRT_operator_delete(this);
1132 /* ??_F?$collate@_W@std@@QAEXXZ */
1133 /* ??_F?$collate@_W@std@@QEAAXXZ */
1134 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1135 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1137 return collate_wchar_ctor_name(this, "C", 0);
1140 /* ??_F?$collate@G@std@@QAEXXZ */
1141 /* ??_F?$collate@G@std@@QEAAXXZ */
1142 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1143 collate
* __thiscall
collate_short_ctor(collate
*this)
1145 collate
*ret
= collate_wchar_ctor(this);
1146 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1150 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1151 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1152 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1154 TRACE("(%p %p)\n", facet
, loc
);
1156 if(facet
&& !*facet
) {
1157 *facet
= MSVCRT_operator_new(sizeof(collate
));
1159 ERR("Out of memory\n");
1160 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1163 collate_wchar_ctor_name((collate
*)*facet
,
1164 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1170 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1171 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1172 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1174 return collate_wchar__Getcat(facet
, locale_classic());
1177 static collate
* collate_wchar_use_facet(const locale
*loc
)
1179 static collate
*obj
= NULL
;
1182 const locale_facet
*fac
;
1184 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1185 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_wchar_id
));
1187 _Lockit_dtor(&lock
);
1188 return (collate
*)fac
;
1192 _Lockit_dtor(&lock
);
1196 collate_wchar__Getcat(&fac
, loc
);
1197 obj
= (collate
*)fac
;
1198 call_locale_facet__Incref(&obj
->facet
);
1199 locale_facet_register(&obj
->facet
);
1200 _Lockit_dtor(&lock
);
1205 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1206 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1207 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1209 if(facet
&& !*facet
) {
1210 collate_wchar__Getcat(facet
, loc
);
1211 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1217 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1218 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1219 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1221 return collate_short__Getcat(facet
, locale_classic());
1224 static collate
* collate_short_use_facet(const locale
*loc
)
1226 static collate
*obj
= NULL
;
1229 const locale_facet
*fac
;
1231 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1232 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_short_id
));
1234 _Lockit_dtor(&lock
);
1235 return (collate
*)fac
;
1239 _Lockit_dtor(&lock
);
1243 collate_short__Getcat(&fac
, loc
);
1244 obj
= (collate
*)fac
;
1245 call_locale_facet__Incref(&obj
->facet
);
1246 locale_facet_register(&obj
->facet
);
1247 _Lockit_dtor(&lock
);
1253 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1254 const wchar_t *last2
, const _Collvec
*coll
)
1258 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1261 lcid
= coll
->handle
;
1263 lcid
= ___lc_handle_func()[LC_COLLATE
];
1264 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1267 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1268 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1269 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1270 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1271 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1272 #if _MSVCP_VER <= 100
1273 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1274 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1275 (this, first1, last1, first2, last2))
1277 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1278 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1279 (this, first1, last1, first2, last2))
1281 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1282 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1284 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1285 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1288 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1289 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1290 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1291 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1292 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1293 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1294 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1296 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1297 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1300 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1301 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1302 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1303 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1304 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1305 #if _MSVCP_VER <= 100
1306 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1307 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1309 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1310 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1312 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1313 const wchar_t *first
, const wchar_t *last
)
1317 TRACE("(%p %p %p)\n", this, first
, last
);
1319 for(; first
<last
; first
++)
1320 ret
= (ret
<<8 | ret
>>24) + *first
;
1324 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1325 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1326 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1327 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1328 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1329 LONG __thiscall
collate_wchar_hash(const collate
*this,
1330 const wchar_t *first
, const wchar_t *last
)
1332 TRACE("(%p %p %p)\n", this, first
, last
);
1333 return call_collate_wchar_do_hash(this, first
, last
);
1336 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1337 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1338 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1339 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1340 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1341 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1342 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1344 FIXME("(%p %p %p) stub\n", this, first
, last
);
1348 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1349 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1350 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1351 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1352 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1353 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1354 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1356 FIXME("(%p %p %p) stub\n", this, first
, last
);
1360 /* ??_7ctype_base@std@@6B@ */
1361 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1363 /* ??0ctype_base@std@@QAE@I@Z */
1364 /* ??0ctype_base@std@@QEAA@_K@Z */
1365 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1366 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1368 TRACE("(%p %lu)\n", this, refs
);
1369 locale_facet_ctor_refs(&this->facet
, refs
);
1370 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1374 /* ??_Fctype_base@std@@QAEXXZ */
1375 /* ??_Fctype_base@std@@QEAAXXZ */
1376 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1377 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1379 TRACE("(%p)\n", this);
1380 locale_facet_ctor_refs(&this->facet
, 0);
1381 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1385 /* ??1ctype_base@std@@UAE@XZ */
1386 /* ??1ctype_base@std@@UEAA@XZ */
1387 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1388 void __thiscall
ctype_base_dtor(ctype_base
*this)
1390 TRACE("(%p)\n", this);
1393 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1394 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1396 TRACE("(%p %x)\n", this, flags
);
1398 /* we have an array, with the number of elements stored before the first object */
1399 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1401 for(i
=*ptr
-1; i
>=0; i
--)
1402 ctype_base_dtor(this+i
);
1403 MSVCRT_operator_delete(ptr
);
1405 ctype_base_dtor(this);
1407 MSVCRT_operator_delete(this);
1413 /* ?_Xran@ctype_base@std@@KAXXZ */
1414 void __cdecl
ctype_base__Xran(void)
1416 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1419 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1420 locale_id ctype_char_id
= {0};
1421 /* ?table_size@?$ctype@D@std@@2IB */
1422 /* ?table_size@?$ctype@D@std@@2_KB */
1423 MSVCP_size_t ctype_char_table_size
= 256;
1425 /* ??_7?$ctype@D@std@@6B@ */
1426 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1428 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1429 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1430 locale_id
* __cdecl
ctype_char__Id_func(void)
1433 return &ctype_char_id
;
1436 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1437 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1438 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1439 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1441 TRACE("(%p %p)\n", this, locinfo
);
1442 _Locinfo__Getctype(locinfo
, &this->ctype
);
1445 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1446 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1447 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1448 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1450 TRACE("(%p)\n", this);
1452 if(this->ctype
.delfl
)
1453 free((short*)this->ctype
.table
);
1454 #if _MSVCP_VER >= 110
1455 free(this->ctype
.name
);
1459 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1460 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1461 const short* __cdecl
ctype_char_classic_table(void)
1466 ctype
= ctype_char_use_facet( locale_classic() );
1467 return ctype
->ctype
.table
;
1470 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1471 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1472 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1473 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1474 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1476 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1477 ctype_base_ctor_refs(&this->base
, refs
);
1478 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1479 ctype_char__Init(this, locinfo
);
1483 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1484 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1485 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1486 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1487 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1491 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1493 ctype_base_ctor_refs(&this->base
, refs
);
1494 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1496 _Locinfo_ctor(&locinfo
);
1497 ctype_char__Init(this, &locinfo
);
1498 _Locinfo_dtor(&locinfo
);
1501 ctype_char__Tidy(this);
1502 this->ctype
.table
= table
;
1503 this->ctype
.delfl
= delete;
1508 /* ??_F?$ctype@D@std@@QAEXXZ */
1509 /* ??_F?$ctype@D@std@@QEAAXXZ */
1510 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1511 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1513 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1516 /* ??1?$ctype@D@std@@MAE@XZ */
1517 /* ??1?$ctype@D@std@@MEAA@XZ */
1518 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1519 void __thiscall
ctype_char_dtor(ctype_char
*this)
1521 TRACE("(%p)\n", this);
1522 ctype_char__Tidy(this);
1525 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1526 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1528 TRACE("(%p %x)\n", this, flags
);
1530 /* we have an array, with the number of elements stored before the first object */
1531 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1533 for(i
=*ptr
-1; i
>=0; i
--)
1534 ctype_char_dtor(this+i
);
1535 MSVCRT_operator_delete(ptr
);
1537 ctype_char_dtor(this);
1539 MSVCRT_operator_delete(this);
1545 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1546 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1547 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1548 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1549 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1550 char, (const ctype_char*, char, char), (this, ch, unused))
1551 #elif _MSVCP_VER <= 100
1552 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1553 char, (const ctype_char*, char, char), (this, ch, unused))
1555 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 40, \
1556 char, (const ctype_char*, char, char), (this, ch, unused))
1558 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1560 TRACE("(%p %c %c)\n", this, ch
, unused
);
1564 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1565 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1566 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1567 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1568 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1569 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1570 (this, first, last, unused, dest))
1571 #elif _MSVCP_VER <= 100
1572 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1573 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1574 (this, first, last, unused, dest))
1576 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 36, \
1577 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1578 (this, first, last, unused, dest))
1580 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1581 const char *first
, const char *last
, char unused
, char *dest
)
1583 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1584 memcpy(dest
, first
, last
-first
);
1588 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1589 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1590 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1591 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1592 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1593 (this, first, last, unused, dest, size))
1594 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1595 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1597 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1598 memcpy_s(dest
, size
, first
, last
-first
);
1602 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1603 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1604 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1605 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1607 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1608 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1611 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1612 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1613 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1614 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1615 const char *first
, const char *last
, char dflt
, char *dest
)
1617 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1618 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1621 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1622 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1623 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1624 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1625 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1627 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1628 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1631 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1632 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1633 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1634 #if _MSVCP_VER <= 100
1635 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1636 char, (const ctype_char*, char), (this, ch))
1638 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
1639 char, (const ctype_char*, char), (this, ch))
1641 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1643 TRACE("(%p %c)\n", this, ch
);
1647 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1648 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1649 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1650 #if _MSVCP_VER <= 100
1651 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1652 const char*, (const ctype_char*, const char*, const char*, char*), \
1653 (this, first, last, dest))
1655 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 28, \
1656 const char*, (const ctype_char*, const char*, const char*, char*), \
1657 (this, first, last, dest))
1659 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1660 const char *first
, const char *last
, char *dest
)
1662 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1663 memcpy(dest
, first
, last
-first
);
1667 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1668 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1669 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1670 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1671 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1672 (this, first, last, dest, size))
1673 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1674 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1676 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1677 memcpy_s(dest
, size
, first
, last
-first
);
1681 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1682 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1683 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1684 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1686 TRACE("(%p %c)\n", this, ch
);
1687 return call_ctype_char_do_widen_ch(this, ch
);
1690 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1691 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1692 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1693 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1694 const char *first
, const char *last
, char *dest
)
1696 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1697 return call_ctype_char_do_widen(this, first
, last
, dest
);
1700 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1701 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1702 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1703 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1704 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1706 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1707 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1710 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1711 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1712 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1714 TRACE("(%p %p)\n", facet
, loc
);
1716 if(facet
&& !*facet
) {
1719 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1721 ERR("Out of memory\n");
1722 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1726 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
1727 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1728 _Locinfo_dtor(&locinfo
);
1734 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1735 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1736 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1738 return ctype_char__Getcat(facet
, locale_classic());
1741 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1743 static ctype_char
*obj
= NULL
;
1746 const locale_facet
*fac
;
1748 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1749 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1751 _Lockit_dtor(&lock
);
1752 return (ctype_char
*)fac
;
1756 _Lockit_dtor(&lock
);
1760 ctype_char__Getcat(&fac
, loc
);
1761 obj
= (ctype_char
*)fac
;
1762 call_locale_facet__Incref(&obj
->base
.facet
);
1763 locale_facet_register(&obj
->base
.facet
);
1764 _Lockit_dtor(&lock
);
1770 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1774 TRACE("%d %p\n", ch
, ctype
);
1779 cp
= ___lc_codepage_func();
1781 /* Don't convert to unicode in case of C locale */
1783 if(ch
>='A' && ch
<='Z')
1792 str
[0] = (ch
>>8) & 255;
1800 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1803 lower
= tolowerW(wide
);
1807 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1809 return str
[0] + (str
[1]<<8);
1813 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1814 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1815 #if _MSVCP_VER <= 100
1816 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1817 char, (const ctype_char*, char), (this, ch))
1819 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1820 char, (const ctype_char*, char), (this, ch))
1822 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1823 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1825 TRACE("(%p %c)\n", this, ch
);
1826 return _Tolower(ch
, &this->ctype
);
1829 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1830 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1831 #if _MSVCP_VER <= 100
1832 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1833 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1835 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 12, \
1836 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1838 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1839 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1841 TRACE("(%p %p %p)\n", this, first
, last
);
1842 for(; first
<last
; first
++)
1843 *first
= _Tolower(*first
, &this->ctype
);
1847 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1848 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1849 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1850 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1852 TRACE("(%p %c)\n", this, ch
);
1853 return call_ctype_char_do_tolower_ch(this, ch
);
1856 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1857 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1858 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1859 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1861 TRACE("(%p %p %p)\n", this, first
, last
);
1862 return call_ctype_char_do_tolower(this, first
, last
);
1866 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1870 TRACE("%d %p\n", ch
, ctype
);
1875 cp
= ___lc_codepage_func();
1877 /* Don't convert to unicode in case of C locale */
1879 if(ch
>='a' && ch
<='z')
1888 str
[0] = (ch
>>8) & 255;
1896 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1899 upper
= toupperW(wide
);
1903 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1905 return str
[0] + (str
[1]<<8);
1909 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1910 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1911 #if _MSVCP_VER <= 100
1912 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1913 char, (const ctype_char*, char), (this, ch))
1915 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1916 char, (const ctype_char*, char), (this, ch))
1918 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1919 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1921 TRACE("(%p %c)\n", this, ch
);
1922 return _Toupper(ch
, &this->ctype
);
1925 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1926 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1927 #if _MSVCP_VER <= 100
1928 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1929 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1931 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 20, \
1932 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1934 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
1935 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
1936 char *first
, const char *last
)
1938 TRACE("(%p %p %p)\n", this, first
, last
);
1939 for(; first
<last
; first
++)
1940 *first
= _Toupper(*first
, &this->ctype
);
1944 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1945 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1946 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
1947 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
1949 TRACE("(%p %c)\n", this, ch
);
1950 return call_ctype_char_do_toupper_ch(this, ch
);
1953 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1954 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1955 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
1956 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
1958 TRACE("(%p %p %p)\n", this, first
, last
);
1959 return call_ctype_char_do_toupper(this, first
, last
);
1962 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1963 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1964 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
1965 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
1967 TRACE("(%p %x %c)\n", this, mask
, ch
);
1968 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
1971 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1972 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1973 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
1974 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
1976 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1977 for(; first
<last
; first
++)
1978 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
1982 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1983 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1984 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
1985 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1987 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1988 for(; first
<last
; first
++)
1989 if(!ctype_char_is_ch(this, mask
, *first
))
1994 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1995 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1996 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
1997 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1999 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2000 for(; first
<last
; first
++)
2001 if(ctype_char_is_ch(this, mask
, *first
))
2006 /* ?table@?$ctype@D@std@@IBEPBFXZ */
2007 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
2008 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
2009 const short* __thiscall
ctype_char_table(const ctype_char
*this)
2011 TRACE("(%p)\n", this);
2012 return this->ctype
.table
;
2015 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
2016 locale_id ctype_wchar_id
= {0};
2017 /* ?id@?$ctype@G@std@@2V0locale@2@A */
2018 locale_id ctype_short_id
= {0};
2020 /* ??_7?$ctype@_W@std@@6B@ */
2021 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
2022 /* ??_7?$ctype@G@std@@6B@ */
2023 extern const vtable_ptr MSVCP_ctype_short_vtable
;
2025 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
2026 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
2027 locale_id
* __cdecl
ctype_wchar__Id_func(void)
2030 return &ctype_wchar_id
;
2033 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
2034 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
2035 locale_id
* __cdecl
ctype_short__Id_func(void)
2038 return &ctype_short_id
;
2041 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
2042 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
2043 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
2044 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
2045 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
2046 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
2048 TRACE("(%p %p)\n", this, locinfo
);
2049 _Locinfo__Getctype(locinfo
, &this->ctype
);
2050 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2053 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
2054 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2055 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
2056 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
2057 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2059 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2060 ctype_base_ctor_refs(&this->base
, refs
);
2061 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2062 ctype_wchar__Init(this, locinfo
);
2066 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
2067 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2068 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
2069 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
2070 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2072 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
2073 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2077 /* ??0?$ctype@_W@std@@QAE@I@Z */
2078 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
2079 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
2080 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2084 TRACE("(%p %lu)\n", this, refs
);
2086 ctype_base_ctor_refs(&this->base
, refs
);
2087 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2089 _Locinfo_ctor(&locinfo
);
2090 ctype_wchar__Init(this, &locinfo
);
2091 _Locinfo_dtor(&locinfo
);
2095 /* ??0?$ctype@G@std@@QAE@I@Z */
2096 /* ??0?$ctype@G@std@@QEAA@_K@Z */
2097 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
2098 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2100 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
2101 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2105 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
2106 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
2107 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
2108 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
2109 const char *name
, MSVCP_size_t refs
)
2113 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
2115 ctype_base_ctor_refs(&this->base
, refs
);
2116 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2118 _Locinfo_ctor_cstr(&locinfo
, name
);
2119 ctype_wchar__Init(this, &locinfo
);
2120 _Locinfo_dtor(&locinfo
);
2124 /* ??_F?$ctype@_W@std@@QAEXXZ */
2125 /* ??_F?$ctype@_W@std@@QEAAXXZ */
2126 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
2127 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
2129 TRACE("(%p)\n", this);
2130 return ctype_short_ctor_refs(this, 0);
2133 /* ??_F?$ctype@G@std@@QAEXXZ */
2134 /* ??_F?$ctype@G@std@@QEAAXXZ */
2135 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
2136 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
2138 ctype_wchar
*ret
= ctype_wchar_ctor(this);
2139 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2143 /* ??1?$ctype@_W@std@@MAE@XZ */
2144 /* ??1?$ctype@_W@std@@MEAA@XZ */
2145 /* ??1?$ctype@G@std@@MAE@XZ */
2146 /* ??1?$ctype@G@std@@MEAA@XZ */
2147 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
2148 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
2150 TRACE("(%p)\n", this);
2151 if(this->ctype
.delfl
)
2152 free((void*)this->ctype
.table
);
2153 #if _MSVCP_VER >= 110
2154 free(this->ctype
.name
);
2158 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
2159 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
2161 TRACE("(%p %x)\n", this, flags
);
2163 /* we have an array, with the number of elements stored before the first object */
2164 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2166 for(i
=*ptr
-1; i
>=0; i
--)
2167 ctype_wchar_dtor(this+i
);
2168 MSVCRT_operator_delete(ptr
);
2170 ctype_wchar_dtor(this);
2172 MSVCRT_operator_delete(this);
2179 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
2184 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
2189 cp
= ___lc_codepage_func();
2201 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
2210 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
2211 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
2212 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
2213 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
2214 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
2215 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2217 char buf
[MB_LEN_MAX
];
2219 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2221 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
2224 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
2225 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
2226 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
2227 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
2228 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
2229 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2230 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
2231 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2232 #elif _MSVCP_VER <= 100
2233 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
2234 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2236 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 56, \
2237 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2239 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2241 return ctype_wchar__Donarrow(this, ch
, dflt
);
2244 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
2245 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2246 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2247 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2248 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2249 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2250 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
2251 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2252 (this, first, last, dflt, dest))
2253 #elif _MSVCP_VER <= 100
2254 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2255 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2256 (this, first, last, dflt, dest))
2258 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 52, \
2259 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2260 (this, first, last, dflt, dest))
2262 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2263 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2265 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2266 for(; first
<last
; first
++)
2267 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2271 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2272 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2273 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2274 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2275 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2276 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2277 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2278 (this, first, last, dflt, dest, size))
2279 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2280 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2282 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2283 /* This function converts all multi-byte characters to dflt,
2284 * thanks to it result size is known before converting */
2285 if(last
-first
> size
)
2287 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2290 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2291 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2292 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2293 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2294 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2295 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2297 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2298 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2301 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2302 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2303 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2304 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2305 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2306 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2307 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2309 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2310 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2313 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2314 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2315 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2316 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2317 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2318 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2319 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2321 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2322 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2326 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
2332 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2340 cp
= ___lc_codepage_func();
2344 *out
= (unsigned char)*in
;
2351 ((char*)state
)[1] = *in
;
2353 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
2363 GetCPInfo(cp
, &cp_info
);
2365 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2366 if(!cp_info
.LeadByte
[i
+1])
2368 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2376 *state
= (unsigned char)*in
;
2380 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2387 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2394 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2395 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2396 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2397 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2398 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2399 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2403 TRACE("(%p %d)\n", this, ch
);
2404 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2407 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2408 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2409 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2410 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2411 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2412 #if _MSVCP_VER <= 100
2413 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2414 wchar_t, (const ctype_wchar*, char), (this, ch))
2416 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 48, \
2417 wchar_t, (const ctype_wchar*, char), (this, ch))
2419 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2421 return ctype_wchar__Dowiden(this, ch
);
2424 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2425 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2426 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2427 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2428 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2429 #if _MSVCP_VER <= 100
2430 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2431 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2432 (this, first, last, dest))
2434 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 44, \
2435 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2436 (this, first, last, dest))
2438 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2439 const char *first
, const char *last
, wchar_t *dest
)
2441 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2442 for(; first
<last
; first
++)
2443 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2447 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2448 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2449 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2450 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2451 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2452 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2453 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2454 (this, first, last, dest, size))
2455 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2456 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2458 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2459 /* This function converts all multi-byte characters to WEOF,
2460 * thanks to it result size is known before converting */
2461 if(size
< last
-first
)
2463 return ctype_wchar_do_widen(this, first
, last
, dest
);
2466 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2467 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2468 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2469 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2470 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2471 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2473 TRACE("(%p %d)\n", this, ch
);
2474 return call_ctype_wchar_do_widen_ch(this, ch
);
2477 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2478 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2479 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2480 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2481 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2482 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2483 const char *first
, const char *last
, wchar_t *dest
)
2485 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2486 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2489 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2490 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2491 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2492 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2493 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2494 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2495 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2497 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2498 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2501 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2502 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2503 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2505 TRACE("(%p %p)\n", facet
, loc
);
2507 if(facet
&& !*facet
) {
2510 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2512 ERR("Out of memory\n");
2513 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2517 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
2518 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2519 _Locinfo_dtor(&locinfo
);
2525 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2526 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2527 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2529 return ctype_wchar__Getcat(facet
, locale_classic());
2532 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2533 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2534 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2536 if(facet
&& !*facet
) {
2537 ctype_wchar__Getcat(facet
, loc
);
2538 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2544 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2545 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2546 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2548 return ctype_short__Getcat(facet
, locale_classic());
2552 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2554 TRACE("(%d %p)\n", ch
, ctype
);
2555 return tolowerW(ch
);
2558 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2560 static ctype_wchar
*obj
= NULL
;
2563 const locale_facet
*fac
;
2565 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2566 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2568 _Lockit_dtor(&lock
);
2569 return (ctype_wchar
*)fac
;
2573 _Lockit_dtor(&lock
);
2577 ctype_wchar__Getcat(&fac
, loc
);
2578 obj
= (ctype_wchar
*)fac
;
2579 call_locale_facet__Incref(&obj
->base
.facet
);
2580 locale_facet_register(&obj
->base
.facet
);
2581 _Lockit_dtor(&lock
);
2586 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2588 static ctype_wchar
*obj
= NULL
;
2591 const locale_facet
*fac
;
2593 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2594 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2596 _Lockit_dtor(&lock
);
2597 return (ctype_wchar
*)fac
;
2601 _Lockit_dtor(&lock
);
2605 ctype_short__Getcat(&fac
, loc
);
2606 obj
= (ctype_wchar
*)fac
;
2607 call_locale_facet__Incref(&obj
->base
.facet
);
2608 locale_facet_register(&obj
->base
.facet
);
2609 _Lockit_dtor(&lock
);
2614 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2615 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2616 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2617 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2618 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2619 #if _MSVCP_VER <= 100
2620 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2621 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2623 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2624 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2626 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2628 return _Towlower(ch
, &this->ctype
);
2631 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2632 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2633 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2634 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2635 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2636 #if _MSVCP_VER <= 100
2637 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2638 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2639 (this, first, last))
2641 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 28, \
2642 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2643 (this, first, last))
2645 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2646 wchar_t *first
, const wchar_t *last
)
2648 TRACE("(%p %p %p)\n", this, first
, last
);
2649 for(; first
<last
; first
++)
2650 *first
= _Towlower(*first
, &this->ctype
);
2654 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2655 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2656 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2657 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2658 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2659 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2661 TRACE("(%p %d)\n", this, ch
);
2662 return call_ctype_wchar_do_tolower_ch(this, ch
);
2665 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2666 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2667 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2668 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2669 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2670 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2671 wchar_t *first
, const wchar_t *last
)
2673 TRACE("(%p %p %p)\n", this, first
, last
);
2674 return call_ctype_wchar_do_tolower(this, first
, last
);
2678 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2680 TRACE("(%d %p)\n", ch
, ctype
);
2681 return toupperW(ch
);
2684 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2685 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2686 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2687 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2688 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2689 #if _MSVCP_VER <= 100
2690 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2691 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2693 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2694 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2696 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2698 return _Towupper(ch
, &this->ctype
);
2701 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2702 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2703 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2704 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2705 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2706 #if _MSVCP_VER <= 100
2707 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2708 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2709 (this, first, last))
2711 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 36, \
2712 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2713 (this, first, last))
2715 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2716 wchar_t *first
, const wchar_t *last
)
2718 TRACE("(%p %p %p)\n", this, first
, last
);
2719 for(; first
<last
; first
++)
2720 *first
= _Towupper(*first
, &this->ctype
);
2724 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2725 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2726 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2727 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2728 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2729 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2731 TRACE("(%p %d)\n", this, ch
);
2732 return call_ctype_wchar_do_toupper_ch(this, ch
);
2735 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2736 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2737 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2738 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2739 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2740 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2741 wchar_t *first
, const wchar_t *last
)
2743 TRACE("(%p %p %p)\n", this, first
, last
);
2744 return call_ctype_wchar_do_toupper(this, first
, last
);
2748 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2749 short *mask
, const _Ctypevec
*ctype
)
2751 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2752 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2757 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2760 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2764 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2765 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2766 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2767 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2768 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2769 #if _MSVCP_VER <= 100
2770 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2771 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2773 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 16, \
2774 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2776 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2778 TRACE("(%p %x %d)\n", this, mask
, ch
);
2779 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2782 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2783 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2784 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2785 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2786 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2787 #if _MSVCP_VER <= 100
2788 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2789 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2790 (this, first, last, dest))
2792 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 12, \
2793 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2794 (this, first, last, dest))
2796 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2797 const wchar_t *first
, const wchar_t *last
, short *dest
)
2799 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2800 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2803 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2804 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2805 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2806 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2807 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2808 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2810 TRACE("(%p %x %d)\n", this, mask
, ch
);
2811 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2814 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2815 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2816 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2817 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2818 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2819 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2820 const wchar_t *first
, const wchar_t *last
, short *dest
)
2822 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2823 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2826 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2827 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2828 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2829 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2830 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2831 #if _MSVCP_VER <= 100
2832 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2833 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2834 (this, mask, first, last))
2836 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 20, \
2837 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2838 (this, mask, first, last))
2840 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2841 short mask
, const wchar_t *first
, const wchar_t *last
)
2843 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2844 for(; first
<last
; first
++)
2845 if(!ctype_wchar_is_ch(this, mask
, *first
))
2850 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2851 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2852 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2853 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2854 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2855 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2856 short mask
, const wchar_t *first
, const wchar_t *last
)
2858 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2859 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2862 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2863 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2864 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2865 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2866 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2867 #if _MSVCP_VER <= 100
2868 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2869 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2870 (this, mask, first, last))
2872 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 24, \
2873 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2874 (this, mask, first, last))
2876 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2877 short mask
, const wchar_t *first
, const wchar_t *last
)
2879 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2880 for(; first
<last
; first
++)
2881 if(ctype_wchar_is_ch(this, mask
, *first
))
2886 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2887 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2888 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2889 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2890 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2891 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2892 short mask
, const wchar_t *first
, const wchar_t *last
)
2894 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2895 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2898 /* ??_7codecvt_base@std@@6B@ */
2899 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2901 /* ??0codecvt_base@std@@QAE@I@Z */
2902 /* ??0codecvt_base@std@@QEAA@_K@Z */
2903 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2904 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2906 TRACE("(%p %lu)\n", this, refs
);
2907 locale_facet_ctor_refs(&this->facet
, refs
);
2908 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2912 /* ??_Fcodecvt_base@std@@QAEXXZ */
2913 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2914 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
2915 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
2917 return codecvt_base_ctor_refs(this, 0);
2920 /* ??1codecvt_base@std@@UAE@XZ */
2921 /* ??1codecvt_base@std@@UEAA@XZ */
2922 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
2923 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
2925 TRACE("(%p)\n", this);
2926 locale_facet_dtor(&this->facet
);
2929 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
2930 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
2932 TRACE("(%p %x)\n", this, flags
);
2934 /* we have an array, with the number of elements stored before the first object */
2935 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2937 for(i
=*ptr
-1; i
>=0; i
--)
2938 codecvt_base_dtor(this+i
);
2939 MSVCRT_operator_delete(ptr
);
2941 codecvt_base_dtor(this);
2943 MSVCRT_operator_delete(this);
2949 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2950 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2951 #if _MSVCP_VER <= 100
2952 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2953 MSVCP_bool, (const codecvt_base*), (this))
2955 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 12, \
2956 MSVCP_bool, (const codecvt_base*), (this))
2958 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
2959 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
2961 TRACE("(%p)\n", this);
2965 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2966 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2967 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
2968 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
2970 TRACE("(%p)\n", this);
2971 return call_codecvt_base_do_always_noconv(this);
2974 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2975 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2976 #if _MSVCP_VER <= 100
2977 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2978 int, (const codecvt_base*), (this))
2980 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 16, \
2981 int, (const codecvt_base*), (this))
2983 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
2984 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
2986 TRACE("(%p)\n", this);
2990 /* ?max_length@codecvt_base@std@@QBEHXZ */
2991 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2992 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
2993 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
2995 TRACE("(%p)\n", this);
2996 return call_codecvt_base_do_max_length(this);
2999 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
3000 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
3001 #if _MSVCP_VER <= 100
3002 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
3003 int, (const codecvt_base*), (this))
3005 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 20, \
3006 int, (const codecvt_base*), (this))
3008 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
3009 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
3011 TRACE("(%p)\n", this);
3015 /* ?encoding@codecvt_base@std@@QBEHXZ */
3016 /* ?encoding@codecvt_base@std@@QEBAHXZ */
3017 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
3018 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
3020 TRACE("(%p)\n", this);
3021 return call_codecvt_base_do_encoding(this);
3024 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
3025 locale_id codecvt_char_id
= {0};
3027 /* ??_7?$codecvt@DDH@std@@6B@ */
3028 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
3030 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
3031 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3032 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
3033 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
3035 TRACE("(%p %p)\n", this, locinfo
);
3038 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
3039 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3040 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
3041 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3043 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
3044 codecvt_base_ctor_refs(&this->base
, refs
);
3045 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
3049 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
3050 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
3051 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
3052 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
3054 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
3057 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
3058 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
3059 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
3060 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
3062 return codecvt_char_ctor_locinfo(this, NULL
, 0);
3065 /* ??1?$codecvt@DDH@std@@MAE@XZ */
3066 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
3067 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
3068 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
3070 TRACE("(%p)\n", this);
3071 codecvt_base_dtor(&this->base
);
3074 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
3075 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
3077 TRACE("(%p %x)\n", this, flags
);
3079 /* we have an array, with the number of elements stored before the first object */
3080 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3082 for(i
=*ptr
-1; i
>=0; i
--)
3083 codecvt_char_dtor(this+i
);
3084 MSVCRT_operator_delete(ptr
);
3086 codecvt_char_dtor(this);
3088 MSVCRT_operator_delete(this);
3094 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3095 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3096 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3098 TRACE("(%p %p)\n", facet
, loc
);
3100 if(facet
&& !*facet
) {
3101 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
3103 ERR("Out of memory\n");
3104 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3107 codecvt_char_ctor((codecvt_char
*)*facet
);
3113 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
3114 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3115 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
3117 return codecvt_char__Getcat(facet
, locale_classic());
3120 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
3122 static codecvt_char
*obj
= NULL
;
3125 const locale_facet
*fac
;
3127 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3128 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
3130 _Lockit_dtor(&lock
);
3131 return (codecvt_char
*)fac
;
3135 _Lockit_dtor(&lock
);
3139 codecvt_char__Getcat(&fac
, loc
);
3140 obj
= (codecvt_char
*)fac
;
3141 call_locale_facet__Incref(&obj
->base
.facet
);
3142 locale_facet_register(&obj
->base
.facet
);
3143 _Lockit_dtor(&lock
);
3148 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3149 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3150 #if _MSVCP_VER <= 100
3151 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3152 CALL_VTBL_FUNC(this, 16, int, \
3153 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3154 (this, state, from, from_end, from_next, to, to_end, to_next))
3156 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3157 CALL_VTBL_FUNC(this, 24, int, \
3158 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3159 (this, state, from, from_end, from_next, to, to_end, to_next))
3161 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
3162 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
3163 const char *from
, const char *from_end
, const char **from_next
,
3164 char *to
, char *to_end
, char **to_next
)
3166 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3167 from_next
, to
, to_end
, to_next
);
3170 return CODECVT_noconv
;
3173 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3174 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3175 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
3176 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
3177 const char *from
, const char *from_end
, const char **from_next
,
3178 char *to
, char *to_end
, char **to_next
)
3180 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3181 from_next
, to
, to_end
, to_next
);
3182 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
3183 to
, to_end
, to_next
);
3186 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3187 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3188 #if _MSVCP_VER <= 100
3189 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3190 CALL_VTBL_FUNC(this, 20, int, \
3191 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3192 (this, state, from, from_end, from_next, to, to_end, to_next))
3194 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3195 CALL_VTBL_FUNC(this, 28, int, \
3196 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3197 (this, state, from, from_end, from_next, to, to_end, to_next))
3199 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
3200 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
3201 const char *from
, const char *from_end
, const char **from_next
,
3202 char *to
, char *to_end
, char **to_next
)
3204 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3205 from_end
, from_next
, to
, to_end
, to_next
);
3208 return CODECVT_noconv
;
3211 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3212 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3213 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
3214 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
3215 const char *from
, const char *from_end
, const char **from_next
,
3216 char *to
, char *to_end
, char **to_next
)
3218 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3219 from_next
, to
, to_end
, to_next
);
3220 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
3221 to
, to_end
, to_next
);
3224 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
3225 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3226 #if _MSVCP_VER <= 100
3227 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3228 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3230 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3231 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3233 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
3234 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
3235 int *state
, char *to
, char *to_end
, char **to_next
)
3237 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3239 return CODECVT_noconv
;
3242 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
3243 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3244 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
3245 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
3246 int *state
, char *to
, char *to_end
, char **to_next
)
3248 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3249 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
3252 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
3253 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
3254 #if _MSVCP_VER <= 100
3255 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3256 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3257 (this, state, from, from_end, max))
3259 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3260 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3261 (this, state, from, from_end, max))
3263 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
3264 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
3265 const char *from
, const char *from_end
, MSVCP_size_t max
)
3267 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3268 return (from_end
-from
> max
? max
: from_end
-from
);
3271 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
3272 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
3273 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
3274 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
3275 const char *from
, const char *from_end
, MSVCP_size_t max
)
3277 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3278 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
3281 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
3282 locale_id codecvt_wchar_id
= {0};
3283 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
3284 locale_id codecvt_short_id
= {0};
3286 /* ??_7?$codecvt@_WDH@std@@6B@ */
3287 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
3288 /* ??_7?$codecvt@GDH@std@@6B@ */
3289 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
3291 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
3292 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3293 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
3294 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3295 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
3296 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
3298 TRACE("(%p %p)\n", this, locinfo
);
3299 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3302 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
3303 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3304 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
3305 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3307 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3309 codecvt_base_ctor_refs(&this->base
, refs
);
3310 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
3312 codecvt_wchar__Init(this, locinfo
);
3316 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
3317 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3318 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
3319 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3321 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3323 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
3324 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
3328 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
3329 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
3330 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
3331 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3335 TRACE("(%p %ld)\n", this, refs
);
3337 _Locinfo_ctor(&locinfo
);
3338 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
3339 _Locinfo_dtor(&locinfo
);
3343 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
3344 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
3345 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
3346 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3350 TRACE("(%p %ld)\n", this, refs
);
3352 _Locinfo_ctor(&locinfo
);
3353 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3354 _Locinfo_dtor(&locinfo
);
3358 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
3359 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
3360 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
3361 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
3365 TRACE("(%p %s %ld)\n", this, name
, refs
);
3367 _Locinfo_ctor_cstr(&locinfo
, name
);
3368 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3369 _Locinfo_dtor(&locinfo
);
3373 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3374 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3375 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3376 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3378 return codecvt_wchar_ctor_refs(this, 0);
3381 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3382 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3383 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3384 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3386 return codecvt_short_ctor_refs(this, 0);
3389 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3390 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3391 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3392 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3393 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3394 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3396 TRACE("(%p)\n", this);
3397 codecvt_base_dtor(&this->base
);
3400 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3401 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3403 TRACE("(%p %x)\n", this, flags
);
3405 /* we have an array, with the number of elements stored before the first object */
3406 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3408 for(i
=*ptr
-1; i
>=0; i
--)
3409 codecvt_wchar_dtor(this+i
);
3410 MSVCRT_operator_delete(ptr
);
3412 codecvt_wchar_dtor(this);
3414 MSVCRT_operator_delete(this);
3420 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3421 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3422 MSVCP_size_t __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3424 TRACE("(%p %p)\n", facet
, loc
);
3426 if(facet
&& !*facet
) {
3429 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3431 ERR("Out of memory\n");
3432 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3436 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3437 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3438 _Locinfo_dtor(&locinfo
);
3444 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
3445 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3446 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
3448 return codecvt_wchar__Getcat(facet
, locale_classic());
3451 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3453 static codecvt_wchar
*obj
= NULL
;
3456 const locale_facet
*fac
;
3458 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3459 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3461 _Lockit_dtor(&lock
);
3462 return (codecvt_wchar
*)fac
;
3466 _Lockit_dtor(&lock
);
3470 codecvt_wchar__Getcat(&fac
, loc
);
3471 obj
= (codecvt_wchar
*)fac
;
3472 call_locale_facet__Incref(&obj
->base
.facet
);
3473 locale_facet_register(&obj
->base
.facet
);
3474 _Lockit_dtor(&lock
);
3479 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3480 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3481 MSVCP_size_t __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3483 TRACE("(%p %p)\n", facet
, loc
);
3485 if(facet
&& !*facet
) {
3488 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3490 ERR("Out of memory\n");
3491 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3495 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3496 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3497 _Locinfo_dtor(&locinfo
);
3503 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
3504 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3505 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
3507 return codecvt_short__Getcat(facet
, locale_classic());
3510 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3512 static codecvt_wchar
*obj
= NULL
;
3515 const locale_facet
*fac
;
3517 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3518 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3520 _Lockit_dtor(&lock
);
3521 return (codecvt_wchar
*)fac
;
3525 _Lockit_dtor(&lock
);
3529 codecvt_short__Getcat(&fac
, loc
);
3530 obj
= (codecvt_wchar
*)fac
;
3531 call_locale_facet__Incref(&obj
->base
.facet
);
3532 locale_facet_register(&obj
->base
.facet
);
3533 _Lockit_dtor(&lock
);
3538 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3539 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3540 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3543 return &codecvt_wchar_id
;
3546 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3547 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3548 locale_id
* __cdecl
codecvt_short__Id_func(void)
3551 return &codecvt_short_id
;
3554 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3555 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3556 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3557 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3558 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3559 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3561 TRACE("(%p)\n", this);
3565 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3566 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3567 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3568 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3569 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3570 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3572 TRACE("(%p)\n", this);
3576 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3577 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3578 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3579 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3580 #if _MSVCP_VER <= 100
3581 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3582 CALL_VTBL_FUNC(this, 16, int, \
3583 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3584 (this, state, from, from_end, from_next, to, to_end, to_next))
3586 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3587 CALL_VTBL_FUNC(this, 24, int, \
3588 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3589 (this, state, from, from_end, from_next, to, to_end, to_next))
3591 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3592 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3593 const char *from
, const char *from_end
, const char **from_next
,
3594 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3596 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3597 from_end
, from_next
, to
, to_end
, to_next
);
3602 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3603 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3605 *from_next
= from_end
;
3606 return CODECVT_partial
;
3608 return CODECVT_error
;
3622 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3623 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3624 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3625 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3626 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3627 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3628 const char *from
, const char *from_end
, const char **from_next
,
3629 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3631 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3632 from_end
, from_next
, to
, to_end
, to_next
);
3633 return call_codecvt_wchar_do_in(this, state
, from
,
3634 from_end
, from_next
, to
, to_end
, to_next
);
3637 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3638 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3639 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3640 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3641 #if _MSVCP_VER <= 100
3642 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3643 CALL_VTBL_FUNC(this, 20, int, \
3644 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3645 (this, state, from, from_end, from_next, to, to_end, to_next))
3647 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3648 CALL_VTBL_FUNC(this, 28, int, \
3649 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3650 (this, state, from, from_end, from_next, to, to_end, to_next))
3652 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3653 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3654 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3655 char *to
, char *to_end
, char **to_next
)
3657 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3658 from_end
, from_next
, to
, to_end
, to_next
);
3663 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3664 int old_state
= *state
, size
;
3665 char buf
[MB_LEN_MAX
];
3667 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3669 return CODECVT_error
;
3671 if(size
> from_end
-*from_next
) {
3673 return CODECVT_partial
;
3677 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
3685 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3686 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3687 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3688 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3689 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3690 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3691 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3692 char *to
, char *to_end
, char **to_next
)
3694 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3695 from_end
, from_next
, to
, to_end
, to_next
);
3696 return call_codecvt_wchar_do_out(this, state
, from
,
3697 from_end
, from_next
, to
, to_end
, to_next
);
3700 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3701 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3702 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3703 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3704 #if _MSVCP_VER <= 100
3705 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3706 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3708 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3709 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3711 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3712 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3713 int *state
, char *to
, char *to_end
, char **to_next
)
3715 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3717 WARN("unexpected state: %x\n", *state
);
3723 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3724 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3725 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3726 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3727 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3728 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3729 int *state
, char *to
, char *to_end
, char **to_next
)
3731 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3732 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3735 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3736 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3737 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3738 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3739 #if _MSVCP_VER <= 100
3740 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3741 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3742 (this, state, from, from_end, max))
3744 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3745 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3746 (this, state, from, from_end, max))
3748 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3749 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3750 const char *from
, const char *from_end
, MSVCP_size_t max
)
3752 int tmp_state
= *state
, ret
=0;
3754 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3756 while(ret
<max
&& from
!=from_end
) {
3757 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3774 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3775 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3776 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3777 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3778 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3779 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3780 const char *from
, const char *from_end
, MSVCP_size_t max
)
3782 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3783 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3786 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3787 locale_id numpunct_char_id
= {0};
3789 /* ??_7?$numpunct@D@std@@6B@ */
3790 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3792 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3793 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3794 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
3795 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3799 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3801 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3802 this->false_name
= MSVCRT_operator_new(len
);
3803 if(this->false_name
)
3804 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3806 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3807 this->true_name
= MSVCRT_operator_new(len
);
3809 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3812 this->grouping
= MSVCRT_operator_new(1);
3814 *(char*)this->grouping
= 0;
3819 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3821 len
= strlen(lc
->grouping
)+1;
3822 this->grouping
= MSVCRT_operator_new(len
);
3824 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3826 this->dp
= lc
->decimal_point
[0];
3827 this->sep
= lc
->thousands_sep
[0];
3830 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3831 MSVCRT_operator_delete((char*)this->grouping
);
3832 MSVCRT_operator_delete((char*)this->false_name
);
3833 MSVCRT_operator_delete((char*)this->true_name
);
3835 ERR("Out of memory\n");
3836 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3840 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3841 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3842 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
3843 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
3845 TRACE("(%p)\n", this);
3847 MSVCRT_operator_delete((char*)this->grouping
);
3848 MSVCRT_operator_delete((char*)this->false_name
);
3849 MSVCRT_operator_delete((char*)this->true_name
);
3852 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3853 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3854 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
3855 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
3856 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3858 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3859 locale_facet_ctor_refs(&this->facet
, refs
);
3860 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3861 numpunct_char__Init(this, locinfo
, usedef
);
3865 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3866 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3867 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
3868 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
3869 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3873 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3874 locale_facet_ctor_refs(&this->facet
, refs
);
3875 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3877 _Locinfo_ctor_cstr(&locinfo
, name
);
3878 numpunct_char__Init(this, &locinfo
, usedef
);
3879 _Locinfo_dtor(&locinfo
);
3883 /* ??0?$numpunct@D@std@@QAE@I@Z */
3884 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3885 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3886 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3888 TRACE("(%p %lu)\n", this, refs
);
3889 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3892 /* ??_F?$numpunct@D@std@@QAEXXZ */
3893 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3894 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3895 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3897 return numpunct_char_ctor_refs(this, 0);
3900 /* ??1?$numpunct@D@std@@MAE@XZ */
3901 /* ??1?$numpunct@D@std@@MEAA@XZ */
3902 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
3903 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
3905 TRACE("(%p)\n", this);
3906 numpunct_char__Tidy(this);
3909 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
3910 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
3912 TRACE("(%p %x)\n", this, flags
);
3914 /* we have an array, with the number of elements stored before the first object */
3915 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3917 for(i
=*ptr
-1; i
>=0; i
--)
3918 numpunct_char_dtor(this+i
);
3919 MSVCRT_operator_delete(ptr
);
3921 numpunct_char_dtor(this);
3923 MSVCRT_operator_delete(this);
3929 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3930 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3931 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3933 TRACE("(%p %p)\n", facet
, loc
);
3935 if(facet
&& !*facet
) {
3936 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
3938 ERR("Out of memory\n");
3939 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3942 numpunct_char_ctor_name((numpunct_char
*)*facet
,
3943 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3949 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
3950 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3951 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
3953 return numpunct_char__Getcat(facet
, locale_classic());
3956 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
3958 static numpunct_char
*obj
= NULL
;
3961 const locale_facet
*fac
;
3963 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3964 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
3966 _Lockit_dtor(&lock
);
3967 return (numpunct_char
*)fac
;
3971 _Lockit_dtor(&lock
);
3975 numpunct_char__Getcat(&fac
, loc
);
3976 obj
= (numpunct_char
*)fac
;
3977 call_locale_facet__Incref(&obj
->facet
);
3978 locale_facet_register(&obj
->facet
);
3979 _Lockit_dtor(&lock
);
3984 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3985 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3986 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
3987 #if _MSVCP_VER <= 100
3988 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3989 char, (const numpunct_char *this), (this))
3991 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
3992 char, (const numpunct_char *this), (this))
3994 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
3996 TRACE("(%p)\n", this);
4000 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
4001 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
4002 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
4003 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
4005 TRACE("(%p)\n", this);
4006 return call_numpunct_char_do_decimal_point(this);
4009 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
4010 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
4011 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
4012 #if _MSVCP_VER <= 100
4013 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4014 char, (const numpunct_char*), (this))
4016 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4017 char, (const numpunct_char*), (this))
4019 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
4021 TRACE("(%p)\n", this);
4025 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
4026 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
4027 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
4028 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
4030 TRACE("(%p)\n", this);
4031 return call_numpunct_char_do_thousands_sep(this);
4034 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4035 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4036 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
4037 #if _MSVCP_VER <= 100
4038 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4039 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4041 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4042 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4044 basic_string_char
* __thiscall
numpunct_char_do_grouping(
4045 const numpunct_char
*this, basic_string_char
*ret
)
4047 TRACE("(%p)\n", this);
4048 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4051 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4052 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4053 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
4054 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
4056 TRACE("(%p)\n", this);
4057 return call_numpunct_char_do_grouping(this, ret
);
4060 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4061 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4062 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
4063 #if _MSVCP_VER <= 100
4064 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4065 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4067 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4068 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4070 basic_string_char
* __thiscall
numpunct_char_do_falsename(
4071 const numpunct_char
*this, basic_string_char
*ret
)
4073 TRACE("(%p)\n", this);
4074 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
4077 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4078 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4079 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
4080 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
4082 TRACE("(%p)\n", this);
4083 return call_numpunct_char_do_falsename(this, ret
);
4086 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4087 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4088 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
4089 #if _MSVCP_VER <= 100
4090 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4091 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4093 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4094 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4096 basic_string_char
* __thiscall
numpunct_char_do_truename(
4097 const numpunct_char
*this, basic_string_char
*ret
)
4099 TRACE("(%p)\n", this);
4100 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
4103 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4104 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4105 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
4106 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
4108 TRACE("(%p)\n", this);
4109 return call_numpunct_char_do_truename(this, ret
);
4112 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
4113 locale_id numpunct_wchar_id
= {0};
4114 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
4115 locale_id numpunct_short_id
= {0};
4117 /* ??_7?$numpunct@_W@std@@6B@ */
4118 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
4119 /* ??_7?$numpunct@G@std@@6B@ */
4120 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
4122 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
4123 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4124 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
4125 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4126 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
4127 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
4128 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
4130 const char *to_convert
;
4134 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4136 _Locinfo__Getcvt(locinfo
, &cvt
);
4138 to_convert
= _Locinfo__Getfalse(locinfo
);
4139 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4140 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4141 if(this->false_name
)
4142 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4143 (wchar_t*)this->false_name
, len
);
4145 to_convert
= _Locinfo__Gettrue(locinfo
);
4146 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4147 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4149 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4150 (wchar_t*)this->true_name
, len
);
4153 this->grouping
= MSVCRT_operator_new(1);
4155 *(char*)this->grouping
= 0;
4160 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4162 len
= strlen(lc
->grouping
)+1;
4163 this->grouping
= MSVCRT_operator_new(len
);
4165 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4167 this->dp
= lc
->decimal_point
[0];
4168 this->sep
= lc
->thousands_sep
[0];
4171 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4172 MSVCRT_operator_delete((char*)this->grouping
);
4173 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4174 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4176 ERR("Out of memory\n");
4177 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4181 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
4182 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
4183 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
4184 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
4185 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
4186 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
4188 TRACE("(%p)\n", this);
4190 MSVCRT_operator_delete((char*)this->grouping
);
4191 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4192 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4195 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
4196 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4197 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
4198 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
4199 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4201 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4202 locale_facet_ctor_refs(&this->facet
, refs
);
4203 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4204 numpunct_wchar__Init(this, locinfo
, usedef
);
4208 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
4209 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4210 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
4211 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
4212 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4214 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
4215 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4219 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
4220 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
4221 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
4222 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
4223 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4227 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4228 locale_facet_ctor_refs(&this->facet
, refs
);
4229 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4231 _Locinfo_ctor_cstr(&locinfo
, name
);
4232 numpunct_wchar__Init(this, &locinfo
, usedef
);
4233 _Locinfo_dtor(&locinfo
);
4237 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
4238 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
4239 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
4240 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
4241 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4243 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
4244 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4248 /* ??0?$numpunct@_W@std@@QAE@I@Z */
4249 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
4250 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
4251 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4253 TRACE("(%p %lu)\n", this, refs
);
4254 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
4257 /* ??0?$numpunct@G@std@@QAE@I@Z */
4258 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
4259 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
4260 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4262 numpunct_wchar_ctor_refs(this, refs
);
4263 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4267 /* ??_F?$numpunct@_W@std@@QAEXXZ */
4268 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
4269 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
4270 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
4272 return numpunct_wchar_ctor_refs(this, 0);
4275 /* ??_F?$numpunct@G@std@@QAEXXZ */
4276 /* ??_F?$numpunct@G@std@@QEAAXXZ */
4277 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
4278 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
4280 return numpunct_short_ctor_refs(this, 0);
4283 /* ??1?$numpunct@_W@std@@MAE@XZ */
4284 /* ??1?$numpunct@_W@std@@MEAA@XZ */
4285 /* ??1?$numpunct@G@std@@MAE@XZ */
4286 /* ??1?$numpunct@G@std@@MEAA@XZ */
4287 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
4288 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
4290 TRACE("(%p)\n", this);
4291 numpunct_wchar__Tidy(this);
4294 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
4295 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
4297 TRACE("(%p %x)\n", this, flags
);
4299 /* we have an array, with the number of elements stored before the first object */
4300 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4302 for(i
=*ptr
-1; i
>=0; i
--)
4303 numpunct_wchar_dtor(this+i
);
4304 MSVCRT_operator_delete(ptr
);
4306 numpunct_wchar_dtor(this);
4308 MSVCRT_operator_delete(this);
4314 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4315 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4316 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4318 TRACE("(%p %p)\n", facet
, loc
);
4320 if(facet
&& !*facet
) {
4321 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4323 ERR("Out of memory\n");
4324 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4327 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
4328 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4334 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
4335 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4336 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
4338 return numpunct_wchar__Getcat(facet
, locale_classic());
4341 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
4343 static numpunct_wchar
*obj
= NULL
;
4346 const locale_facet
*fac
;
4348 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4349 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
4351 _Lockit_dtor(&lock
);
4352 return (numpunct_wchar
*)fac
;
4356 _Lockit_dtor(&lock
);
4360 numpunct_wchar__Getcat(&fac
, loc
);
4361 obj
= (numpunct_wchar
*)fac
;
4362 call_locale_facet__Incref(&obj
->facet
);
4363 locale_facet_register(&obj
->facet
);
4364 _Lockit_dtor(&lock
);
4369 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4370 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4371 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4373 TRACE("(%p %p)\n", facet
, loc
);
4375 if(facet
&& !*facet
) {
4376 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4378 ERR("Out of memory\n");
4379 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4382 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
4383 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4389 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
4390 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4391 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
4393 return numpunct_short__Getcat(facet
, locale_classic());
4396 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
4398 static numpunct_wchar
*obj
= NULL
;
4401 const locale_facet
*fac
;
4403 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4404 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
4406 _Lockit_dtor(&lock
);
4407 return (numpunct_wchar
*)fac
;
4411 _Lockit_dtor(&lock
);
4415 numpunct_short__Getcat(&fac
, loc
);
4416 obj
= (numpunct_wchar
*)fac
;
4417 call_locale_facet__Incref(&obj
->facet
);
4418 locale_facet_register(&obj
->facet
);
4419 _Lockit_dtor(&lock
);
4424 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
4425 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
4426 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
4427 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
4428 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
4429 #if _MSVCP_VER <= 100
4430 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4431 wchar_t, (const numpunct_wchar *this), (this))
4433 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4434 wchar_t, (const numpunct_wchar *this), (this))
4436 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
4438 TRACE("(%p)\n", this);
4442 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
4443 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
4444 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
4445 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
4446 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
4447 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
4449 TRACE("(%p)\n", this);
4450 return call_numpunct_wchar_do_decimal_point(this);
4453 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
4454 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
4455 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
4456 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
4457 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
4458 #if _MSVCP_VER <= 100
4459 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4460 wchar_t, (const numpunct_wchar *this), (this))
4462 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4463 wchar_t, (const numpunct_wchar *this), (this))
4465 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
4467 TRACE("(%p)\n", this);
4471 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4472 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4473 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4474 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4475 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4476 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4478 TRACE("(%p)\n", this);
4479 return call_numpunct_wchar_do_thousands_sep(this);
4482 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4483 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4484 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4485 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4486 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4487 #if _MSVCP_VER <= 100
4488 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4489 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4491 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4492 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4494 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4496 TRACE("(%p)\n", this);
4497 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4500 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4501 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4502 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4503 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4504 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4505 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4507 TRACE("(%p)\n", this);
4508 return call_numpunct_wchar_do_grouping(this, ret
);
4511 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4512 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4513 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4514 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4515 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4516 #if _MSVCP_VER <= 100
4517 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4518 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4520 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4521 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4523 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4525 TRACE("(%p)\n", this);
4526 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4529 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4530 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4531 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4532 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4533 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4534 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4536 TRACE("(%p)\n", this);
4537 return call_numpunct_wchar_do_falsename(this, ret
);
4540 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4541 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4542 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4543 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4544 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4545 #if _MSVCP_VER <= 100
4546 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4547 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4549 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4550 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4552 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4554 TRACE("(%p)\n", this);
4555 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4558 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4559 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4560 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4561 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4562 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4563 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4565 TRACE("(%p)\n", this);
4566 return call_numpunct_wchar_do_truename(this, ret
);
4569 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4571 double ret
= strtod(buf
, buf_end
);
4574 ret
*= pow(10, exp
);
4578 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4584 ret
= _Stod(buf
, buf_end
, exp
);
4594 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4596 return _Stod(buf
, buf_end
, exp
);
4599 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4601 return _Stodx(buf
, buf_end
, exp
, err
);
4604 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4606 return _strtoi64(buf
, buf_end
, base
);
4609 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4615 ret
= _strtoi64(buf
, buf_end
, base
);
4625 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4627 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4628 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4633 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4635 return _strtoui64(buf
, buf_end
, base
);
4638 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4640 unsigned __int64 ret
;
4644 ret
= _strtoui64(buf
, buf_end
, base
);
4654 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4657 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4658 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4660 return buf
[0]=='-' ? -i
: i
;
4663 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4665 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4666 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4668 return buf
[0]=='-' ? -i
: i
;
4671 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4672 locale_id num_get_wchar_id
= {0};
4673 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4674 locale_id num_get_short_id
= {0};
4676 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4677 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4678 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4679 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4681 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4682 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4683 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4684 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4685 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4686 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4688 TRACE("(%p %p)\n", this, locinfo
);
4689 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4692 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4693 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4694 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4695 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4696 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4698 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4700 locale_facet_ctor_refs(&this->facet
, refs
);
4701 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4703 num_get_wchar__Init(this, locinfo
);
4707 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4708 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4709 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4710 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4711 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4713 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4714 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4718 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4719 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4720 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4721 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4725 TRACE("(%p %lu)\n", this, refs
);
4727 _Locinfo_ctor(&locinfo
);
4728 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4729 _Locinfo_dtor(&locinfo
);
4733 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4734 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4735 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4736 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4738 num_get_wchar_ctor_refs(this, refs
);
4739 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4743 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4744 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4745 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4746 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4748 return num_get_wchar_ctor_refs(this, 0);
4751 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4752 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4753 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4754 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4756 return num_get_short_ctor_refs(this, 0);
4759 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4760 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4761 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4762 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4763 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4764 void __thiscall
num_get_wchar_dtor(num_get
*this)
4766 TRACE("(%p)\n", this);
4767 locale_facet_dtor(&this->facet
);
4770 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4771 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4773 TRACE("(%p %x)\n", this, flags
);
4775 /* we have an array, with the number of elements stored before the first object */
4776 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4778 for(i
=*ptr
-1; i
>=0; i
--)
4779 num_get_wchar_dtor(this+i
);
4780 MSVCRT_operator_delete(ptr
);
4782 num_get_wchar_dtor(this);
4784 MSVCRT_operator_delete(this);
4790 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4791 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4792 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4794 TRACE("(%p %p)\n", facet
, loc
);
4796 if(facet
&& !*facet
) {
4799 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4801 ERR("Out of memory\n");
4802 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4806 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
4807 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4808 _Locinfo_dtor(&locinfo
);
4814 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
4815 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4816 MSVCP_size_t __cdecl
num_get_wchar__Getcat_old(const locale_facet
**facet
)
4818 return num_get_wchar__Getcat(facet
, locale_classic());
4821 num_get
* num_get_wchar_use_facet(const locale
*loc
)
4823 static num_get
*obj
= NULL
;
4826 const locale_facet
*fac
;
4828 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4829 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
4831 _Lockit_dtor(&lock
);
4832 return (num_get
*)fac
;
4836 _Lockit_dtor(&lock
);
4840 num_get_wchar__Getcat(&fac
, loc
);
4841 obj
= (num_get
*)fac
;
4842 call_locale_facet__Incref(&obj
->facet
);
4843 locale_facet_register(&obj
->facet
);
4844 _Lockit_dtor(&lock
);
4849 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4850 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4851 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4853 if(facet
&& !*facet
) {
4854 num_get_wchar__Getcat(facet
, loc
);
4855 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
4861 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
4862 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4863 MSVCP_size_t __cdecl
num_get_short__Getcat_old(const locale_facet
**facet
)
4865 return num_get_short__Getcat(facet
, locale_classic());
4868 num_get
* num_get_short_use_facet(const locale
*loc
)
4870 static num_get
*obj
= NULL
;
4873 const locale_facet
*fac
;
4875 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4876 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
4878 _Lockit_dtor(&lock
);
4879 return (num_get
*)fac
;
4883 _Lockit_dtor(&lock
);
4887 num_get_short__Getcat(&fac
, loc
);
4888 obj
= (num_get
*)fac
;
4889 call_locale_facet__Incref(&obj
->facet
);
4890 locale_facet_register(&obj
->facet
);
4891 _Lockit_dtor(&lock
);
4896 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
4901 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
4904 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4905 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
4907 basic_string_char grouping_bstr
;
4908 basic_string_char groups_found
;
4909 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
4910 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
4911 wchar_t sep
, digits
[11], *digits_pos
;
4912 const char *grouping
, *groups
;
4913 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
4915 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
4918 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4921 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4922 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4923 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : 0;
4926 MSVCP_basic_string_char_ctor(&groups_found
);
4928 istreambuf_iterator_wchar_val(first
);
4930 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4932 istreambuf_iterator_wchar_inc(first
);
4933 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4935 istreambuf_iterator_wchar_inc(first
);
4938 /* read possibly grouped numbers before decimal */
4939 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4940 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4941 if(sep
&& first
->val
==sep
) {
4942 if(!groups_no
) break; /* empty group - stop parsing */
4943 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
4950 got_digit
= TRUE
; /* found a digit, zero or non-zero */
4951 /* write digit to dest if not a leading zero (to not waste dest buffer) */
4952 if(!got_nonzero
&& first
->val
== digits
[0])
4959 *dest
++ = '0'+digits_pos
-digits
;
4961 exp
++; /* too many digits, just multiply by 10 */
4962 if(sep
&& groups_no
<CHAR_MAX
)
4967 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
4968 if(got_digit
&& !got_nonzero
)
4971 /* get decimal, if any */
4972 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
4974 *dest
++ = *localeconv()->decimal_point
;
4975 istreambuf_iterator_wchar_inc(first
);
4978 /* read non-grouped after decimal */
4979 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4980 if(!(digits_pos
= wcschr(digits
, first
->val
)))
4982 else if(dest
<num_end
) {
4984 *dest
++ = '0'+digits_pos
-digits
;
4988 /* read exponent, if any */
4989 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
4991 istreambuf_iterator_wchar_inc(first
);
4993 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4995 istreambuf_iterator_wchar_inc(first
);
4996 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4998 istreambuf_iterator_wchar_inc(first
);
5001 got_digit
= got_nonzero
= FALSE
;
5003 /* skip any leading zeroes */
5004 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
5007 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
5008 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5011 *dest
++ = '0'+digits_pos
-digits
;
5014 /* if just found zeroes for exponent, use that */
5015 if(got_digit
&& !got_nonzero
)
5023 if(sep
&& groups_no
)
5024 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5026 if(!cur_group
) /* no groups, skip loop */
5028 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
5029 error
= TRUE
; /* trailing empty */
5031 for(; cur_group
>=0 && !error
; cur_group
--) {
5032 if(*grouping
== CHAR_MAX
) {
5036 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5037 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5040 }else if(grouping
[1]) {
5044 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5046 MSVCP_basic_string_char_dtor(&groups_found
);
5056 /* ?_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 */
5057 /* ?_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 */
5058 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5059 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5061 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
5064 /* ?_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 */
5065 /* ?_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 */
5066 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5067 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5069 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
5072 /* ?_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 */
5073 /* ?_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 */
5074 /* ?_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 */
5075 /* ?_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 */
5076 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5077 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
5079 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5083 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5084 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
5086 wchar_t digits
[23], *digits_pos
, sep
;
5087 basic_string_char grouping_bstr
;
5088 basic_string_char groups_found
;
5089 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
5090 char *dest_beg
= dest
, *dest_end
= dest
+24;
5091 const char *grouping
, *groups
;
5092 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5094 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5097 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5098 for(i
=0; i
<6; i
++) {
5099 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
5100 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
5103 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5104 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5105 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
5107 basefield
= fmtflags
& FMTFLAG_basefield
;
5108 if(basefield
== FMTFLAG_oct
)
5110 else if(basefield
== FMTFLAG_hex
)
5111 base
= 22; /* equal to the size of digits buffer */
5117 istreambuf_iterator_wchar_val(first
);
5118 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5120 istreambuf_iterator_wchar_inc(first
);
5121 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5123 istreambuf_iterator_wchar_inc(first
);
5126 if(first
->strbuf
&& first
->val
==digits
[0]) {
5128 istreambuf_iterator_wchar_inc(first
);
5129 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
5130 if(!base
|| base
== 22) {
5132 istreambuf_iterator_wchar_inc(first
);
5142 if(!base
) base
= 10;
5147 MSVCP_basic_string_char_ctor(&groups_found
);
5148 if(found_zero
) ++groups_no
;
5151 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5152 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5153 if(sep
&& first
->val
==sep
) {
5154 if(!groups_no
) break; /* empty group - stop parsing */
5155 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5163 if(dest_empty
&& first
->val
== digits
[0]) {
5169 /* skip digits that can't be copied to dest buffer, other
5170 * functions are responsible for detecting overflows */
5172 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
5173 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
5174 'A'+digits_pos
-digits
-16));
5175 if(sep
&& groups_no
<CHAR_MAX
)
5180 if(sep
&& groups_no
)
5181 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5183 if(!cur_group
) { /* no groups, skip loop */
5185 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
5186 error
= TRUE
; /* trailing empty */
5190 for(; cur_group
>=0 && !error
; cur_group
--) {
5191 if(*grouping
== CHAR_MAX
) {
5195 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5196 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5199 }else if(grouping
[1]) {
5204 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5206 MSVCP_basic_string_char_dtor(&groups_found
);
5213 }else if(dest_empty
)
5217 return (base
==22 ? 16 : base
);
5220 /* ?_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 */
5221 /* ?_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 */
5222 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5223 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5225 return num_get__Getifld(this, dest
, first
, last
,
5226 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
5229 /* ?_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 */
5230 /* ?_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 */
5231 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5232 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5234 return num_get__Getifld(this, dest
, first
, last
,
5235 fmtflags
, loc
, numpunct_short_use_facet(loc
));
5238 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
5239 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
5240 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
5241 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
5242 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
5243 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
5245 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5249 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
5250 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5251 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5252 void **pval
, numpunct_wchar
*numpunct
)
5258 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5260 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5261 &last
, FMTFLAG_hex
, base
->loc
, numpunct
), &err
);
5262 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5263 *state
|= IOSTATE_failbit
;
5264 else if(end
!=tmp
&& !err
)
5265 *pval
= (void*)((INT_PTR
)v
);
5267 *state
|= IOSTATE_failbit
;
5270 *state
|= IOSTATE_eofbit
;
5276 /* ?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 */
5277 /* ?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 */
5278 #if _MSVCP_VER <= 100
5279 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
5280 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5281 (this, ret, first, last, base, state, pval))
5283 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5284 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5285 (this, ret, first, last, base, state, pval))
5287 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
5288 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5289 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5291 return num_get_do_get_void(this, ret
, first
, last
, base
,
5292 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5295 /* ?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 */
5296 /* ?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 */
5297 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
5298 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5299 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5301 return num_get_do_get_void(this, ret
, first
, last
, base
,
5302 state
, pval
, numpunct_short_use_facet(base
->loc
));
5305 /* ?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 */
5306 /* ?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 */
5307 /* ?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 */
5308 /* ?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 */
5309 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
5310 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5311 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5313 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5314 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5317 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
5318 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5319 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5320 double *pval
, numpunct_wchar
*numpunct
)
5326 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5328 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, base
->loc
, numpunct
), &err
);
5329 if(end
!=tmp
&& !err
)
5332 *state
|= IOSTATE_failbit
;
5335 *state
|= IOSTATE_eofbit
;
5341 /* ?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 */
5342 /* ?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 */
5343 /* ?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 */
5344 /* ?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 */
5345 #if _MSVCP_VER <= 100
5346 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
5347 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5348 (this, ret, first, last, base, state, pval))
5349 #define call_num_get_wchar_do_get_double(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*, double*), \
5351 (this, ret, first, last, base, state, pval))
5353 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5354 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5355 (this, ret, first, last, base, state, pval))
5356 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5357 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5358 (this, ret, first, last, base, state, pval))
5360 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
5361 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5362 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5364 return num_get_do_get_double(this, ret
, first
, last
, base
,
5365 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5368 /* ?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 */
5369 /* ?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 */
5370 /* ?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 */
5371 /* ?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 */
5372 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
5373 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5374 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5376 return num_get_do_get_double(this, ret
, first
, last
, base
,
5377 state
, pval
, numpunct_short_use_facet(base
->loc
));
5380 /* ?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 */
5381 /* ?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 */
5382 /* ?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 */
5383 /* ?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 */
5384 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
5385 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5386 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5388 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5389 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5392 /* ?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 */
5393 /* ?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 */
5394 /* ?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 */
5395 /* ?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 */
5396 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
5397 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5398 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5400 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5401 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5404 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
5405 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5406 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5407 float *pval
, numpunct_wchar
*numpunct
)
5413 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5415 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
5416 &last
, base
->loc
, numpunct
), &err
);
5417 if(end
!=tmp
&& !err
)
5420 *state
|= IOSTATE_failbit
;
5423 *state
|= IOSTATE_eofbit
;
5429 /* ?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 */
5430 /* ?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 */
5431 #if _MSVCP_VER <= 100
5432 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5433 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5434 (this, ret, first, last, base, state, pval))
5436 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5437 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5438 (this, ret, first, last, base, state, pval))
5440 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
5441 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5442 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5444 return num_get_do_get_float(this, ret
, first
, last
, base
,
5445 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5448 /* ?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 */
5449 /* ?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 */
5450 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
5451 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5452 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5454 return num_get_do_get_float(this, ret
, first
, last
, base
,
5455 state
, pval
, numpunct_short_use_facet(base
->loc
));
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@AAHAAM@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@AEAHAEAM@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@AAHAAM@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@AEAHAEAM@Z */
5462 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
5463 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5464 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5466 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5467 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5470 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
5471 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5472 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5473 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
5479 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5481 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5482 &last
, base
->fmtfl
, base
->loc
, 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@AAHAA_K@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@AEAHAEA_K@Z */
5497 #if _MSVCP_VER <= 100
5498 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5499 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5500 (this, ret, first, last, base, state, pval))
5502 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5503 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5504 (this, ret, first, last, base, state, pval))
5506 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
5507 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5508 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5510 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5511 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
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@AAHAA_K@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@AEAHAEA_K@Z */
5516 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
5517 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5518 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5520 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5521 state
, pval
, numpunct_short_use_facet(base
->loc
));
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@AAHAA_K@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@AEAHAEA_K@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@AAHAA_K@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@AEAHAEA_K@Z */
5528 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
5529 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5530 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5532 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5533 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5536 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5537 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5538 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5539 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5545 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5547 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5548 &last
, base
->fmtfl
, base
->loc
, 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_J@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_J@Z */
5563 #if _MSVCP_VER <= 100
5564 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5565 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5566 (this, ret, first, last, base, state, pval))
5568 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5569 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5570 (this, ret, first, last, base, state, pval))
5572 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5573 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5574 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5576 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5577 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
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_J@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_J@Z */
5582 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5583 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5584 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5586 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5587 state
, pval
, numpunct_short_use_facet(base
->loc
));
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_J@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_J@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_J@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_J@Z */
5594 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5595 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5596 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5598 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5599 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5602 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5603 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5604 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5605 ULONG
*pval
, numpunct_wchar
*numpunct
)
5611 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5613 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5614 &last
, base
->fmtfl
, base
->loc
, 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@AAHAAK@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@AEAHAEAK@Z */
5629 #if _MSVCP_VER <= 100
5630 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5631 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5632 (this, ret, first, last, base, state, pval))
5634 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5635 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5636 (this, ret, first, last, base, state, pval))
5638 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5639 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5640 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5642 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5643 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
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@AAHAAK@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@AEAHAEAK@Z */
5648 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5649 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5650 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5652 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5653 state
, pval
, numpunct_short_use_facet(base
->loc
));
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@AAHAAK@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@AEAHAEAK@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@AAHAAK@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@AEAHAEAK@Z */
5660 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5661 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5662 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5664 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5665 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5668 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5669 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5670 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5671 LONG
*pval
, numpunct_wchar
*numpunct
)
5677 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5679 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5680 &last
, base
->fmtfl
, base
->loc
, 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@AAHAAJ@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@AEAHAEAJ@Z */
5695 #if _MSVCP_VER <= 100
5696 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5697 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5698 (this, ret, first, last, base, state, pval))
5700 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5701 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5702 (this, ret, first, last, base, state, pval))
5704 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5705 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5706 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5708 return num_get_do_get_long(this, ret
, first
, last
, base
,
5709 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
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@AAHAAJ@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@AEAHAEAJ@Z */
5714 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5715 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5716 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5718 return num_get_do_get_long(this, ret
, first
, last
, base
,
5719 state
, pval
, numpunct_short_use_facet(base
->loc
));
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@AAHAAJ@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@AEAHAEAJ@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@AAHAAJ@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@AEAHAEAJ@Z */
5726 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5727 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5728 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5730 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5731 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5734 /* ?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 */
5735 /* ?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 */
5736 #if _MSVCP_VER <= 100
5737 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5738 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5739 (this, ret, first, last, base, state, pval))
5741 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5742 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5743 (this, ret, first, last, base, state, pval))
5745 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5746 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5747 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5749 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5750 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5753 /* ?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 */
5754 /* ?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 */
5755 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5756 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5757 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5759 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5760 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5763 /* ?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 */
5764 /* ?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 */
5765 /* ?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 */
5766 /* ?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 */
5767 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5768 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5769 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5771 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5772 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5775 /* ?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 */
5776 /* ?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 */
5777 #if _MSVCP_VER <= 100
5778 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5779 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5780 (this, ret, first, last, base, state, pval))
5782 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_wchar*, \
5783 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5784 (this, ret, first, last, base, state, pval))
5786 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5787 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5788 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5791 char tmp
[25], *beg
, *end
;
5794 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5796 b
= num_get_wchar__Getifld(this, tmp
,
5797 &first
, &last
, base
->fmtfl
, base
->loc
);
5798 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5799 v
= _Stoulx(beg
, &end
, b
, &err
);
5801 if(v
!= (ULONG
)((unsigned short)v
))
5802 *state
|= IOSTATE_failbit
;
5803 else if(end
!=beg
&& !err
)
5804 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5806 *state
|= IOSTATE_failbit
;
5809 *state
|= IOSTATE_eofbit
;
5815 /* ?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 */
5816 /* ?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 */
5817 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
5818 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5819 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5821 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
5825 /* ?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 */
5826 /* ?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 */
5827 /* ?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@ */
5828 /* ?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 */
5829 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
5830 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5831 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5833 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5834 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5837 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
5838 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5839 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5840 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
5842 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5844 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5845 basic_string_wchar false_bstr
, true_bstr
;
5846 const wchar_t *pfalse
, *ptrue
;
5848 numpunct_wchar_falsename(numpunct
, &false_bstr
);
5849 numpunct_wchar_truename(numpunct
, &true_bstr
);
5850 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
5851 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
5853 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;) {
5854 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5856 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5859 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5861 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5870 istreambuf_iterator_wchar_inc(&first
);
5872 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5881 *state
|= IOSTATE_failbit
;
5883 MSVCP_basic_string_wchar_dtor(&false_bstr
);
5884 MSVCP_basic_string_wchar_dtor(&true_bstr
);
5888 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5889 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5891 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5894 *state
|= IOSTATE_failbit
;
5898 *state
|= IOSTATE_eofbit
;
5899 memcpy(ret
, &first
, sizeof(first
));
5903 /* ?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 */
5904 /* ?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 */
5905 #if _MSVCP_VER <= 100
5906 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5907 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5908 (this, ret, first, last, base, state, pval))
5910 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_wchar*, \
5911 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5912 (this, ret, first, last, base, state, pval))
5914 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
5915 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5916 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5918 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5919 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5922 /* ?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 */
5923 /* ?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 */
5924 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
5925 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5926 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5928 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5929 state
, pval
, numpunct_short_use_facet(base
->loc
));
5932 /* ?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 */
5933 /* ?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 */
5934 /* ?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 */
5935 /* ?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 */
5936 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
5937 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5938 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5940 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5941 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
5944 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
5945 locale_id num_get_char_id
= {0};
5947 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
5948 extern const vtable_ptr MSVCP_num_get_char_vtable
;
5950 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
5951 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
5952 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
5953 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
5955 TRACE("(%p %p)\n", this, locinfo
);
5956 _Locinfo__Getcvt(locinfo
, &this->cvt
);
5959 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
5960 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
5961 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
5962 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
5963 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
5965 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
5967 locale_facet_ctor_refs(&this->facet
, refs
);
5968 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
5970 num_get_char__Init(this, locinfo
);
5974 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
5975 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
5976 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
5977 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
5981 TRACE("(%p %lu)\n", this, refs
);
5983 _Locinfo_ctor(&locinfo
);
5984 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
5985 _Locinfo_dtor(&locinfo
);
5989 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
5990 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
5991 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
5992 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
5994 return num_get_char_ctor_refs(this, 0);
5997 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
5998 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
5999 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
6000 void __thiscall
num_get_char_dtor(num_get
*this)
6002 TRACE("(%p)\n", this);
6003 locale_facet_dtor(&this->facet
);
6006 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
6007 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
6009 TRACE("(%p %x)\n", this, flags
);
6011 /* we have an array, with the number of elements stored before the first object */
6012 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6014 for(i
=*ptr
-1; i
>=0; i
--)
6015 num_get_char_dtor(this+i
);
6016 MSVCRT_operator_delete(ptr
);
6018 num_get_char_dtor(this);
6020 MSVCRT_operator_delete(this);
6026 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6027 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6028 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6030 TRACE("(%p %p)\n", facet
, loc
);
6032 if(facet
&& !*facet
) {
6035 *facet
= MSVCRT_operator_new(sizeof(num_get
));
6037 ERR("Out of memory\n");
6038 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6042 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6043 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
6044 _Locinfo_dtor(&locinfo
);
6050 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6051 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6052 MSVCP_size_t __cdecl
num_get_char__Getcat_old(const locale_facet
**facet
)
6054 return num_get_char__Getcat(facet
, locale_classic());
6057 num_get
* num_get_char_use_facet(const locale
*loc
)
6059 static num_get
*obj
= NULL
;
6062 const locale_facet
*fac
;
6064 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6065 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
6067 _Lockit_dtor(&lock
);
6068 return (num_get
*)fac
;
6072 _Lockit_dtor(&lock
);
6076 num_get_char__Getcat(&fac
, loc
);
6077 obj
= (num_get
*)fac
;
6078 call_locale_facet__Incref(&obj
->facet
);
6079 locale_facet_register(&obj
->facet
);
6080 _Lockit_dtor(&lock
);
6085 /* ?_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 */
6086 /* ?_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 */
6087 /* Copies number to dest buffer, validates grouping and skips separators.
6088 * Updates first so it points past the number, all digits are skipped.
6089 * Returns how exponent needs to changed.
6090 * Size of dest buffer is not specified, assuming it's not smaller than 32:
6091 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
6093 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6094 istreambuf_iterator_char
*last
, const locale
*loc
)
6096 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6097 basic_string_char grouping_bstr
;
6098 basic_string_char groups_found
;
6099 int groups_no
= 0, cur_group
= 0, exp
= 0;
6100 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
;
6101 const char *grouping
, *groups
;
6102 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
6104 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
6106 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6107 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6108 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6111 MSVCP_basic_string_char_ctor(&groups_found
);
6113 istreambuf_iterator_char_val(first
);
6115 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6116 *dest
++ = first
->val
;
6117 istreambuf_iterator_char_inc(first
);
6120 /* read possibly grouped numbers before decimal */
6121 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6122 if(first
->val
<'0' || first
->val
>'9') {
6123 if(sep
&& first
->val
==sep
) {
6124 if(!groups_no
) break; /* empty group - stop parsing */
6125 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6132 got_digit
= TRUE
; /* found a digit, zero or non-zero */
6133 /* write digit to dest if not a leading zero (to not waste dest buffer) */
6134 if(!got_nonzero
&& first
->val
== '0')
6141 *dest
++ = first
->val
;
6143 exp
++; /* too many digits, just multiply by 10 */
6144 if(sep
&& groups_no
<CHAR_MAX
)
6149 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
6150 if(got_digit
&& !got_nonzero
)
6153 /* get decimal, if any */
6154 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
6156 *dest
++ = *localeconv()->decimal_point
;
6157 istreambuf_iterator_char_inc(first
);
6160 /* read non-grouped after decimal */
6161 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6162 if(first
->val
<'0' || first
->val
>'9')
6164 else if(dest
<num_end
) {
6166 *dest
++ = first
->val
;
6170 /* read exponent, if any */
6171 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
6172 *dest
++ = first
->val
;
6173 istreambuf_iterator_char_inc(first
);
6175 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6176 *dest
++ = first
->val
;
6177 istreambuf_iterator_char_inc(first
);
6180 got_digit
= got_nonzero
= FALSE
;
6182 /* skip any leading zeroes */
6183 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
6186 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
6187 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
6190 *dest
++ = first
->val
;
6193 /* if just found zeroes for exponent, use that */
6194 if(got_digit
&& !got_nonzero
)
6202 if(sep
&& groups_no
)
6203 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6205 if(!cur_group
) /* no groups, skip loop */
6207 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
6208 error
= TRUE
; /* trailing empty */
6210 for(; cur_group
>=0 && !error
; cur_group
--) {
6211 if(*grouping
== CHAR_MAX
) {
6215 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6216 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6219 }else if(grouping
[1]) {
6223 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6225 MSVCP_basic_string_char_dtor(&groups_found
);
6235 /* ?_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 */
6236 /* ?_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 */
6237 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6238 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
6240 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
6244 /* ?_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 */
6245 /* ?_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 */
6246 /* Copies number to dest buffer, validates grouping and skips separators.
6247 * Updates first so it points past the number, all digits are skipped.
6248 * Returns number base (8, 10 or 16).
6249 * Size of dest buffer is not specified, assuming it's not smaller than 25:
6250 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
6252 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6253 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
6255 static const char digits
[] = "0123456789abcdefABCDEF";
6257 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6258 basic_string_char grouping_bstr
;
6259 basic_string_char groups_found
;
6260 int basefield
, base
, groups_no
= 0, cur_group
= 0;
6261 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
;
6262 const char *grouping
, *groups
;
6263 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
6265 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
6267 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6268 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6269 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6271 basefield
= fmtflags
& FMTFLAG_basefield
;
6272 if(basefield
== FMTFLAG_oct
)
6274 else if(basefield
== FMTFLAG_hex
)
6275 base
= 22; /* equal to the size of digits buffer */
6281 istreambuf_iterator_char_val(first
);
6282 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6283 *dest
++ = first
->val
;
6284 istreambuf_iterator_char_inc(first
);
6287 if(first
->strbuf
&& first
->val
=='0') {
6289 istreambuf_iterator_char_inc(first
);
6290 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
6291 if(!base
|| base
== 22) {
6293 istreambuf_iterator_char_inc(first
);
6303 if (!base
) base
= 10;
6308 MSVCP_basic_string_char_ctor(&groups_found
);
6309 if(found_zero
) ++groups_no
;
6312 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6313 if(!memchr(digits
, first
->val
, base
)) {
6314 if(sep
&& first
->val
==sep
) {
6315 if(!groups_no
) break; /* empty group - stop parsing */
6316 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6324 if(dest_empty
&& first
->val
== '0')
6331 /* skip digits that can't be copied to dest buffer, other
6332 * functions are responsible for detecting overflows */
6334 *dest
++ = first
->val
;
6335 if(sep
&& groups_no
<CHAR_MAX
)
6340 if(sep
&& groups_no
)
6341 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6343 if(!cur_group
) { /* no groups, skip loop */
6345 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
6346 error
= TRUE
; /* trailing empty */
6350 for(; cur_group
>=0 && !error
; cur_group
--) {
6351 if(*grouping
== CHAR_MAX
) {
6355 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6356 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6359 }else if(grouping
[1]) {
6364 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6366 MSVCP_basic_string_char_dtor(&groups_found
);
6373 }else if(dest_empty
)
6377 return (base
==22 ? 16 : base
);
6380 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
6381 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
6382 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
6383 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
6385 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
6389 /* ?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 */
6390 /* ?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 */
6391 #if _MSVCP_VER <= 100
6392 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
6393 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6394 (this, ret, first, last, base, state, pval))
6396 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6397 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6398 (this, ret, first, last, base, state, pval))
6400 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
6401 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6402 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6408 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6410 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6411 &first
, &last
, FMTFLAG_hex
, base
->loc
), &err
);
6412 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
6413 *state
|= IOSTATE_failbit
;
6414 else if(end
!=tmp
&& !err
)
6415 *pval
= (void*)((INT_PTR
)v
);
6417 *state
|= IOSTATE_failbit
;
6420 *state
|= IOSTATE_eofbit
;
6426 /* ?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 */
6427 /* ?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 */
6428 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
6429 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6430 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6432 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6433 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
6436 /* ?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 */
6437 /* ?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 */
6438 /* ?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 */
6439 /* ?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 */
6440 #if _MSVCP_VER <= 100
6441 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
6442 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6443 (this, ret, first, last, base, state, pval))
6444 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6445 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6446 (this, ret, first, last, base, state, pval))
6448 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6449 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6450 (this, ret, first, last, base, state, pval))
6451 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6452 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6453 (this, ret, first, last, base, state, pval))
6455 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
6456 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6457 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6463 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6465 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
6466 if(end
!=tmp
&& !err
)
6469 *state
|= IOSTATE_failbit
;
6472 *state
|= IOSTATE_eofbit
;
6478 /* ?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 */
6479 /* ?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 */
6480 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
6481 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
6482 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6484 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6485 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
6488 /* ?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 */
6489 /* ?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 */
6490 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
6491 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6492 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6494 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6495 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
6498 /* ?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 */
6499 /* ?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 */
6500 #if _MSVCP_VER <= 100
6501 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6502 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6503 (this, ret, first, last, base, state, pval))
6505 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6506 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6507 (this, ret, first, last, base, state, pval))
6509 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
6510 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6511 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6517 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6519 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
6520 if(end
!=tmp
&& !err
)
6523 *state
|= IOSTATE_failbit
;
6526 *state
|= IOSTATE_eofbit
;
6532 /* ?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 */
6533 /* ?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 */
6534 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
6535 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6536 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6538 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6539 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
6542 /* ?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 */
6543 /* ?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 */
6544 #if _MSVCP_VER <= 100
6545 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6546 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6547 (this, ret, first, last, base, state, pval))
6549 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6550 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6551 (this, ret, first, last, base, state, pval))
6553 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
6554 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6555 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6561 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6563 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6564 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6565 if(end
!=tmp
&& !err
)
6568 *state
|= IOSTATE_failbit
;
6571 *state
|= IOSTATE_eofbit
;
6577 /* ?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 */
6578 /* ?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 */
6579 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
6580 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6581 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6583 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6584 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
6587 /* ?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 */
6588 /* ?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 */
6589 #if _MSVCP_VER <= 100
6590 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6591 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6592 (this, ret, first, last, base, state, pval))
6594 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6595 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6596 (this, ret, first, last, base, state, pval))
6598 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
6599 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6600 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6606 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6608 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6609 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6610 if(end
!=tmp
&& !err
)
6613 *state
|= IOSTATE_failbit
;
6616 *state
|= IOSTATE_eofbit
;
6622 /* ?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 */
6623 /* ?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 */
6624 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6625 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6626 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6628 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6629 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
6632 /* ?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 */
6633 /* ?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 */
6634 #if _MSVCP_VER <= 100
6635 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6636 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6637 (this, ret, first, last, base, state, pval))
6639 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6640 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6641 (this, ret, first, last, base, state, pval))
6643 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6644 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6645 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6651 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6653 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6654 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6655 if(end
!=tmp
&& !err
)
6658 *state
|= IOSTATE_failbit
;
6661 *state
|= IOSTATE_eofbit
;
6667 /* ?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 */
6668 /* ?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 */
6669 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6670 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6671 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6673 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6674 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6677 /* ?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 */
6678 /* ?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 */
6679 #if _MSVCP_VER <= 100
6680 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6681 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6682 (this, ret, first, last, base, state, pval))
6684 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6685 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6686 (this, ret, first, last, base, state, pval))
6688 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6689 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6690 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6696 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6698 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6699 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6700 if(end
!=tmp
&& !err
)
6703 *state
|= IOSTATE_failbit
;
6706 *state
|= IOSTATE_eofbit
;
6712 /* ?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 */
6713 /* ?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 */
6714 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6715 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6716 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6718 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6719 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6722 /* ?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 */
6723 /* ?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 */
6724 #if _MSVCP_VER <= 100
6725 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6726 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6727 (this, ret, first, last, base, state, pval))
6729 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6730 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6731 (this, ret, first, last, base, state, pval))
6733 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
6734 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6735 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6737 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6738 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6741 /* ?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 */
6742 /* ?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 */
6743 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
6744 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6745 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6747 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6748 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6751 /* ?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 */
6752 /* ?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 */
6753 #if _MSVCP_VER <= 100
6754 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6755 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6756 (this, ret, first, last, base, state, pval))
6758 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_char*, \
6759 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6760 (this, ret, first, last, base, state, pval))
6762 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
6763 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6764 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6767 char tmp
[25], *beg
, *end
;
6770 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6772 b
= num_get_char__Getifld(this, tmp
,
6773 &first
, &last
, base
->fmtfl
, base
->loc
);
6774 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6775 v
= _Stoulx(beg
, &end
, b
, &err
);
6777 if(v
!= (ULONG
)((unsigned short)v
))
6778 *state
|= IOSTATE_failbit
;
6779 else if(end
!=beg
&& !err
)
6780 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6782 *state
|= IOSTATE_failbit
;
6785 *state
|= IOSTATE_eofbit
;
6791 /* ?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 */
6792 /* ?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 */
6793 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
6794 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6795 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6797 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6798 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6801 /* ?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 */
6802 /* ?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 */
6803 #if _MSVCP_VER <= 100
6804 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6805 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6806 (this, ret, first, last, base, state, pval))
6808 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_char*, \
6809 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6810 (this, ret, first, last, base, state, pval))
6812 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
6813 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6814 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6816 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6818 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6819 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6820 basic_string_char false_bstr
, true_bstr
;
6821 const char *pfalse
, *ptrue
;
6823 numpunct_char_falsename(numpunct
, &false_bstr
);
6824 numpunct_char_truename(numpunct
, &true_bstr
);
6825 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
6826 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
6828 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;) {
6829 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6831 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6834 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6836 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6845 istreambuf_iterator_char_inc(&first
);
6847 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6856 *state
|= IOSTATE_failbit
;
6858 MSVCP_basic_string_char_dtor(&false_bstr
);
6859 MSVCP_basic_string_char_dtor(&true_bstr
);
6863 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6864 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6866 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6869 *state
|= IOSTATE_failbit
;
6873 *state
|= IOSTATE_eofbit
;
6874 memcpy(ret
, &first
, sizeof(first
));
6878 /* ?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 */
6879 /* ?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 */
6880 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
6881 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6882 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6884 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6885 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6888 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6889 locale_id num_put_char_id
= {0};
6891 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6892 extern const vtable_ptr MSVCP_num_put_char_vtable
;
6894 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6895 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6896 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
6897 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
6899 TRACE("(%p %p)\n", this, locinfo
);
6900 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6903 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6904 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6905 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
6906 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6908 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6910 locale_facet_ctor_refs(&this->facet
, refs
);
6911 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
6913 num_put_char__Init(this, locinfo
);
6917 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6918 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6919 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
6920 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6924 TRACE("(%p %lu)\n", this, refs
);
6926 _Locinfo_ctor(&locinfo
);
6927 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
6928 _Locinfo_dtor(&locinfo
);
6932 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6933 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6934 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
6935 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
6937 return num_put_char_ctor_refs(this, 0);
6940 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6941 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6942 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
6943 void __thiscall
num_put_char_dtor(num_put
*this)
6945 TRACE("(%p)\n", this);
6946 locale_facet_dtor(&this->facet
);
6949 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
6950 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
6952 TRACE("(%p %x)\n", this, flags
);
6954 /* we have an array, with the number of elements stored before the first object */
6955 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6957 for(i
=*ptr
-1; i
>=0; i
--)
6958 num_put_char_dtor(this+i
);
6959 MSVCRT_operator_delete(ptr
);
6961 num_put_char_dtor(this);
6963 MSVCRT_operator_delete(this);
6969 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6970 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6971 MSVCP_size_t __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6973 TRACE("(%p %p)\n", facet
, loc
);
6975 if(facet
&& !*facet
) {
6978 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6980 ERR("Out of memory\n");
6981 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6985 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6986 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6987 _Locinfo_dtor(&locinfo
);
6993 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6994 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6995 MSVCP_size_t __cdecl
num_put_char__Getcat_old(const locale_facet
**facet
)
6997 return num_put_char__Getcat(facet
, locale_classic());
7000 num_put
* num_put_char_use_facet(const locale
*loc
)
7002 static num_put
*obj
= NULL
;
7005 const locale_facet
*fac
;
7007 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7008 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
7010 _Lockit_dtor(&lock
);
7011 return (num_put
*)fac
;
7015 _Lockit_dtor(&lock
);
7019 num_put_char__Getcat(&fac
, loc
);
7020 obj
= (num_put
*)fac
;
7021 call_locale_facet__Incref(&obj
->facet
);
7022 locale_facet_register(&obj
->facet
);
7023 _Lockit_dtor(&lock
);
7028 /* ?_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 */
7029 /* ?_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 */
7030 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
7031 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7033 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7035 for(; count
>0; count
--)
7036 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7042 /* ?_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 */
7043 /* ?_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 */
7044 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
7045 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7047 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7049 for(; count
>0; count
--)
7050 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7056 /* ?_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 */
7057 /* ?_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 */
7058 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
7059 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
7061 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7065 /* ?_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 */
7066 /* ?_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 */
7067 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
7068 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
7070 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7072 for(; count
>0; count
--)
7073 ostreambuf_iterator_char_put(&dest
, c
);
7079 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
7080 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7081 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7083 int type
= fmtfl
& FMTFLAG_floatfield
;
7086 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7089 if(fmtfl
& FMTFLAG_showpos
)
7091 if(fmtfl
& FMTFLAG_showpoint
)
7098 if(type
== FMTFLAG_fixed
)
7100 else if(type
== FMTFLAG_scientific
)
7101 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7102 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7103 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7105 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7111 /* ?_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 */
7112 /* ?_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 */
7113 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7114 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
7115 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7117 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7118 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7122 /* TODO: This function should be removed when num_put_char__Fput is implemented */
7123 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7124 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7126 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
7127 basic_string_char grouping_bstr
;
7128 const char *grouping
;
7129 char *p
, sep
= *localeconv()->decimal_point
;
7130 int cur_group
= 0, group_size
= 0;
7131 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7134 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7136 /* Change decimal point */
7137 for(p
=buf
; p
<buf
+count
; p
++) {
7139 *p
= numpunct_char_decimal_point(numpunct
);
7145 /* Add separators to number */
7146 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7147 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7148 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
7150 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7152 if(group_size
== grouping
[cur_group
]) {
7154 if(grouping
[cur_group
+1])
7157 memmove(p
+1, p
, buf
+count
-p
);
7162 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7164 /* Display number with padding */
7165 if(count
>= base
->wide
)
7168 pad
= base
->wide
-count
;
7171 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7172 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7175 if(adjustfield
!= FMTFLAG_left
) {
7176 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7179 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7180 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7183 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
7184 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7185 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7187 int base
= fmtfl
& FMTFLAG_basefield
;
7190 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7193 if(fmtfl
& FMTFLAG_showpos
)
7195 if(fmtfl
& FMTFLAG_showbase
)
7202 if(base
== FMTFLAG_oct
)
7204 else if(base
== FMTFLAG_hex
)
7205 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7213 /* ?_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 */
7214 /* ?_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 */
7215 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7216 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7218 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
7219 basic_string_char grouping_bstr
;
7220 const char *grouping
;
7222 int cur_group
= 0, group_size
= 0;
7223 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7226 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7228 /* Add separators to number */
7229 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7230 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7231 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
7233 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7235 if(group_size
== grouping
[cur_group
]) {
7237 if(grouping
[cur_group
+1])
7240 memmove(p
+1, p
, buf
+count
-p
);
7245 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7247 /* Display number with padding */
7248 if(count
>= base
->wide
)
7251 pad
= base
->wide
-count
;
7254 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7255 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7257 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7258 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
7261 if(adjustfield
!= FMTFLAG_left
) {
7262 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7265 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7266 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7269 /* ?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 */
7270 /* ?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 */
7271 #if _MSVCP_VER <= 100
7272 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7273 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7274 (this, ret, dest, base, fill, v))
7276 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_char*, \
7277 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7278 (this, ret, dest, base, fill, v))
7280 #if _MSVCP_VER != 80
7281 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
7283 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 32)
7285 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7286 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7288 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7289 char fmt
[7]; /* strlen("%+#lld")+1 */
7291 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7293 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7294 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7297 /* ?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 */
7298 /* ?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 */
7299 #if _MSVCP_VER != 80
7300 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
7302 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 32)
7304 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7305 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7307 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7308 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
7311 /* ?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 */
7312 /* ?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 */
7313 #if _MSVCP_VER <= 100
7314 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7315 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7316 (this, ret, dest, base, fill, v))
7318 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7319 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7320 (this, ret, dest, base, fill, v))
7322 #if _MSVCP_VER != 80
7323 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
7325 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 32)
7327 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7328 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7330 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7331 char fmt
[7]; /* strlen("%+#lld")+1 */
7333 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7335 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7336 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7339 /* ?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 */
7340 /* ?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 */
7341 #if _MSVCP_VER != 80
7342 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
7344 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 32)
7346 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7347 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7349 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7350 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7353 static inline unsigned get_precision(const ios_base
*base
)
7355 streamsize ret
= base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
7361 /* ?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 */
7362 /* ?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 */
7363 /* ?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 */
7364 /* ?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 */
7365 #if _MSVCP_VER <= 100
7366 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7367 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7368 (this, ret, dest, base, fill, v))
7369 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
7370 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7371 (this, ret, dest, base, fill, v))
7373 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7374 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7375 (this, ret, dest, base, fill, v))
7376 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7377 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7378 (this, ret, dest, base, fill, v))
7380 #if _MSVCP_VER != 80
7381 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
7383 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 36)
7385 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7386 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7389 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7393 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7395 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7396 prec
= get_precision(base
);
7397 size
= _scprintf(fmt
, prec
, v
);
7399 /* TODO: don't use dynamic allocation */
7400 tmp
= MSVCRT_operator_new(size
*2);
7402 ERR("Out of memory\n");
7403 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7405 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
7406 MSVCRT_operator_delete(tmp
);
7410 /* ?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 */
7411 /* ?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 */
7412 #if _MSVCP_VER != 80
7413 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
7415 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 36)
7417 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7418 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7420 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7421 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
7424 /* ?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 */
7425 /* ?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 */
7426 #if _MSVCP_VER != 80
7427 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
7429 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 36)
7431 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
7432 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7434 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7435 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7438 /* ?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 */
7439 /* ?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 */
7440 #if _MSVCP_VER <= 100
7441 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
7442 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7443 (this, ret, dest, base, fill, v))
7445 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7446 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7447 (this, ret, dest, base, fill, v))
7449 #if _MSVCP_VER != 80
7450 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
7452 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 32)
7454 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7455 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7457 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7459 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7461 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7464 /* ?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 */
7465 /* ?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 */
7466 #if _MSVCP_VER != 80
7467 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
7469 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 32)
7471 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7472 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7474 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7475 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7478 /* ?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 */
7479 /* ?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 */
7480 #if _MSVCP_VER <= 100
7481 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7482 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7483 (this, ret, dest, base, fill, v))
7485 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7486 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7487 (this, ret, dest, base, fill, v))
7489 #if _MSVCP_VER != 80
7490 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
7492 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 36)
7494 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7495 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7497 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7498 char fmt
[7]; /* strlen("%+#lld")+1 */
7500 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7502 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7503 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7506 /* ?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 */
7507 /* ?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 */
7508 #if _MSVCP_VER != 80
7509 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
7511 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 36)
7513 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7514 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7516 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7517 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7520 /* ?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 */
7521 /* ?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 */
7522 #if _MSVCP_VER <= 100
7523 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7524 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7525 (this, ret, dest, base, fill, v))
7527 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7528 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7529 (this, ret, dest, base, fill, v))
7531 #if _MSVCP_VER != 80
7532 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
7534 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 36)
7536 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7537 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7539 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7540 char fmt
[7]; /* strlen("%+#lld")+1 */
7542 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7544 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7545 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7548 /* ?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 */
7549 /* ?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 */
7550 #if _MSVCP_VER != 80
7551 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
7553 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 36)
7555 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7556 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7558 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7559 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7562 /* ?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 */
7563 /* ?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 */
7564 #if _MSVCP_VER <= 100
7565 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7566 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7567 (this, ret, dest, base, fill, v))
7569 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_char*, \
7570 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7571 (this, ret, dest, base, fill, v))
7573 #if _MSVCP_VER != 80
7574 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
7576 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 32)
7578 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7579 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7581 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7583 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7584 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
7585 basic_string_char str
;
7586 MSVCP_size_t pad
, len
;
7589 numpunct_char_truename(numpunct
, &str
);
7591 numpunct_char_falsename(numpunct
, &str
);
7593 len
= MSVCP_basic_string_char_length(&str
);
7594 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7597 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7598 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
7601 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
7602 MSVCP_basic_string_char_dtor(&str
);
7603 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7606 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
7609 /* ?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 */
7610 /* ?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 */
7611 #if _MSVCP_VER != 80
7612 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
7614 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 32)
7616 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7617 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7619 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7620 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7623 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
7624 locale_id num_put_wchar_id
= {0};
7625 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
7626 locale_id num_put_short_id
= {0};
7628 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
7629 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
7630 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
7631 extern const vtable_ptr MSVCP_num_put_short_vtable
;
7633 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7634 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7635 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
7636 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
7638 TRACE("(%p %p)\n", this, locinfo
);
7639 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7642 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7643 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7644 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
7645 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7647 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7649 locale_facet_ctor_refs(&this->facet
, refs
);
7650 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
7652 num_put_wchar__Init(this, locinfo
);
7656 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7657 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7658 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
7659 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7661 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
7662 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7666 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
7667 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
7668 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
7669 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7673 TRACE("(%p %lu)\n", this, refs
);
7675 _Locinfo_ctor(&locinfo
);
7676 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
7677 _Locinfo_dtor(&locinfo
);
7681 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
7682 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
7683 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
7684 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7686 num_put_wchar_ctor_refs(this, refs
);
7687 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7691 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
7692 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
7693 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
7694 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
7696 return num_put_wchar_ctor_refs(this, 0);
7699 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
7700 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
7701 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
7702 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
7704 return num_put_short_ctor_refs(this, 0);
7707 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
7708 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
7709 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
7710 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
7711 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
7712 void __thiscall
num_put_wchar_dtor(num_put
*this)
7714 TRACE("(%p)\n", this);
7715 locale_facet_dtor(&this->facet
);
7718 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
7719 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
7721 TRACE("(%p %x)\n", this, flags
);
7723 /* we have an array, with the number of elements stored before the first object */
7724 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7726 for(i
=*ptr
-1; i
>=0; i
--)
7727 num_put_wchar_dtor(this+i
);
7728 MSVCRT_operator_delete(ptr
);
7730 num_put_wchar_dtor(this);
7732 MSVCRT_operator_delete(this);
7738 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7739 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7740 MSVCP_size_t __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
7742 TRACE("(%p %p)\n", facet
, loc
);
7744 if(facet
&& !*facet
) {
7747 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7749 ERR("Out of memory\n");
7750 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7754 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7755 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7756 _Locinfo_dtor(&locinfo
);
7762 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7763 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7764 MSVCP_size_t __cdecl
num_put_wchar__Getcat_old(const locale_facet
**facet
)
7766 return num_put_wchar__Getcat(facet
, locale_classic());
7769 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7770 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7771 MSVCP_size_t __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
7773 TRACE("(%p %p)\n", facet
, loc
);
7775 if(facet
&& !*facet
) {
7778 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7780 ERR("Out of memory\n");
7781 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7785 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7786 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7787 _Locinfo_dtor(&locinfo
);
7793 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7794 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7795 MSVCP_size_t __cdecl
num_put_short__Getcat_old(const locale_facet
**facet
)
7797 return num_put_short__Getcat(facet
, locale_classic());
7800 num_put
* num_put_wchar_use_facet(const locale
*loc
)
7802 static num_put
*obj
= NULL
;
7805 const locale_facet
*fac
;
7807 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7808 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
7810 _Lockit_dtor(&lock
);
7811 return (num_put
*)fac
;
7815 _Lockit_dtor(&lock
);
7819 num_put_wchar__Getcat(&fac
, loc
);
7820 obj
= (num_put
*)fac
;
7821 call_locale_facet__Incref(&obj
->facet
);
7822 locale_facet_register(&obj
->facet
);
7823 _Lockit_dtor(&lock
);
7828 num_put
* num_put_short_use_facet(const locale
*loc
)
7830 static num_put
*obj
= NULL
;
7833 const locale_facet
*fac
;
7835 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7836 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
7838 _Lockit_dtor(&lock
);
7839 return (num_put
*)fac
;
7843 _Lockit_dtor(&lock
);
7847 num_put_short__Getcat(&fac
, loc
);
7848 obj
= (num_put
*)fac
;
7849 call_locale_facet__Incref(&obj
->facet
);
7850 locale_facet_register(&obj
->facet
);
7851 _Lockit_dtor(&lock
);
7856 /* ?_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 */
7857 /* ?_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 */
7858 /* ?_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 */
7859 /* ?_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 */
7860 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7861 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
7863 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
7865 for(; count
>0; count
--)
7866 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
7872 /* ?_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 */
7873 /* ?_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 */
7874 /* ?_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 */
7875 /* ?_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 */
7876 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7877 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
7882 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
7884 for(; count
>0; count
--) {
7885 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
7886 ostreambuf_iterator_wchar_put(&dest
, ch
);
7893 /* ?_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 */
7894 /* ?_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 */
7895 /* ?_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 */
7896 /* ?_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 */
7897 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7898 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
7900 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7904 /* ?_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 */
7905 /* ?_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 */
7906 /* ?_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 */
7907 /* ?_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 */
7908 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7909 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
7911 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7913 for(; count
>0; count
--)
7914 ostreambuf_iterator_wchar_put(&dest
, c
);
7920 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
7921 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7922 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
7923 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7924 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7926 int type
= fmtfl
& FMTFLAG_floatfield
;
7929 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7932 if(fmtfl
& FMTFLAG_showpos
)
7934 if(fmtfl
& FMTFLAG_showbase
)
7941 if(type
== FMTFLAG_fixed
)
7943 else if(type
== FMTFLAG_scientific
)
7944 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7945 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7946 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7948 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7954 /* ?_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 */
7955 /* ?_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 */
7956 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7957 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
7958 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7960 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7961 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7965 /* ?_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 */
7966 /* ?_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 */
7967 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7968 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
7969 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7971 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7972 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7976 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
7977 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7978 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
7979 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
7981 basic_string_char grouping_bstr
;
7982 const char *grouping
;
7983 char *p
, dec_point
= *localeconv()->decimal_point
;
7985 int cur_group
= 0, group_size
= 0;
7986 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7987 MSVCP_size_t i
, pad
;
7989 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7991 for(p
=buf
; p
<buf
+count
; p
++) {
7997 /* Add separators to number */
7998 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
7999 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8000 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8002 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8004 if(group_size
== grouping
[cur_group
]) {
8006 if(grouping
[cur_group
+1])
8009 memmove(p
+1, p
, buf
+count
-p
);
8010 *p
= '\0'; /* mark thousands separator positions */
8014 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8016 /* Display number with padding */
8017 if(count
>= base
->wide
)
8020 pad
= base
->wide
-count
;
8023 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8024 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8027 if(adjustfield
!= FMTFLAG_left
) {
8028 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8032 for(i
=0; i
<count
; i
++) {
8033 if(buf
[i
] == dec_point
)
8034 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
8036 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8038 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8041 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8044 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
8045 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8046 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
8047 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8048 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
8050 int base
= fmtfl
& FMTFLAG_basefield
;
8053 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
8056 if(fmtfl
& FMTFLAG_showpos
)
8058 if(fmtfl
& FMTFLAG_showbase
)
8065 if(base
== FMTFLAG_oct
)
8067 else if(base
== FMTFLAG_hex
)
8068 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
8076 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8077 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8078 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8080 basic_string_char grouping_bstr
;
8081 const char *grouping
;
8084 int cur_group
= 0, group_size
= 0;
8085 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8086 MSVCP_size_t i
, pad
;
8088 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8090 /* Add separators to number */
8091 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8092 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8093 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8095 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8097 if(group_size
== grouping
[cur_group
]) {
8099 if(grouping
[cur_group
+1])
8102 memmove(p
+1, p
, buf
+count
-p
);
8103 *p
= '\0'; /* mark thousands separator positions */
8107 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8109 /* Display number with padding */
8110 if(count
>= base
->wide
)
8113 pad
= base
->wide
-count
;
8116 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8117 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8119 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
8120 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
8123 if(adjustfield
!= FMTFLAG_left
) {
8124 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8128 for(i
=0; i
<count
; i
++) {
8130 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8132 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8135 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8138 /* ?_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 */
8139 /* ?_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 */
8140 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8141 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8143 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(base
->loc
));
8146 /* ?_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 */
8147 /* ?_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 */
8148 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8149 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8151 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(base
->loc
));
8154 /* ?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 */
8155 /* ?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 */
8156 #if _MSVCP_VER <= 100
8157 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8158 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8159 (this, ret, dest, base, fill, v))
8161 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_wchar*, \
8162 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8163 (this, ret, dest, base, fill, v))
8165 #if _MSVCP_VER != 80
8166 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
8168 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 32)
8170 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8171 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8173 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8174 char fmt
[7]; /* strlen("%+#lld")+1 */
8176 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8178 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8179 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8182 /* ?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 */
8183 /* ?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 */
8184 #if _MSVCP_VER != 80
8185 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
8187 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 32)
8189 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8190 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8192 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8193 char fmt
[7]; /* strlen("%+#lld")+1 */
8195 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8197 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8198 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8201 /* ?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 */
8202 /* ?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 */
8203 /* ?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 */
8204 /* ?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 */
8205 #if _MSVCP_VER != 80
8206 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
8208 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 32)
8210 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8211 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8213 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8214 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
8217 /* ?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 */
8218 /* ?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 */
8219 #if _MSVCP_VER <= 100
8220 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8221 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8222 (this, ret, dest, base, fill, v))
8224 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8225 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8226 (this, ret, dest, base, fill, v))
8228 #if _MSVCP_VER != 80
8229 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
8231 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 32)
8233 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8234 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8236 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8237 char fmt
[7]; /* strlen("%+#lld")+1 */
8239 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8241 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8242 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8245 /* ?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 */
8246 /* ?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 */
8247 #if _MSVCP_VER != 80
8248 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
8250 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 32)
8252 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8253 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG 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_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8261 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8264 /* ?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 */
8265 /* ?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 */
8266 /* ?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 */
8267 /* ?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 */
8268 #if _MSVCP_VER != 80
8269 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
8271 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 32)
8273 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8274 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8276 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8277 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
8280 /* ?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 */
8281 /* ?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 */
8282 /* ?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 */
8283 /* ?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 */
8284 #if _MSVCP_VER <= 100
8285 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8286 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8287 (this, ret, dest, base, fill, v))
8288 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
8289 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8290 (this, ret, dest, base, fill, v))
8292 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8293 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8294 (this, ret, dest, base, fill, v))
8295 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8296 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8297 (this, ret, dest, base, fill, v))
8299 #if _MSVCP_VER != 80
8300 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
8302 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 36)
8304 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8305 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8308 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8312 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8314 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8315 prec
= get_precision(base
);
8316 size
= _scprintf(fmt
, prec
, v
);
8318 /* TODO: don't use dynamic allocation */
8319 tmp
= MSVCRT_operator_new(size
*2);
8321 ERR("Out of memory\n");
8322 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8324 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8325 numpunct_wchar_use_facet(base
->loc
));
8326 MSVCRT_operator_delete(tmp
);
8330 /* ?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 */
8331 /* ?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 */
8332 /* ?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 */
8333 /* ?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 */
8334 #if _MSVCP_VER != 80
8335 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
8337 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 36)
8339 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8340 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8343 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8347 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8349 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8350 prec
= get_precision(base
);
8351 size
= _scprintf(fmt
, prec
, v
);
8353 /* TODO: don't use dynamic allocation */
8354 tmp
= MSVCRT_operator_new(size
*2);
8356 ERR("Out of memory\n");
8357 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8359 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8360 numpunct_short_use_facet(base
->loc
));
8361 MSVCRT_operator_delete(tmp
);
8365 /* ?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 */
8366 /* ?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 */
8367 /* ?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 */
8368 /* ?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 */
8369 #if _MSVCP_VER != 80
8370 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
8372 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 36)
8374 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8375 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8377 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8378 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
8381 /* ?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 */
8382 /* ?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 */
8383 /* ?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 */
8384 /* ?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 */
8385 #if _MSVCP_VER != 80
8386 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
8388 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 36)
8390 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8391 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8393 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8394 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
8397 /* ?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 */
8398 /* ?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 */
8399 #if _MSVCP_VER <= 100
8400 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
8401 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8402 (this, ret, dest, base, fill, v))
8404 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8405 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8406 (this, ret, dest, base, fill, v))
8408 #if _MSVCP_VER != 80
8409 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
8411 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 32)
8413 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8414 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8416 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8418 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8420 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8423 /* ?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 */
8424 /* ?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 */
8425 #if _MSVCP_VER != 80
8426 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
8428 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 32)
8430 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8431 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8433 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8435 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8437 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8440 /* ?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 */
8441 /* ?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 */
8442 /* ?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 */
8443 /* ?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 */
8444 #if _MSVCP_VER != 80
8445 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
8447 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 32)
8449 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8450 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8452 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8453 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
8456 /* ?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 */
8457 /* ?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 */
8458 #if _MSVCP_VER <= 100
8459 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8460 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8461 (this, ret, dest, base, fill, v))
8463 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8464 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8465 (this, ret, dest, base, fill, v))
8467 #if _MSVCP_VER != 80
8468 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
8470 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 36)
8472 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8473 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8475 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8476 char fmt
[7]; /* strlen("%+#lld")+1 */
8478 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8480 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8481 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8484 /* ?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 */
8485 /* ?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 */
8486 #if _MSVCP_VER != 80
8487 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
8489 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 36)
8491 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8492 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8494 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8495 char fmt
[7]; /* strlen("%+#lld")+1 */
8497 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8499 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8500 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8503 /* ?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 */
8504 /* ?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 */
8505 /* ?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 */
8506 /* ?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 */
8507 #if _MSVCP_VER != 80
8508 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
8510 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 36)
8512 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8513 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8515 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8516 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
8519 /* ?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 */
8520 /* ?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 */
8521 #if _MSVCP_VER <= 100
8522 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8523 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8524 (this, ret, dest, base, fill, v))
8526 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8527 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8528 (this, ret, dest, base, fill, v))
8530 #if _MSVCP_VER != 80
8531 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
8533 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 36)
8535 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8536 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8538 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8539 char fmt
[7]; /* strlen("%+#lld")+1 */
8541 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8543 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8544 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8547 /* ?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 */
8548 /* ?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 */
8549 #if _MSVCP_VER != 80
8550 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
8552 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 36)
8554 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8555 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __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_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8563 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8566 /* ?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 */
8567 /* ?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 */
8568 /* ?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 */
8569 /* ?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 */
8570 #if _MSVCP_VER != 80
8571 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
8573 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 36)
8575 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8576 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8578 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8579 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
8582 /* ?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 */
8583 /* ?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 */
8584 #if _MSVCP_VER <= 100
8585 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8586 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8587 (this, ret, dest, base, fill, v))
8589 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_wchar*, \
8590 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8591 (this, ret, dest, base, fill, v))
8593 #if _MSVCP_VER != 80
8594 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
8596 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 32)
8598 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8599 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8601 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8603 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8604 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
8605 basic_string_wchar str
;
8606 MSVCP_size_t pad
, len
;
8609 numpunct_wchar_truename(numpunct
, &str
);
8611 numpunct_wchar_falsename(numpunct
, &str
);
8613 len
= MSVCP_basic_string_wchar_length(&str
);
8614 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8617 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8618 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8621 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8622 MSVCP_basic_string_wchar_dtor(&str
);
8623 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8626 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, 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_N@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_N@Z */
8631 #if _MSVCP_VER != 80
8632 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
8634 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 32)
8636 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8637 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8639 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8641 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8642 numpunct_wchar
*numpunct
= numpunct_short_use_facet(base
->loc
);
8643 basic_string_wchar str
;
8644 MSVCP_size_t pad
, len
;
8647 numpunct_wchar_truename(numpunct
, &str
);
8649 numpunct_wchar_falsename(numpunct
, &str
);
8651 len
= MSVCP_basic_string_wchar_length(&str
);
8652 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8655 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8656 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8659 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8660 MSVCP_basic_string_wchar_dtor(&str
);
8661 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8664 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8667 /* ?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 */
8668 /* ?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 */
8669 /* ?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 */
8670 /* ?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 */
8671 #if _MSVCP_VER != 80
8672 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
8674 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 32)
8676 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8677 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8679 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8680 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
8683 /* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
8684 locale_id time_put_char_id
= {0};
8686 /* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
8687 extern const vtable_ptr MSVCP_time_put_char_vtable
;
8689 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8690 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8691 DEFINE_THISCALL_WRAPPER(time_put_char__Init
, 8)
8692 void __thiscall
time_put_char__Init(time_put
*this, const _Locinfo
*locinfo
)
8694 TRACE("(%p %p)\n", this, locinfo
);
8695 _Locinfo__Gettnames(locinfo
, &this->time
);
8696 _Locinfo__Getcvt(locinfo
, &this->cvt
);
8699 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8700 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8701 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo
, 12)
8702 time_put
* __thiscall
time_put_char_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8704 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
8705 locale_facet_ctor_refs(&this->facet
, refs
);
8706 this->facet
.vtable
= &MSVCP_time_put_char_vtable
;
8707 time_put_char__Init(this, locinfo
);
8711 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
8712 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
8713 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs
, 8)
8714 time_put
* __thiscall
time_put_char_ctor_refs(time_put
*this, MSVCP_size_t refs
)
8718 TRACE("(%p %lu)\n", this, refs
);
8720 _Locinfo_ctor(&locinfo
);
8721 time_put_char_ctor_locinfo(this, &locinfo
, refs
);
8722 _Locinfo_dtor(&locinfo
);
8726 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
8727 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
8728 DEFINE_THISCALL_WRAPPER(time_put_char_ctor
, 4)
8729 time_put
* __thiscall
time_put_char_ctor(time_put
*this)
8731 return time_put_char_ctor_refs(this, 0);
8734 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
8735 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
8736 DEFINE_THISCALL_WRAPPER(time_put_char_dtor
, 4)
8737 void __thiscall
time_put_char_dtor(time_put
*this)
8739 TRACE("(%p)\n", this);
8740 _Timevec_dtor(&this->time
);
8743 DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor
, 8)
8744 time_put
* __thiscall
time_put_char_vector_dtor(time_put
*this, unsigned int flags
)
8746 TRACE("(%p %x)\n", this, flags
);
8748 /* we have an array, with the number of elements stored before the first object */
8749 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8751 for(i
=*ptr
-1; i
>=0; i
--)
8752 time_put_char_dtor(this+i
);
8753 MSVCRT_operator_delete(ptr
);
8755 time_put_char_dtor(this);
8757 MSVCRT_operator_delete(this);
8763 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8764 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8765 MSVCP_size_t __cdecl
time_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
8767 TRACE("(%p %p)\n", facet
, loc
);
8769 if(facet
&& !*facet
) {
8772 *facet
= MSVCRT_operator_new(sizeof(time_put
));
8774 ERR("Out of memory\n");
8775 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8779 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8780 time_put_char_ctor_locinfo((time_put
*)*facet
, &locinfo
, 0);
8781 _Locinfo_dtor(&locinfo
);
8787 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8788 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8789 MSVCP_size_t __cdecl
time_put_char__Getcat_old(const locale_facet
**facet
)
8791 return time_put_char__Getcat(facet
, locale_classic());
8794 static time_put
* time_put_char_use_facet(const locale
*loc
)
8796 static time_put
*obj
= NULL
;
8799 const locale_facet
*fac
;
8801 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8802 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_char_id
));
8804 _Lockit_dtor(&lock
);
8805 return (time_put
*)fac
;
8809 _Lockit_dtor(&lock
);
8813 time_put_char__Getcat(&fac
, loc
);
8814 obj
= (time_put
*)fac
;
8815 call_locale_facet__Incref(&obj
->facet
);
8816 locale_facet_register(&obj
->facet
);
8817 _Lockit_dtor(&lock
);
8822 /* ?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 */
8823 /* ?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 */
8824 #if _MSVCP_VER != 80
8825 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 36)
8827 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 40)
8829 #if _MSVCP_VER <= 100
8830 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
8831 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
8832 (this, ret, dest, base, fill, t, spec, mod))
8834 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
8835 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
8836 (this, ret, dest, base, fill, t, spec, mod))
8838 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
8839 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
8841 char buf
[64], fmt
[4], *p
= fmt
;
8842 MSVCP_size_t i
, len
;
8844 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
8852 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
8853 for(i
=0; i
<len
; i
++)
8854 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
8860 /* ?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 */
8861 /* ?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 */
8862 #if _MSVCP_VER != 80
8863 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 36)
8865 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 40)
8867 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
8868 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
8870 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
8871 return call_time_put_char_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
8874 /* ?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 */
8875 /* ?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 */
8876 #if _MSVCP_VER != 80
8877 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 36)
8879 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 40)
8881 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
8882 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, const char *pat
, const char *pat_end
)
8884 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_an(pat
, pat_end
-pat
));
8886 while(pat
< pat_end
) {
8888 ostreambuf_iterator_char_put(&dest
, *pat
++);
8889 }else if(++pat
== pat_end
) {
8890 ostreambuf_iterator_char_put(&dest
, '%');
8891 }else if(*pat
=='#' && pat
+1==pat_end
) {
8892 ostreambuf_iterator_char_put(&dest
, '%');
8893 ostreambuf_iterator_char_put(&dest
, *pat
++);
8904 time_put_char_put(this, &dest
, dest
, base
, fill
, t
, *pat
++, mod
);
8912 /* ?id@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
8913 locale_id time_put_wchar_id
= {0};
8914 /* ?id@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
8915 locale_id time_put_short_id
= {0};
8917 /* ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
8918 extern const vtable_ptr MSVCP_time_put_wchar_vtable
;
8919 /* ??_7?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
8920 extern const vtable_ptr MSVCP_time_put_short_vtable
;
8922 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8923 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8924 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8925 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8926 DEFINE_THISCALL_WRAPPER(time_put_wchar__Init
, 8)
8927 void __thiscall
time_put_wchar__Init(time_put
*this, const _Locinfo
*locinfo
)
8929 TRACE("(%p %p)\n", this, locinfo
);
8930 _Locinfo__Gettnames(locinfo
, &this->time
);
8931 _Locinfo__Getcvt(locinfo
, &this->cvt
);
8934 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8935 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8936 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo
, 12)
8937 time_put
* __thiscall
time_put_wchar_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8939 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
8940 locale_facet_ctor_refs(&this->facet
, refs
);
8941 this->facet
.vtable
= &MSVCP_time_put_wchar_vtable
;
8942 time_put_wchar__Init(this, locinfo
);
8946 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8947 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8948 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo
, 12)
8949 time_put
* __thiscall
time_put_short_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8951 time_put_wchar_ctor_locinfo(this, locinfo
, refs
);
8952 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
8956 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
8957 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
8958 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name
, 12)
8959 time_put
* __thiscall
time_put_wchar_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
8963 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
8965 _Locinfo_ctor_cstr(&locinfo
, name
);
8966 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
8967 _Locinfo_dtor(&locinfo
);
8971 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */
8972 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */
8973 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name
, 12)
8974 time_put
* __thiscall
time_put_short_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
8976 time_put_wchar_ctor_name(this, name
, refs
);
8977 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
8981 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
8982 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
8983 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs
, 8)
8984 time_put
* __thiscall
time_put_wchar_ctor_refs(time_put
*this, MSVCP_size_t refs
)
8988 TRACE("(%p %lu)\n", this, refs
);
8990 _Locinfo_ctor(&locinfo
);
8991 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
8992 _Locinfo_dtor(&locinfo
);
8996 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
8997 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
8998 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs
, 8)
8999 time_put
* __thiscall
time_put_short_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9001 time_put_wchar_ctor_refs(this, refs
);
9002 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9006 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
9007 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
9008 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor
, 4)
9009 time_put
* __thiscall
time_put_wchar_ctor(time_put
*this)
9011 return time_put_wchar_ctor_refs(this, 0);
9014 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
9015 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
9016 DEFINE_THISCALL_WRAPPER(time_put_short_ctor
, 4)
9017 time_put
* __thiscall
time_put_short_ctor(time_put
*this)
9019 time_put_wchar_ctor(this);
9020 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9024 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
9025 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
9026 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
9027 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
9028 DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor
, 4)
9029 void __thiscall
time_put_wchar_dtor(time_put
*this)
9031 TRACE("(%p)\n", this);
9032 _Timevec_dtor(&this->time
);
9035 DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor
, 8)
9036 time_put
* __thiscall
time_put_wchar_vector_dtor(time_put
*this, unsigned int flags
)
9038 TRACE("(%p %x)\n", this, flags
);
9040 /* we have an array, with the number of elements stored before the first object */
9041 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9043 for(i
=*ptr
-1; i
>=0; i
--)
9044 time_put_wchar_dtor(this+i
);
9045 MSVCRT_operator_delete(ptr
);
9047 time_put_wchar_dtor(this);
9049 MSVCRT_operator_delete(this);
9055 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9056 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9057 MSVCP_size_t __cdecl
time_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
9059 TRACE("(%p %p)\n", facet
, loc
);
9061 if(facet
&& !*facet
) {
9062 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9064 ERR("Out of memory\n");
9065 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9068 time_put_wchar_ctor_name((time_put
*)*facet
,
9069 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9075 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9076 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9077 MSVCP_size_t __cdecl
time_put_wchar__Getcat_old(const locale_facet
**facet
)
9079 return time_put_wchar__Getcat(facet
, locale_classic());
9082 static time_put
* time_put_wchar_use_facet(const locale
*loc
)
9084 static time_put
*obj
= NULL
;
9087 const locale_facet
*fac
;
9089 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9090 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_wchar_id
));
9092 _Lockit_dtor(&lock
);
9093 return (time_put
*)fac
;
9097 _Lockit_dtor(&lock
);
9101 time_put_wchar__Getcat(&fac
, loc
);
9102 obj
= (time_put
*)fac
;
9103 call_locale_facet__Incref(&obj
->facet
);
9104 locale_facet_register(&obj
->facet
);
9105 _Lockit_dtor(&lock
);
9110 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9111 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9112 MSVCP_size_t __cdecl
time_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
9114 TRACE("(%p %p)\n", facet
, loc
);
9116 if(facet
&& !*facet
) {
9117 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9119 ERR("Out of memory\n");
9120 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9123 time_put_short_ctor_name((time_put
*)*facet
,
9124 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9130 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9131 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9132 MSVCP_size_t __cdecl
time_put_short__Getcat_old(const locale_facet
**facet
)
9134 return time_put_short__Getcat(facet
, locale_classic());
9137 static time_put
* time_put_short_use_facet(const locale
*loc
)
9139 static time_put
*obj
= NULL
;
9142 const locale_facet
*fac
;
9144 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9145 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_short_id
));
9147 _Lockit_dtor(&lock
);
9148 return (time_put
*)fac
;
9152 _Lockit_dtor(&lock
);
9156 time_put_short__Getcat(&fac
, loc
);
9157 obj
= (time_put
*)fac
;
9158 call_locale_facet__Incref(&obj
->facet
);
9159 locale_facet_register(&obj
->facet
);
9160 _Lockit_dtor(&lock
);
9165 /* ?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 */
9166 /* ?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 */
9167 /* ?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 */
9168 /* ?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 */
9169 #if _MSVCP_VER != 80
9170 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 36)
9172 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 40)
9174 #if _MSVCP_VER <= 100
9175 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9176 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9177 (this, ret, dest, base, fill, t, spec, mod))
9179 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
9180 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9181 (this, ret, dest, base, fill, t, spec, mod))
9183 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9184 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9185 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9187 char buf
[64], fmt
[4], *p
= fmt
;
9188 MSVCP_size_t i
, len
;
9191 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9199 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9200 for(i
=0; i
<len
; i
++) {
9201 c
= mb_to_wc(buf
[i
], &this->cvt
);
9202 ostreambuf_iterator_wchar_put(&dest
, c
);
9209 /* ?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 */
9210 /* ?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 */
9211 /* ?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 */
9212 /* ?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 */
9213 #if _MSVCP_VER != 80
9214 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 36)
9216 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 40)
9218 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9219 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9220 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9222 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9223 return call_time_put_wchar_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9226 /* ?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 */
9227 /* ?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 */
9228 /* ?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 */
9229 /* ?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 */
9230 #if _MSVCP_VER != 80
9231 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 36)
9233 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 40)
9235 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9236 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9237 wchar_t fill
, const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9239 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9242 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_wn(pat
, pat_end
-pat
));
9244 while(pat
< pat_end
) {
9245 if(*pat
!= percent
) {
9246 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9247 }else if(++pat
== pat_end
) {
9248 ostreambuf_iterator_wchar_put(&dest
, percent
);
9249 }else if(!_Wcrtomb(c
, *pat
, NULL
, &this->cvt
) || (*c
=='#' && pat
+1==pat_end
)) {
9250 ostreambuf_iterator_wchar_put(&dest
, percent
);
9251 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9254 if(!_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
)) {
9255 ostreambuf_iterator_wchar_put(&dest
, percent
);
9256 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9257 ostreambuf_iterator_wchar_put(&dest
, *pat
);
9259 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, '#');
9262 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, 0);
9271 /* ??0_Locimp@locale@std@@AAE@_N@Z */
9272 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
9273 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
9274 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
9276 TRACE("(%p %d)\n", this, transparent
);
9278 memset(this, 0, sizeof(locale__Locimp
));
9279 locale_facet_ctor_refs(&this->facet
, 1);
9280 this->transparent
= transparent
;
9281 locale_string_char_ctor_cstr(&this->name
, "*");
9285 /* ??_F_Locimp@locale@std@@QAEXXZ */
9286 /* ??_F_Locimp@locale@std@@QEAAXXZ */
9287 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
9288 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
9290 return locale__Locimp_ctor_transparent(this, FALSE
);
9293 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
9294 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
9295 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
9296 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
9301 TRACE("(%p %p)\n", this, copy
);
9303 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9304 memcpy(this, copy
, sizeof(locale__Locimp
));
9305 locale_facet_ctor_refs(&this->facet
, 1);
9306 if(copy
->facetvec
) {
9307 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
9308 if(!this->facetvec
) {
9309 _Lockit_dtor(&lock
);
9310 ERR("Out of memory\n");
9311 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9314 for(i
=0; i
<this->facet_cnt
; i
++)
9316 this->facetvec
[i
] = copy
->facetvec
[i
];
9317 if(this->facetvec
[i
])
9318 call_locale_facet__Incref(this->facetvec
[i
]);
9321 locale_string_char_copy_ctor(&this->name
, ©
->name
);
9322 _Lockit_dtor(&lock
);
9326 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
9327 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
9328 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
9330 return locale__Locimp_copy_ctor(this, copy
);
9333 /* ??1_Locimp@locale@std@@MAE@XZ */
9334 /* ??1_Locimp@locale@std@@MEAA@XZ */
9335 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
9336 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
9340 TRACE("(%p)\n", this);
9342 locale_facet_dtor(&this->facet
);
9343 for(i
=0; i
<this->facet_cnt
; i
++)
9344 if(this->facetvec
[i
] && call_locale_facet__Decref(this->facetvec
[i
]))
9345 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
9347 MSVCRT_operator_delete(this->facetvec
);
9348 locale_string_char_dtor(&this->name
);
9351 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
9352 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
9353 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
9355 locale__Locimp_dtor(this);
9358 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
9359 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
9361 TRACE("(%p %x)\n", this, flags
);
9363 /* we have an array, with the number of elements stored before the first object */
9364 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9366 for(i
=*ptr
-1; i
>=0; i
--)
9367 locale__Locimp_dtor(this+i
);
9368 MSVCRT_operator_delete(ptr
);
9370 locale__Locimp_dtor(this);
9372 MSVCRT_operator_delete(this);
9378 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@ABV123@@Z */
9379 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z */
9380 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp(const locale__Locimp
*copy
)
9382 locale__Locimp
*ret
;
9384 TRACE("(%p)\n", copy
);
9386 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9388 ERR("Out of memory\n");
9389 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9392 return locale__Locimp_copy_ctor(ret
, copy
);
9395 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z */
9396 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z */
9397 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp_transparent(MSVCP_bool transparent
)
9399 locale__Locimp
*ret
;
9401 TRACE("(%x)\n", transparent
);
9403 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9405 ERR("Out of memory\n");
9406 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9409 return locale__Locimp_ctor_transparent(ret
, transparent
);
9412 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
9413 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
9414 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
9418 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
9420 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9421 if(id
>= locimp
->facet_cnt
) {
9422 MSVCP_size_t new_size
= id
+1;
9423 locale_facet
**new_facetvec
;
9425 if(new_size
< locale_id__Id_cnt
+1)
9426 new_size
= locale_id__Id_cnt
+1;
9428 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
9430 _Lockit_dtor(&lock
);
9431 ERR("Out of memory\n");
9432 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9436 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
9437 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
9438 MSVCRT_operator_delete(locimp
->facetvec
);
9439 locimp
->facetvec
= new_facetvec
;
9440 locimp
->facet_cnt
= new_size
;
9443 if(locimp
->facetvec
[id
] && call_locale_facet__Decref(locimp
->facetvec
[id
]))
9444 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
9446 locimp
->facetvec
[id
] = facet
;
9448 call_locale_facet__Incref(facet
);
9449 _Lockit_dtor(&lock
);
9452 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
9453 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
9454 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
9455 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
9457 locale__Locimp__Locimp_Addfac(this, facet
, id
);
9460 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
9461 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
9462 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
9468 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
9469 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
9470 /* List of missing facets:
9471 * messages, money_get, money_put, moneypunct, moneypunct, time_get
9473 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
9475 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
9477 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
9481 ctype
= ctype_short_use_facet(loc
);
9483 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
9485 ERR("Out of memory\n");
9486 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9488 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
9490 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
9493 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
9497 numget
= num_get_short_use_facet(loc
);
9499 numget
= MSVCRT_operator_new(sizeof(num_get
));
9501 ERR("Out of memory\n");
9502 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9504 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
9506 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
9509 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
9513 numput
= num_put_short_use_facet(loc
);
9515 numput
= MSVCRT_operator_new(sizeof(num_put
));
9517 ERR("Out of memory\n");
9518 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9520 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
9522 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
9525 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
9526 numpunct_wchar
*numpunct
;
9529 numpunct
= numpunct_short_use_facet(loc
);
9531 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
9533 ERR("Out of memory\n");
9534 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9536 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
9538 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
9541 if(cat
& (1<<(collate_short__Getcat(NULL
, NULL
)-1))) {
9545 c
= collate_short_use_facet(loc
);
9547 c
= MSVCRT_operator_new(sizeof(collate
));
9549 ERR("Out of memory\n");
9550 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9552 collate_short_ctor_locinfo(c
, locinfo
, 0);
9554 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_short_id
));
9557 if(cat
& (1<<(time_put_short__Getcat(NULL
, NULL
)-1))) {
9561 t
= time_put_short_use_facet(loc
);
9563 t
= MSVCRT_operator_new(sizeof(time_put
));
9565 ERR("Out of memory\n");
9566 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9568 time_put_short_ctor_locinfo(t
, locinfo
, 0);
9570 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_short_id
));
9573 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
9574 codecvt_wchar
*codecvt
;
9577 codecvt
= codecvt_short_use_facet(loc
);
9579 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
9581 ERR("Out of memory\n");
9582 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9584 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
9586 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
9590 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
9591 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
9592 /* List of missing facets:
9593 * messages, money_get, money_put, moneypunct, moneypunct, time_get
9595 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
9597 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
9599 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
9603 ctype
= ctype_wchar_use_facet(loc
);
9605 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
9607 ERR("Out of memory\n");
9608 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9610 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
9612 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
9615 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
9619 numget
= num_get_wchar_use_facet(loc
);
9621 numget
= MSVCRT_operator_new(sizeof(num_get
));
9623 ERR("Out of memory\n");
9624 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9626 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
9628 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
9631 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
9635 numput
= num_put_wchar_use_facet(loc
);
9637 numput
= MSVCRT_operator_new(sizeof(num_put
));
9639 ERR("Out of memory\n");
9640 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9642 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
9644 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
9647 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
9648 numpunct_wchar
*numpunct
;
9651 numpunct
= numpunct_wchar_use_facet(loc
);
9653 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
9655 ERR("Out of memory\n");
9656 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9658 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
9660 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
9663 if(cat
& (1<<(collate_wchar__Getcat(NULL
, NULL
)-1))) {
9667 c
= collate_wchar_use_facet(loc
);
9669 c
= MSVCRT_operator_new(sizeof(collate
));
9671 ERR("Out of memory\n");
9672 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9674 collate_wchar_ctor_locinfo(c
, locinfo
, 0);
9676 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_wchar_id
));
9679 if(cat
& (1<<(time_put_wchar__Getcat(NULL
, NULL
)-1))) {
9683 t
= time_put_wchar_use_facet(loc
);
9685 t
= MSVCRT_operator_new(sizeof(time_put
));
9687 ERR("Out of memory\n");
9688 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9690 time_put_wchar_ctor_locinfo(t
, locinfo
, 0);
9692 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_wchar_id
));
9695 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
9696 codecvt_wchar
*codecvt
;
9699 codecvt
= codecvt_wchar_use_facet(loc
);
9701 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
9703 ERR("Out of memory\n");
9704 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9706 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
9708 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
9712 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
9713 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
9714 /* List of missing facets:
9715 * messages, money_get, money_put, moneypunct, moneypunct, time_get
9717 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
9719 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
9721 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
9725 ctype
= ctype_char_use_facet(loc
);
9727 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
9729 ERR("Out of memory\n");
9730 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9732 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
9734 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
9737 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
9741 numget
= num_get_char_use_facet(loc
);
9743 numget
= MSVCRT_operator_new(sizeof(num_get
));
9745 ERR("Out of memory\n");
9746 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9748 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
9750 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
9753 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
9757 numput
= num_put_char_use_facet(loc
);
9759 numput
= MSVCRT_operator_new(sizeof(num_put
));
9761 ERR("Out of memory\n");
9762 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9764 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
9766 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
9769 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
9770 numpunct_char
*numpunct
;
9773 numpunct
= numpunct_char_use_facet(loc
);
9775 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
9777 ERR("Out of memory\n");
9778 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9780 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
9782 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
9785 if(cat
& (1<<(collate_char__Getcat(NULL
, NULL
)-1))) {
9789 c
= collate_char_use_facet(loc
);
9791 c
= MSVCRT_operator_new(sizeof(collate
));
9793 ERR("Out of memory\n");
9794 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9796 collate_char_ctor_locinfo(c
, locinfo
, 0);
9798 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_char_id
));
9801 if(cat
& (1<<(time_put_char__Getcat(NULL
, NULL
)-1))) {
9805 t
= time_put_char_use_facet(loc
);
9807 t
= MSVCRT_operator_new(sizeof(time_put
));
9809 ERR("Out of memory\n");
9810 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9812 time_put_char_ctor_locinfo(t
, locinfo
, 0);
9814 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_char_id
));
9817 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
9818 codecvt_char
*codecvt
;
9821 codecvt
= codecvt_char_use_facet(loc
);
9823 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
9825 ERR("Out of memory\n");
9826 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9828 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
9830 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
9834 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
9835 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
9836 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
9838 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
9840 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
9841 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
9842 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
9844 locimp
->catmask
|= cat
;
9845 locale_string_char_assign(&locimp
->name
, &locinfo
->newlocname
);
9849 /* ??_7_Locimp@locale@std@@6B@ */
9850 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
9851 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
9854 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
9855 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
9856 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
9857 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
9859 TRACE("(%p %p)\n", this, locimp
);
9860 /* Don't change locimp reference counter */
9865 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
9866 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
9867 locale__Locimp
* __cdecl
locale__Init(void)
9873 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9875 _Lockit_dtor(&lock
);
9876 return global_locale
;
9879 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9880 if(!global_locale
) {
9881 _Lockit_dtor(&lock
);
9882 ERR("Out of memory\n");
9883 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9887 locale__Locimp_ctor(global_locale
);
9888 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
9889 locale_string_char_dtor(&global_locale
->name
);
9890 locale_string_char_ctor_cstr(&global_locale
->name
, "C");
9892 locale__Locimp__Clocptr
= global_locale
;
9893 global_locale
->facet
.refs
++;
9894 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
9895 _Lockit_dtor(&lock
);
9897 return global_locale
;
9900 /* ?_Init@locale@std@@CAPAV_Locimp@12@_N@Z */
9901 /* ?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z */
9902 locale__Locimp
* __cdecl
locale__Init_ref(MSVCP_bool inc_ref
)
9904 locale__Locimp
*ret
;
9907 TRACE("(%x)\n", inc_ref
);
9909 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9910 if(inc_ref
&& global_locale
) {
9911 call_locale_facet__Incref(&global_locale
->facet
);
9912 _Lockit_dtor(&lock
);
9913 return global_locale
;
9916 ret
= locale__Init();
9917 _Lockit_dtor(&lock
);
9921 /* ??0locale@std@@QAE@ABV01@0H@Z */
9922 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
9923 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
9924 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
9928 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
9930 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9932 ERR("Out of memory\n");
9933 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9935 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
9937 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, locale_string_char_c_str(&loc
->ptr
->name
));
9938 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, locale_string_char_c_str(&other
->ptr
->name
));
9939 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
9940 _Locinfo_dtor(&locinfo
);
9945 /* ??0locale@std@@QAE@ABV01@@Z */
9946 /* ??0locale@std@@QEAA@AEBV01@@Z */
9947 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
9948 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
9950 TRACE("(%p %p)\n", this, copy
);
9951 this->ptr
= copy
->ptr
;
9952 call_locale_facet__Incref(&this->ptr
->facet
);
9956 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
9957 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
9958 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
9959 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
9963 TRACE("(%p %p %s %d)\n", this, loc
, locname
, cat
);
9965 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
9966 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
9967 _Locinfo_dtor(&locinfo
);
9968 MSVCRT_operator_delete(this->ptr
);
9969 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
9972 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9974 ERR("Out of memory\n");
9975 _Locinfo_dtor(&locinfo
);
9976 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9978 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
9980 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
9981 _Locinfo_dtor(&locinfo
);
9985 /* ??0locale@std@@QAE@PBDH@Z */
9986 /* ??0locale@std@@QEAA@PEBDH@Z */
9987 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
9988 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
9992 TRACE("(%p %s %d)\n", this, locname
, cat
);
9994 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9996 ERR("Out of memory\n");
9997 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9999 locale__Locimp_ctor(this->ptr
);
10003 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10004 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10005 _Locinfo_dtor(&locinfo
);
10006 MSVCRT_operator_delete(this->ptr
);
10007 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10010 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10011 _Locinfo_dtor(&locinfo
);
10016 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
10017 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
10018 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
10019 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
10021 TRACE("(%p)\n", this);
10026 /* ??0locale@std@@QAE@XZ */
10027 /* ??0locale@std@@QEAA@XZ */
10028 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
10029 locale
* __thiscall
locale_ctor(locale
*this)
10031 TRACE("(%p)\n", this);
10032 this->ptr
= locale__Init();
10033 call_locale_facet__Incref(&this->ptr
->facet
);
10037 /* ??1locale@std@@QAE@XZ */
10038 /* ??1locale@std@@QEAA@XZ */
10039 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
10040 void __thiscall
locale_dtor(locale
*this)
10042 TRACE("(%p)\n", this);
10043 if(this->ptr
&& call_locale_facet__Decref(&this->ptr
->facet
))
10045 locale__Locimp_dtor(this->ptr
);
10046 MSVCRT_operator_delete(this->ptr
);
10050 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
10051 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
10052 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
10053 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
10055 FIXME("(%p %p) stub\n", this, loc
);
10059 /* ??8locale@std@@QBE_NABV01@@Z */
10060 /* ??8locale@std@@QEBA_NAEBV01@@Z */
10061 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
10062 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
10064 FIXME("(%p %p) stub\n", this, loc
);
10068 /* ??9locale@std@@QBE_NABV01@@Z */
10069 /* ??9locale@std@@QEBA_NAEBV01@@Z */
10070 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
10071 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
10073 FIXME("(%p %p) stub\n", this, loc
);
10077 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
10078 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
10079 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
10080 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
10082 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
10084 if(this->ptr
->facet
.refs
> 1) {
10085 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10087 ERR("Out of memory\n");
10088 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10091 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
10092 call_locale_facet__Decref(&this->ptr
->facet
);
10093 this->ptr
= new_ptr
;
10096 locale__Locimp__Addfac(this->ptr
, facet
, id
);
10099 locale_string_char_dtor(&this->ptr
->name
);
10100 locale_string_char_ctor_cstr(&this->ptr
->name
, "*");
10105 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
10106 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
10107 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
10108 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
10112 TRACE("(%p %lu)\n", this, id
);
10114 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
10115 if(fac
|| !this->ptr
->transparent
)
10118 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
10121 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
10122 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
10123 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
10126 return global_locale
;
10129 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
10130 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
10131 void __cdecl
locale__Setgloballocale(void *locimp
)
10133 TRACE("(%p)\n", locimp
);
10134 global_locale
= locimp
;
10137 /* ?classic@locale@std@@SAABV12@XZ */
10138 /* ?classic@locale@std@@SAAEBV12@XZ */
10139 const locale
* __cdecl
locale_classic(void)
10143 return &classic_locale
;
10146 /* ?empty@locale@std@@SA?AV12@XZ */
10147 locale
* __cdecl
locale_empty(locale
*ret
)
10153 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10155 ERR("Out of memory\n");
10156 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10158 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
10162 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
10163 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
10164 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
10169 TRACE("(%p %p)\n", loc
, ret
);
10171 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10174 if(loc
->ptr
!= global_locale
) {
10175 call_locale_facet__Decref(&global_locale
->facet
);
10176 global_locale
= loc
->ptr
;
10177 call_locale_facet__Incref(&global_locale
->facet
);
10179 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
10180 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
10182 setlocale(i
, locale_string_char_c_str(&global_locale
->name
));
10185 _Lockit_dtor(&lock
);
10189 #if _MSVCP_VER < 100
10191 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10192 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10193 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
10194 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
10196 TRACE("(%p)\n", this);
10198 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
10202 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10203 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10204 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
10205 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
10207 TRACE( "(%p)\n", this);
10208 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
10214 /* ?_Getname@_Locinfo@std@@QBEPBDXZ */
10215 /* ?_Getname@_Locinfo@std@@QEBAPEBDXZ */
10216 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 4)
10217 const char * __thiscall
_Locinfo__Getname( const _Locinfo
*this )
10219 return locale_string_char_c_str( &this->newlocname
);
10222 #endif /* _MSVCP_VER < 100 */
10225 wctrans_t __cdecl
wctrans(const char *property
)
10227 static const char str_tolower
[] = "tolower";
10228 static const char str_toupper
[] = "toupper";
10230 if(!strcmp(property
, str_tolower
))
10232 if(!strcmp(property
, str_toupper
))
10238 wint_t __cdecl
towctrans(wint_t c
, wctrans_t category
)
10241 return towupper(c
);
10242 return towlower(c
);
10246 wint_t __cdecl
btowc(int c
)
10252 if (c
== EOF
|| _Mbrtowc( &ret
, &ch
, 1, &state
, NULL
) != 1) return WEOF
;
10257 size_t __cdecl
mbrlen(const char *str
, size_t n
, mbstate_t *state
)
10259 static int local_state
;
10261 if (!state
) state
= &local_state
;
10262 return _Mbrtowc( NULL
, str
, n
, state
, NULL
);
10266 size_t __cdecl
mbrtowc(wchar_t *dst
, const char *str
, size_t n
, mbstate_t *state
)
10268 static int local_state
;
10270 if (!state
) state
= &local_state
;
10271 return _Mbrtowc( dst
, str
, n
, state
, NULL
);
10275 size_t __cdecl
mbsrtowcs(wchar_t *dst
, const char **pstr
, size_t n
, mbstate_t *state
)
10277 static int local_state
;
10283 if (!state
) state
= &local_state
;
10285 while (!dst
|| n
> ret
)
10287 int len
= _Mbrtowc( &wc
, src
, 2, state
, NULL
);
10288 if (len
< 0) return -1;
10290 if (dst
) dst
[ret
] = wc
;
10299 int __cdecl
wctob(wint_t wc
)
10301 char ret
[MB_LEN_MAX
];
10303 if (wc
== WEOF
|| _Wcrtomb( ret
, wc
, NULL
, NULL
) != 1) return EOF
;
10308 size_t __cdecl
wcrtomb(char *dst
, wchar_t wc
, mbstate_t *state
)
10310 return _Wcrtomb( dst
, wc
, state
, NULL
);
10314 size_t __cdecl
wcsrtombs(char *dst
, const wchar_t **pstr
, size_t n
, mbstate_t *state
)
10316 const wchar_t *src
;
10317 char buffer
[MB_LEN_MAX
];
10322 while (!dst
|| n
> ret
)
10324 int len
= _Wcrtomb( buffer
, *src
, state
, NULL
);
10325 if (len
<= 0) return -1;
10326 if (n
< ret
+ len
) break;
10327 memcpy( dst
+ ret
, buffer
, len
);
10329 if (!buffer
[0]) break;
10336 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@")
10337 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@")
10338 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@")
10339 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@")
10340 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@")
10341 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@")
10342 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@")
10343 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@")
10344 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@")
10345 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@")
10346 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@")
10347 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@")
10348 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@")
10349 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@")
10350 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@")
10351 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@@")
10352 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@@")
10353 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@@")
10354 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@@")
10355 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@@")
10356 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@@")
10357 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@@")
10358 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@@")
10359 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@@")
10362 void __asm_dummy_vtables(void) {
10364 __ASM_VTABLE(locale_facet
,
10365 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
10366 #if _MSVCP_VER >= 110
10367 VTABLE_ADD_FUNC(locale_facet__Incref
)
10368 VTABLE_ADD_FUNC(locale_facet__Decref
)
10371 __ASM_VTABLE(collate_char
,
10372 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
10373 #if _MSVCP_VER >= 110
10374 VTABLE_ADD_FUNC(locale_facet__Incref
)
10375 VTABLE_ADD_FUNC(locale_facet__Decref
)
10377 VTABLE_ADD_FUNC(collate_char_do_compare
)
10378 VTABLE_ADD_FUNC(collate_char_do_transform
)
10379 VTABLE_ADD_FUNC(collate_char_do_hash
));
10380 __ASM_VTABLE(collate_wchar
,
10381 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
10382 #if _MSVCP_VER >= 110
10383 VTABLE_ADD_FUNC(locale_facet__Incref
)
10384 VTABLE_ADD_FUNC(locale_facet__Decref
)
10386 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
10387 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
10388 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
10389 __ASM_VTABLE(collate_short
,
10390 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
10391 #if _MSVCP_VER >= 110
10392 VTABLE_ADD_FUNC(locale_facet__Incref
)
10393 VTABLE_ADD_FUNC(locale_facet__Decref
)
10395 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
10396 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
10397 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
10398 __ASM_VTABLE(ctype_base
,
10399 VTABLE_ADD_FUNC(ctype_base_vector_dtor
)
10400 #if _MSVCP_VER >= 110
10401 VTABLE_ADD_FUNC(locale_facet__Incref
)
10402 VTABLE_ADD_FUNC(locale_facet__Decref
)
10405 __ASM_VTABLE(ctype_char
,
10406 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
10407 #if _MSVCP_VER >= 110
10408 VTABLE_ADD_FUNC(locale_facet__Incref
)
10409 VTABLE_ADD_FUNC(locale_facet__Decref
)
10411 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
10412 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
10413 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
10414 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
10415 VTABLE_ADD_FUNC(ctype_char_do_widen
)
10416 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
10417 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
10418 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
10419 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
10420 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
10421 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
)
10423 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
10424 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
10427 __ASM_VTABLE(ctype_wchar
,
10428 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
10429 #if _MSVCP_VER >= 110
10430 VTABLE_ADD_FUNC(locale_facet__Incref
)
10431 VTABLE_ADD_FUNC(locale_facet__Decref
)
10433 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
10434 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
10435 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
10436 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
10437 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
10438 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
10439 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
10440 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
10441 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
10442 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
10443 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
10444 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
10445 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
10446 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
10447 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
10449 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
10450 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
10453 __ASM_VTABLE(ctype_short
,
10454 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
10455 #if _MSVCP_VER >= 110
10456 VTABLE_ADD_FUNC(locale_facet__Incref
)
10457 VTABLE_ADD_FUNC(locale_facet__Decref
)
10459 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
10460 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
10461 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
10462 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
10463 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
10464 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
10465 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
10466 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
10467 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
10468 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
10469 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
10470 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
10471 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
10472 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
10473 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
10475 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
10476 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
10479 __ASM_VTABLE(codecvt_base
,
10480 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
10481 #if _MSVCP_VER >= 110
10482 VTABLE_ADD_FUNC(locale_facet__Incref
)
10483 VTABLE_ADD_FUNC(locale_facet__Decref
)
10485 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
10486 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
10487 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
10488 __ASM_VTABLE(codecvt_char
,
10489 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
10490 #if _MSVCP_VER >= 110
10491 VTABLE_ADD_FUNC(locale_facet__Incref
)
10492 VTABLE_ADD_FUNC(locale_facet__Decref
)
10494 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
10495 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
10496 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
10497 VTABLE_ADD_FUNC(codecvt_char_do_in
)
10498 VTABLE_ADD_FUNC(codecvt_char_do_out
)
10499 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
10500 VTABLE_ADD_FUNC(codecvt_char_do_length
));
10501 __ASM_VTABLE(codecvt_wchar
,
10502 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
10503 #if _MSVCP_VER >= 110
10504 VTABLE_ADD_FUNC(locale_facet__Incref
)
10505 VTABLE_ADD_FUNC(locale_facet__Decref
)
10507 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
10508 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
10509 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
10510 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
10511 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
10512 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
10513 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
10514 __ASM_VTABLE(codecvt_short
,
10515 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
10516 #if _MSVCP_VER >= 110
10517 VTABLE_ADD_FUNC(locale_facet__Incref
)
10518 VTABLE_ADD_FUNC(locale_facet__Decref
)
10520 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
10521 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
10522 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
10523 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
10524 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
10525 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
10526 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
10527 __ASM_VTABLE(numpunct_char
,
10528 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
10529 #if _MSVCP_VER >= 110
10530 VTABLE_ADD_FUNC(locale_facet__Incref
)
10531 VTABLE_ADD_FUNC(locale_facet__Decref
)
10533 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
10534 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
10535 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
10536 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
10537 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
10538 __ASM_VTABLE(numpunct_wchar
,
10539 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
10540 #if _MSVCP_VER >= 110
10541 VTABLE_ADD_FUNC(locale_facet__Incref
)
10542 VTABLE_ADD_FUNC(locale_facet__Decref
)
10544 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
10545 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
10546 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
10547 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
10548 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
10549 __ASM_VTABLE(numpunct_short
,
10550 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
10551 #if _MSVCP_VER >= 110
10552 VTABLE_ADD_FUNC(locale_facet__Incref
)
10553 VTABLE_ADD_FUNC(locale_facet__Decref
)
10555 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
10556 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
10557 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
10558 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
10559 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
10560 __ASM_VTABLE(num_get_char
,
10561 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
10562 #if _MSVCP_VER >= 110
10563 VTABLE_ADD_FUNC(locale_facet__Incref
)
10564 VTABLE_ADD_FUNC(locale_facet__Decref
)
10566 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
10567 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
10568 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
10569 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
10570 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
10571 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
10572 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
10573 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
10574 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
10575 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
10576 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
10577 __ASM_VTABLE(num_get_short
,
10578 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
10579 #if _MSVCP_VER >= 110
10580 VTABLE_ADD_FUNC(locale_facet__Incref
)
10581 VTABLE_ADD_FUNC(locale_facet__Decref
)
10583 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
10584 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
10585 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
10586 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
10587 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
10588 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
10589 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
10590 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
10591 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
10592 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
10593 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
10594 __ASM_VTABLE(num_get_wchar
,
10595 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
10596 #if _MSVCP_VER >= 110
10597 VTABLE_ADD_FUNC(locale_facet__Incref
)
10598 VTABLE_ADD_FUNC(locale_facet__Decref
)
10600 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
10601 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
10602 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
10603 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
10604 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
10605 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
10606 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
10607 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
10608 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
10609 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
10610 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
10611 __ASM_VTABLE(num_put_char
,
10612 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
10613 #if _MSVCP_VER >= 110
10614 VTABLE_ADD_FUNC(locale_facet__Incref
)
10615 VTABLE_ADD_FUNC(locale_facet__Decref
)
10617 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
10618 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
10619 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
10620 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
10621 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
10622 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
10623 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
10624 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
10625 __ASM_VTABLE(num_put_wchar
,
10626 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
10627 #if _MSVCP_VER >= 110
10628 VTABLE_ADD_FUNC(locale_facet__Incref
)
10629 VTABLE_ADD_FUNC(locale_facet__Decref
)
10631 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
10632 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
10633 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
10634 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
10635 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
10636 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
10637 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
10638 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
10639 __ASM_VTABLE(num_put_short
,
10640 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
10641 #if _MSVCP_VER >= 110
10642 VTABLE_ADD_FUNC(locale_facet__Incref
)
10643 VTABLE_ADD_FUNC(locale_facet__Decref
)
10645 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
10646 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
10647 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
10648 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
10649 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
10650 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
10651 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
10652 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
10653 __ASM_VTABLE(time_put_char
,
10654 VTABLE_ADD_FUNC(time_put_char_vector_dtor
)
10655 #if _MSVCP_VER >= 110
10656 VTABLE_ADD_FUNC(locale_facet__Incref
)
10657 VTABLE_ADD_FUNC(locale_facet__Decref
)
10659 VTABLE_ADD_FUNC(time_put_char_do_put
));
10660 __ASM_VTABLE(time_put_wchar
,
10661 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
10662 #if _MSVCP_VER >= 110
10663 VTABLE_ADD_FUNC(locale_facet__Incref
)
10664 VTABLE_ADD_FUNC(locale_facet__Decref
)
10666 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
10667 __ASM_VTABLE(time_put_short
,
10668 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
10669 #if _MSVCP_VER >= 110
10670 VTABLE_ADD_FUNC(locale_facet__Incref
)
10671 VTABLE_ADD_FUNC(locale_facet__Decref
)
10673 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
10678 void init_locale(void *base
)
10681 init_locale_facet_rtti(base
);
10682 init_collate_char_rtti(base
);
10683 init_collate_wchar_rtti(base
);
10684 init_collate_short_rtti(base
);
10685 init_ctype_base_rtti(base
);
10686 init_ctype_char_rtti(base
);
10687 init_ctype_wchar_rtti(base
);
10688 init_ctype_short_rtti(base
);
10689 init_codecvt_base_rtti(base
);
10690 init_codecvt_char_rtti(base
);
10691 init_codecvt_wchar_rtti(base
);
10692 init_codecvt_short_rtti(base
);
10693 init_numpunct_char_rtti(base
);
10694 init_numpunct_wchar_rtti(base
);
10695 init_numpunct_short_rtti(base
);
10696 init_num_get_char_rtti(base
);
10697 init_num_get_wchar_rtti(base
);
10698 init_num_get_short_rtti(base
);
10699 init_num_put_char_rtti(base
);
10700 init_num_put_wchar_rtti(base
);
10701 init_num_put_short_rtti(base
);
10702 init_time_put_char_rtti(base
);
10703 init_time_put_wchar_rtti(base
);
10704 init_time_put_short_rtti(base
);
10708 void free_locale(void)
10710 facets_elem
*iter
, *safe
;
10712 if(global_locale
) {
10713 locale_dtor(&classic_locale
);
10714 locale__Locimp_dtor(global_locale
);
10715 MSVCRT_operator_delete(global_locale
);
10718 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
10719 list_remove(&iter
->entry
);
10720 if(call_locale_facet__Decref(iter
->fac
))
10721 call_locale_facet_vector_dtor(iter
->fac
, 1);
10722 MSVCRT_operator_delete(iter
);