From 4c4a654552aed4ba64b6291c3620ef4e6fdc62e8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 12 Nov 2013 13:56:07 +0100 Subject: [PATCH] msvcp80: Share the implementation with msvcp90. --- dlls/msvcp80/Makefile.in | 4 +- dlls/msvcp80/cxx.h | 447 - dlls/msvcp80/exception.c | 563 - dlls/msvcp80/ios.c | 13327 ---------------- dlls/msvcp80/locale.c | 9621 ----------- dlls/msvcp80/math.c | 2169 --- dlls/msvcp80/memory.c | 338 - dlls/msvcp80/misc.c | 231 - dlls/msvcp80/msvcp.h | 483 - dlls/msvcp80/msvcp80.spec | 48 +- dlls/msvcp80/msvcp80_main.c | 124 - dlls/msvcp80/string.c | 4456 ------ dlls/msvcp90/Makefile.in | 3 +- dlls/msvcp90/locale.c | 148 + dlls/msvcp90/{msvcp90_main.c => msvcp_main.c} | 0 dlls/msvcp90/string.c | 34 +- 16 files changed, 209 insertions(+), 31787 deletions(-) delete mode 100644 dlls/msvcp80/cxx.h delete mode 100644 dlls/msvcp80/exception.c delete mode 100644 dlls/msvcp80/ios.c delete mode 100644 dlls/msvcp80/locale.c delete mode 100644 dlls/msvcp80/math.c delete mode 100644 dlls/msvcp80/memory.c delete mode 100644 dlls/msvcp80/misc.c delete mode 100644 dlls/msvcp80/msvcp.h delete mode 100644 dlls/msvcp80/msvcp80_main.c delete mode 100644 dlls/msvcp80/string.c rename dlls/msvcp90/{msvcp90_main.c => msvcp_main.c} (100%) diff --git a/dlls/msvcp80/Makefile.in b/dlls/msvcp80/Makefile.in index 177ff6c2ecd..8abfa4fea6e 100644 --- a/dlls/msvcp80/Makefile.in +++ b/dlls/msvcp80/Makefile.in @@ -2,6 +2,8 @@ MODULE = msvcp80.dll IMPORTS = msvcrt MODCFLAGS = @BUILTINFLAG@ EXTRAINCL = -I$(top_srcdir)/include/msvcrt +EXTRADEFS = -D_MSVCP_VER=80 +PARENTSRC = ../msvcp90 C_SRCS = \ exception.c \ @@ -10,7 +12,7 @@ C_SRCS = \ math.c \ memory.c \ misc.c \ - msvcp80_main.c \ + msvcp_main.c \ string.c @MAKE_DLL_RULES@ diff --git a/dlls/msvcp80/cxx.h b/dlls/msvcp80/cxx.h deleted file mode 100644 index cf63ac493e4..00000000000 --- a/dlls/msvcp80/cxx.h +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright 2012 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/* Copied from dlls/msvcrt/cpp.c */ -#ifdef __i386__ /* thiscall functions are i386-specific */ - -#define THISCALL(func) __thiscall_ ## func -#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func) -#define __thiscall __stdcall -#define DEFINE_THISCALL_WRAPPER(func,args) \ - extern void THISCALL(func)(void); \ - __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ - "popl %eax\n\t" \ - "pushl %ecx\n\t" \ - "pushl %eax\n\t" \ - "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) -#else /* __i386__ */ - -#define THISCALL(func) func -#define THISCALL_NAME(func) __ASM_NAME(#func) -#define __thiscall __cdecl -#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */ - -#endif /* __i386__ */ - -#ifdef _WIN64 - -#define VTABLE_ADD_FUNC(name) "\t.quad " THISCALL_NAME(name) "\n" - -#define __ASM_VTABLE(name,funcs) \ - __asm__(".data\n" \ - "\t.align 8\n" \ - "\t.quad " __ASM_NAME(#name "_rtti") "\n" \ - "\t.globl " __ASM_NAME("MSVCP_" #name "_vtable") "\n" \ - __ASM_NAME("MSVCP_" #name "_vtable") ":\n" \ - funcs "\n\t.text") - -#else - -#define VTABLE_ADD_FUNC(name) "\t.long " THISCALL_NAME(name) "\n" - -#define __ASM_VTABLE(name,funcs) \ - __asm__(".data\n" \ - "\t.align 4\n" \ - "\t.long " __ASM_NAME(#name "_rtti") "\n" \ - "\t.globl " __ASM_NAME("MSVCP_" #name "_vtable") "\n" \ - __ASM_NAME("MSVCP_" #name "_vtable") ":\n" \ - funcs "\n\t.text") - -#endif /* _WIN64 */ - -#ifndef __x86_64__ - -#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ - static const type_info name ## _type_info = { \ - &MSVCP_type_info_vtable, \ - NULL, \ - mangled_name \ - }; \ -\ -static const rtti_base_descriptor name ## _rtti_base_descriptor = { \ - &name ##_type_info, \ - base_classes_no, \ - { 0, -1, 0}, \ - 64 \ -}; \ -\ -static const rtti_base_array name ## _rtti_base_array = { \ - { \ - &name ## _rtti_base_descriptor, \ - cl1, \ - cl2, \ - cl3, \ - cl4, \ - cl5, \ - cl6, \ - cl7, \ - cl8, \ - cl9, \ - } \ -}; \ -\ -static const rtti_object_hierarchy name ## _hierarchy = { \ - 0, \ - 0, \ - base_classes_no+1, \ - &name ## _rtti_base_array \ -}; \ -\ -const rtti_object_locator name ## _rtti = { \ - 0, \ - off, \ - 0, \ - &name ## _type_info, \ - &name ## _hierarchy \ -}; - -#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor) \ -\ -static const cxx_type_info type ## _cxx_type_info = { \ - 0, \ - & type ##_type_info, \ - { 0, -1, 0 }, \ - sizeof(type), \ - (cxx_copy_ctor)THISCALL(MSVCP_ ## type ##_copy_ctor) \ -}; \ -\ -static const cxx_type_info_table type ## _cxx_type_table = { \ - base_no+1, \ - { \ - & type ## _cxx_type_info, \ - cl1, \ - cl2 \ - } \ -}; \ -\ -static const cxx_exception_type type ## _cxx_type = { \ - 0, \ - (cxx_copy_ctor)THISCALL(dtor), \ - NULL, \ - & type ## _cxx_type_table \ -}; - -#else - -#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ - static const type_info name ## _type_info = { \ - &MSVCP_type_info_vtable, \ - NULL, \ - mangled_name \ - }; \ -\ -static rtti_base_descriptor name ## _rtti_base_descriptor = { \ - 0xdeadbeef, \ - base_classes_no, \ - { 0, -1, 0}, \ - 64 \ -}; \ -\ -static rtti_base_array name ## _rtti_base_array = { \ - { \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - } \ -}; \ -\ -static rtti_object_hierarchy name ## _hierarchy = { \ - 0, \ - 0, \ - base_classes_no+1, \ - 0xdeadbeef \ -}; \ -\ -rtti_object_locator name ## _rtti = { \ - 1, \ - off, \ - 0, \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef \ -};\ -\ -static void init_ ## name ## _rtti(char *base) \ -{ \ - name ## _rtti_base_descriptor.type_descriptor = (char*)&name ## _type_info - base; \ - name ## _rtti_base_array.bases[0] = (char*)&name ## _rtti_base_descriptor - base; \ - name ## _rtti_base_array.bases[1] = (char*)cl1 - base; \ - name ## _rtti_base_array.bases[2] = (char*)cl2 - base; \ - name ## _rtti_base_array.bases[3] = (char*)cl3 - base; \ - name ## _rtti_base_array.bases[4] = (char*)cl4 - base; \ - name ## _rtti_base_array.bases[5] = (char*)cl5 - base; \ - name ## _rtti_base_array.bases[6] = (char*)cl6 - base; \ - name ## _rtti_base_array.bases[7] = (char*)cl7 - base; \ - name ## _rtti_base_array.bases[8] = (char*)cl8 - base; \ - name ## _rtti_base_array.bases[9] = (char*)cl9 - base; \ - name ## _hierarchy.base_classes = (char*)&name ## _rtti_base_array - base; \ - name ## _rtti.type_descriptor = (char*)&name ## _type_info - base; \ - name ## _rtti.type_hierarchy = (char*)&name ## _hierarchy - base; \ - name ## _rtti.object_locator = (char*)&name ## _rtti - base; \ -} - -#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor) \ -\ -static cxx_type_info type ## _cxx_type_info = { \ - 0, \ - 0xdeadbeef, \ - { 0, -1, 0 }, \ - sizeof(type), \ - 0xdeadbeef \ -}; \ -\ -static cxx_type_info_table type ## _cxx_type_table = { \ - base_no+1, \ - { \ - 0xdeadbeef, \ - 0xdeadbeef, \ - 0xdeadbeef \ - } \ -}; \ -\ -static cxx_exception_type type ##_cxx_type = { \ - 0, \ - 0xdeadbeef, \ - 0, \ - 0xdeadbeef \ -}; \ -\ -static void init_ ## type ## _cxx(char *base) \ -{ \ - type ## _cxx_type_info.type_info = (char *)&type ## _type_info - base; \ - type ## _cxx_type_info.copy_ctor = (char *)MSVCP_ ## type ## _copy_ctor - base; \ - type ## _cxx_type_table.info[0] = (char *)&type ## _cxx_type_info - base; \ - type ## _cxx_type_table.info[1] = (char *)cl1 - base; \ - type ## _cxx_type_table.info[2] = (char *)cl2 - base; \ - type ## _cxx_type.destructor = (char *)dtor - base; \ - type ## _cxx_type.type_info_table = (char *)&type ## _cxx_type_table - base; \ -} - -#endif - -#define DEFINE_RTTI_DATA0(name, off, mangled_name) \ - DEFINE_RTTI_DATA(name, off, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) -#define DEFINE_RTTI_DATA1(name, off, cl1, mangled_name) \ - DEFINE_RTTI_DATA(name, off, 1, cl1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) -#define DEFINE_RTTI_DATA2(name, off, cl1, cl2, mangled_name) \ - DEFINE_RTTI_DATA(name, off, 2, cl1, cl2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) -#define DEFINE_RTTI_DATA3(name, off, cl1, cl2, cl3, mangled_name) \ - DEFINE_RTTI_DATA(name, off, 3, cl1, cl2, cl3, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) -#define DEFINE_RTTI_DATA4(name, off, cl1, cl2, cl3, cl4, mangled_name) \ - DEFINE_RTTI_DATA(name, off, 4, cl1, cl2, cl3, cl4, NULL, NULL, NULL, NULL, NULL, mangled_name) -#define DEFINE_RTTI_DATA8(name, off, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, mangled_name) \ - DEFINE_RTTI_DATA(name, off, 8, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, NULL, mangled_name) -#define DEFINE_RTTI_DATA9(name, off, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ - DEFINE_RTTI_DATA(name, off, 9, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) - -#define DEFINE_CXX_DATA0(name, dtor) \ - DEFINE_CXX_DATA(name, 0, NULL, NULL, dtor) -#define DEFINE_CXX_DATA1(name, cl1, dtor) \ - DEFINE_CXX_DATA(name, 1, cl1, NULL, dtor) -#define DEFINE_CXX_DATA2(name, cl1, cl2, dtor) \ - DEFINE_CXX_DATA(name, 2, cl1, cl2, dtor) - -#ifdef __i386__ - -#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args - -extern void *vtbl_wrapper_0; -extern void *vtbl_wrapper_4; -extern void *vtbl_wrapper_8; -extern void *vtbl_wrapper_12; -extern void *vtbl_wrapper_16; -extern void *vtbl_wrapper_20; -extern void *vtbl_wrapper_24; -extern void *vtbl_wrapper_28; -extern void *vtbl_wrapper_32; -extern void *vtbl_wrapper_36; -extern void *vtbl_wrapper_40; -extern void *vtbl_wrapper_44; -extern void *vtbl_wrapper_48; -extern void *vtbl_wrapper_52; -extern void *vtbl_wrapper_56; - -#else - -#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (__cdecl***)type)this)[0][off/4]args - -#endif - -/* exception object */ -typedef void (*vtable_ptr)(void); -typedef struct __exception -{ - const vtable_ptr *vtable; - char *name; /* Name of this exception, always a new copy for each object */ - int do_free; /* Whether to free 'name' in our dtor */ -} exception; - -/* Internal: throws selected exception */ -typedef enum __exception_type { - EXCEPTION_RERAISE, - EXCEPTION, - EXCEPTION_BAD_ALLOC, - EXCEPTION_LOGIC_ERROR, - EXCEPTION_LENGTH_ERROR, - EXCEPTION_OUT_OF_RANGE, - EXCEPTION_INVALID_ARGUMENT, - EXCEPTION_RUNTIME_ERROR, - EXCEPTION_FAILURE, -} exception_type; -void throw_exception(exception_type, const char *); - -/* rtti */ -typedef struct __type_info -{ - const vtable_ptr *vtable; - char *name; /* Unmangled name, allocated lazily */ - char mangled[128]; /* Variable length, but we declare it large enough for static RTTI */ -} type_info; - -extern const vtable_ptr MSVCP_type_info_vtable; - -/* offsets for computing the this pointer */ -typedef struct -{ - int this_offset; /* offset of base class this pointer from start of object */ - int vbase_descr; /* offset of virtual base class descriptor */ - int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */ -} this_ptr_offsets; - -/* dlls/msvcrt/cppexcept.h */ -typedef void (*cxx_copy_ctor)(void); - -#ifndef __x86_64__ - -typedef struct _rtti_base_descriptor -{ - const type_info *type_descriptor; - int num_base_classes; - this_ptr_offsets offsets; /* offsets for computing the this pointer */ - unsigned int attributes; -} rtti_base_descriptor; - -typedef struct _rtti_base_array -{ - const rtti_base_descriptor *bases[10]; /* First element is the class itself */ -} rtti_base_array; - -typedef struct _rtti_object_hierarchy -{ - unsigned int signature; - unsigned int attributes; - int array_len; /* Size of the array pointed to by 'base_classes' */ - const rtti_base_array *base_classes; -} rtti_object_hierarchy; - -typedef struct _rtti_object_locator -{ - unsigned int signature; - int base_class_offset; - unsigned int flags; - const type_info *type_descriptor; - const rtti_object_hierarchy *type_hierarchy; -} rtti_object_locator; - -typedef struct -{ - UINT flags; - const type_info *type_info; - this_ptr_offsets offsets; - unsigned int size; - cxx_copy_ctor copy_ctor; -} cxx_type_info; - -typedef struct -{ - UINT count; - const cxx_type_info *info[3]; -} cxx_type_info_table; - -typedef struct -{ - UINT flags; - void (*destructor)(void); - void* /*cxx_exc_custom_handler*/ custom_handler; - const cxx_type_info_table *type_info_table; -} cxx_exception_type; - -#else - -typedef struct -{ - unsigned int type_descriptor; - int num_base_classes; - this_ptr_offsets offsets; /* offsets for computing the this pointer */ - unsigned int attributes; -} rtti_base_descriptor; - -typedef struct -{ - unsigned int bases[10]; /* First element is the class itself */ -} rtti_base_array; - -typedef struct -{ - unsigned int signature; - unsigned int attributes; - int array_len; /* Size of the array pointed to by 'base_classes' */ - unsigned int base_classes; -} rtti_object_hierarchy; - -typedef struct -{ - unsigned int signature; - int base_class_offset; - unsigned int flags; - unsigned int type_descriptor; - unsigned int type_hierarchy; - unsigned int object_locator; -} rtti_object_locator; - -typedef struct -{ - UINT flags; - unsigned int type_info; - this_ptr_offsets offsets; - unsigned int size; - unsigned int copy_ctor; -} cxx_type_info; - -typedef struct -{ - UINT count; - unsigned int info[3]; -} cxx_type_info_table; - -typedef struct -{ - UINT flags; - unsigned int destructor; - unsigned int custom_handler; - unsigned int type_info_table; -} cxx_exception_type; - -#endif diff --git a/dlls/msvcp80/exception.c b/dlls/msvcp80/exception.c deleted file mode 100644 index 1f4ffd2eed2..00000000000 --- a/dlls/msvcp80/exception.c +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Copyright 2010 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include - -#include "msvcp.h" - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(msvcp); - -#define CLASS_IS_SIMPLE_TYPE 1 -#define CLASS_HAS_VIRTUAL_BASE_CLASS 4 - -void WINAPI _CxxThrowException(exception*,const cxx_exception_type*); - -/* vtables */ -extern const vtable_ptr MSVCP_exception_vtable; -extern const vtable_ptr MSVCP_bad_alloc_vtable; -extern const vtable_ptr MSVCP_logic_error_vtable; -extern const vtable_ptr MSVCP_length_error_vtable; -extern const vtable_ptr MSVCP_out_of_range_vtable; -extern const vtable_ptr MSVCP_invalid_argument_vtable; -extern const vtable_ptr MSVCP_runtime_error_vtable; -extern const vtable_ptr MSVCP_failure_vtable; - -static void MSVCP_type_info_dtor(type_info * _this) -{ - free(_this->name); -} - -/* Unexported */ -DEFINE_THISCALL_WRAPPER(MSVCP_type_info_vector_dtor,8) -void * __thiscall MSVCP_type_info_vector_dtor(type_info * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCP_type_info_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCP_type_info_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - -DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" ) - -static exception* MSVCP_exception_ctor(exception *this, const char **name) -{ - TRACE("(%p %s)\n", this, *name); - - this->vtable = &MSVCP_exception_vtable; - if(*name) { - unsigned int name_len = strlen(*name) + 1; - this->name = malloc(name_len); - memcpy(this->name, *name, name_len); - this->do_free = TRUE; - } else { - this->name = NULL; - this->do_free = FALSE; - } - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_exception_copy_ctor,8) -exception* __thiscall MSVCP_exception_copy_ctor(exception *this, const exception *rhs) -{ - TRACE("(%p,%p)\n", this, rhs); - - if(!rhs->do_free) { - this->vtable = &MSVCP_exception_vtable; - this->name = rhs->name; - this->do_free = FALSE; - } else - MSVCP_exception_ctor(this, (const char**)&rhs->name); - TRACE("name = %s\n", this->name); - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_exception_dtor,4) -void __thiscall MSVCP_exception_dtor(exception *this) -{ - TRACE("(%p)\n", this); - this->vtable = &MSVCP_exception_vtable; - if(this->do_free) - free(this->name); -} - -DEFINE_THISCALL_WRAPPER(MSVCP_exception_vector_dtor, 8) -void * __thiscall MSVCP_exception_vector_dtor(exception *this, unsigned int flags) -{ - TRACE("%p %x\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - MSVCP_exception_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - MSVCP_exception_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -DEFINE_RTTI_DATA0(exception, 0, ".?AVexception@std@@") -DEFINE_CXX_DATA0(exception, MSVCP_exception_dtor) - -/* bad_alloc class data */ -typedef exception bad_alloc; - -static bad_alloc* MSVCP_bad_alloc_ctor(bad_alloc *this, const char **name) -{ - TRACE("%p %s\n", this, *name); - MSVCP_exception_ctor(this, name); - this->vtable = &MSVCP_bad_alloc_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_bad_alloc_copy_ctor, 8) -bad_alloc* __thiscall MSVCP_bad_alloc_copy_ctor(bad_alloc *this, const bad_alloc *rhs) -{ - TRACE("%p %p\n", this, rhs); - MSVCP_exception_copy_ctor(this, rhs); - this->vtable = &MSVCP_bad_alloc_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_bad_alloc_dtor, 4) -void __thiscall MSVCP_bad_alloc_dtor(bad_alloc *this) -{ - TRACE("%p\n", this); - MSVCP_exception_dtor(this); -} - -DEFINE_THISCALL_WRAPPER(MSVCP_bad_alloc_vector_dtor, 8) -void * __thiscall MSVCP_bad_alloc_vector_dtor(bad_alloc *this, unsigned int flags) -{ - TRACE("%p %x\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - MSVCP_bad_alloc_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - MSVCP_bad_alloc_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_what_exception,4) -const char* __thiscall MSVCP_what_exception(exception * this) -{ - TRACE("(%p) returning %s\n", this, this->name); - return this->name ? this->name : "Unknown exception"; -} - -DEFINE_RTTI_DATA1(bad_alloc, 0, &exception_rtti_base_descriptor, ".?AVbad_alloc@std@@") -DEFINE_CXX_DATA1(bad_alloc, &exception_cxx_type_info, MSVCP_bad_alloc_dtor) - -/* logic_error class data */ -typedef struct _logic_error { - exception e; - basic_string_char str; -} logic_error; - -static logic_error* MSVCP_logic_error_ctor( - logic_error *this, const char **name) -{ - TRACE("%p %s\n", this, *name); - this->e.vtable = &MSVCP_logic_error_vtable; - this->e.name = NULL; - this->e.do_free = FALSE; - MSVCP_basic_string_char_ctor_cstr(&this->str, *name); - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_logic_error_copy_ctor, 8) -logic_error* __thiscall MSVCP_logic_error_copy_ctor( - logic_error *this, logic_error *rhs) -{ - TRACE("%p %p\n", this, rhs); - MSVCP_exception_copy_ctor(&this->e, &rhs->e); - MSVCP_basic_string_char_copy_ctor(&this->str, &rhs->str); - this->e.vtable = &MSVCP_logic_error_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_logic_error_dtor, 4) -void __thiscall MSVCP_logic_error_dtor(logic_error *this) -{ - TRACE("%p\n", this); - MSVCP_exception_dtor(&this->e); - MSVCP_basic_string_char_dtor(&this->str); -} - -DEFINE_THISCALL_WRAPPER(MSVCP_logic_error_vector_dtor, 8) -void* __thiscall MSVCP_logic_error_vector_dtor( - logic_error *this, unsigned int flags) -{ - TRACE("%p %x\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - MSVCP_logic_error_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - MSVCP_logic_error_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_logic_error_what, 4) -const char* __thiscall MSVCP_logic_error_what(logic_error *this) -{ - TRACE("%p\n", this); - return MSVCP_basic_string_char_c_str(&this->str); -} - -DEFINE_RTTI_DATA1(logic_error, 0, &exception_rtti_base_descriptor, ".?AVlogic_error@std@@") -DEFINE_CXX_DATA1(logic_error, &exception_cxx_type_info, MSVCP_logic_error_dtor) - -/* length_error class data */ -typedef logic_error length_error; - -static length_error* MSVCP_length_error_ctor( - length_error *this, const char **name) -{ - TRACE("%p %s\n", this, *name); - MSVCP_logic_error_ctor(this, name); - this->e.vtable = &MSVCP_length_error_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_length_error_copy_ctor, 8) -length_error* __thiscall MSVCP_length_error_copy_ctor( - length_error *this, length_error *rhs) -{ - TRACE("%p %p\n", this, rhs); - MSVCP_logic_error_copy_ctor(this, rhs); - this->e.vtable = &MSVCP_length_error_vtable; - return this; -} - -DEFINE_RTTI_DATA2(length_error, 0, &logic_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVlength_error@std@@") -DEFINE_CXX_DATA2(length_error, &logic_error_cxx_type_info, &exception_cxx_type_info, MSVCP_logic_error_dtor) - -/* out_of_range class data */ -typedef logic_error out_of_range; - -static out_of_range* MSVCP_out_of_range_ctor( - out_of_range *this, const char **name) -{ - TRACE("%p %s\n", this, *name); - MSVCP_logic_error_ctor(this, name); - this->e.vtable = &MSVCP_out_of_range_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_out_of_range_copy_ctor, 8) -out_of_range* __thiscall MSVCP_out_of_range_copy_ctor( - out_of_range *this, out_of_range *rhs) -{ - TRACE("%p %p\n", this, rhs); - MSVCP_logic_error_copy_ctor(this, rhs); - this->e.vtable = &MSVCP_out_of_range_vtable; - return this; -} - -DEFINE_RTTI_DATA2(out_of_range, 0, &logic_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVout_of_range@std@@") -DEFINE_CXX_DATA2(out_of_range, &logic_error_cxx_type_info, &exception_cxx_type_info, MSVCP_logic_error_dtor) - -/* invalid_argument class data */ -typedef logic_error invalid_argument; - -static invalid_argument* MSVCP_invalid_argument_ctor( - invalid_argument *this, const char **name) -{ - TRACE("%p %s\n", this, *name); - MSVCP_logic_error_ctor(this, name); - this->e.vtable = &MSVCP_invalid_argument_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_invalid_argument_copy_ctor, 8) -invalid_argument* __thiscall MSVCP_invalid_argument_copy_ctor( - invalid_argument *this, invalid_argument *rhs) -{ - TRACE("%p %p\n", this, rhs); - MSVCP_logic_error_copy_ctor(this, rhs); - this->e.vtable = &MSVCP_invalid_argument_vtable; - return this; -} - -DEFINE_RTTI_DATA2(invalid_argument, 0, &logic_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVinvalid_argument@std@@") -DEFINE_CXX_DATA2(invalid_argument, &logic_error_cxx_type_info, &exception_cxx_type_info, MSVCP_logic_error_dtor) - -/* runtime_error class data */ -typedef struct { - exception e; - basic_string_char str; -} runtime_error; - -static runtime_error* MSVCP_runtime_error_ctor( - runtime_error *this, const char **name) -{ - TRACE("%p %s\n", this, *name); - this->e.vtable = &MSVCP_runtime_error_vtable; - this->e.name = NULL; - this->e.do_free = FALSE; - MSVCP_basic_string_char_ctor_cstr(&this->str, *name); - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_runtime_error_copy_ctor, 8) -runtime_error* __thiscall MSVCP_runtime_error_copy_ctor( - runtime_error *this, runtime_error *rhs) -{ - TRACE("%p %p\n", this, rhs); - MSVCP_exception_copy_ctor(&this->e, &rhs->e); - MSVCP_basic_string_char_copy_ctor(&this->str, &rhs->str); - this->e.vtable = &MSVCP_runtime_error_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_runtime_error_dtor, 4) -void __thiscall MSVCP_runtime_error_dtor(runtime_error *this) -{ - TRACE("%p\n", this); - MSVCP_exception_dtor(&this->e); - MSVCP_basic_string_char_dtor(&this->str); -} - -DEFINE_THISCALL_WRAPPER(MSVCP_runtime_error_vector_dtor, 8) -void* __thiscall MSVCP_runtime_error_vector_dtor( - runtime_error *this, unsigned int flags) -{ - TRACE("%p %x\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - MSVCP_runtime_error_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - MSVCP_runtime_error_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_runtime_error_what, 4) -const char* __thiscall MSVCP_runtime_error_what(runtime_error *this) -{ - TRACE("%p\n", this); - return MSVCP_basic_string_char_c_str(&this->str); -} - -DEFINE_RTTI_DATA1(runtime_error, 0, &exception_rtti_base_descriptor, ".?AVruntime_error@std@@") -DEFINE_CXX_DATA1(runtime_error, &exception_cxx_type_info, MSVCP_runtime_error_dtor) - -/* failure class data */ -typedef runtime_error failure; - -static failure* MSVCP_failure_ctor( - failure *this, const char **name) -{ - TRACE("%p %s\n", this, *name); - MSVCP_runtime_error_ctor(this, name); - this->e.vtable = &MSVCP_failure_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_failure_copy_ctor, 8) -failure* __thiscall MSVCP_failure_copy_ctor( - failure *this, failure *rhs) -{ - TRACE("%p %p\n", this, rhs); - MSVCP_runtime_error_copy_ctor(this, rhs); - this->e.vtable = &MSVCP_failure_vtable; - return this; -} - -DEFINE_THISCALL_WRAPPER(MSVCP_failure_dtor, 4) -void __thiscall MSVCP_failure_dtor(failure *this) -{ - TRACE("%p\n", this); - MSVCP_runtime_error_dtor(this); -} - -DEFINE_THISCALL_WRAPPER(MSVCP_failure_vector_dtor, 8) -void* __thiscall MSVCP_failure_vector_dtor( - failure *this, unsigned int flags) -{ - TRACE("%p %x\n", this, flags); - return MSVCP_runtime_error_vector_dtor(this, flags); -} - -DEFINE_THISCALL_WRAPPER(MSVCP_failure_what, 4) -const char* __thiscall MSVCP_failure_what(failure *this) -{ - TRACE("%p\n", this); - return MSVCP_runtime_error_what(this); -} - -DEFINE_RTTI_DATA2(failure, 0, &runtime_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVfailure@std@@") -DEFINE_CXX_DATA2(failure, &runtime_error_cxx_type_info, &exception_cxx_type_info, MSVCP_runtime_error_dtor) - -/* ?_Nomemory@std@@YAXXZ */ -void __cdecl _Nomemory(void) -{ - TRACE("()\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); -} - -#ifndef __GNUC__ -void __asm_dummy_vtables(void) { -#endif - __ASM_VTABLE(type_info, - VTABLE_ADD_FUNC(MSVCP_type_info_vector_dtor)); - __ASM_VTABLE(exception, - VTABLE_ADD_FUNC(MSVCP_exception_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_what_exception)); - __ASM_VTABLE(bad_alloc, - VTABLE_ADD_FUNC(MSVCP_bad_alloc_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_what_exception)); - __ASM_VTABLE(logic_error, - VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_logic_error_what)); - __ASM_VTABLE(length_error, - VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_logic_error_what)); - __ASM_VTABLE(out_of_range, - VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_logic_error_what)); - __ASM_VTABLE(invalid_argument, - VTABLE_ADD_FUNC(MSVCP_logic_error_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_logic_error_what)); - __ASM_VTABLE(runtime_error, - VTABLE_ADD_FUNC(MSVCP_runtime_error_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_runtime_error_what)); - __ASM_VTABLE(failure, - VTABLE_ADD_FUNC(MSVCP_failure_vector_dtor) - VTABLE_ADD_FUNC(MSVCP_failure_what)); -#ifndef __GNUC__ -} -#endif - -/* Internal: throws selected exception */ -void throw_exception(exception_type et, const char *str) -{ - const char *addr = str; - - switch(et) { - case EXCEPTION_RERAISE: - _CxxThrowException(NULL, NULL); - case EXCEPTION: { - exception e; - MSVCP_exception_ctor(&e, &addr); - _CxxThrowException(&e, &exception_cxx_type); - } - case EXCEPTION_BAD_ALLOC: { - bad_alloc e; - MSVCP_bad_alloc_ctor(&e, &addr); - _CxxThrowException(&e, &bad_alloc_cxx_type); - } - case EXCEPTION_LOGIC_ERROR: { - logic_error e; - MSVCP_logic_error_ctor(&e, &addr); - _CxxThrowException((exception*)&e, &logic_error_cxx_type); - } - case EXCEPTION_LENGTH_ERROR: { - length_error e; - MSVCP_length_error_ctor(&e, &addr); - _CxxThrowException((exception*)&e, &length_error_cxx_type); - } - case EXCEPTION_OUT_OF_RANGE: { - out_of_range e; - MSVCP_out_of_range_ctor(&e, &addr); - _CxxThrowException((exception*)&e, &out_of_range_cxx_type); - } - case EXCEPTION_INVALID_ARGUMENT: { - invalid_argument e; - MSVCP_invalid_argument_ctor(&e, &addr); - _CxxThrowException((exception*)&e, &invalid_argument_cxx_type); - } - case EXCEPTION_RUNTIME_ERROR: { - runtime_error e; - MSVCP_runtime_error_ctor(&e, &addr); - _CxxThrowException((exception*)&e, &runtime_error_cxx_type); - } - case EXCEPTION_FAILURE: { - failure e; - MSVCP_failure_ctor(&e, &addr); - _CxxThrowException((exception*)&e, &failure_cxx_type); - } - } -} - -void init_exception(void *base) -{ -#ifdef __x86_64__ - init_type_info_rtti(base); - init_exception_rtti(base); - init_bad_alloc_rtti(base); - init_logic_error_rtti(base); - init_length_error_rtti(base); - init_out_of_range_rtti(base); - init_invalid_argument_rtti(base); - init_runtime_error_rtti(base); - init_failure_rtti(base); - - init_exception_cxx(base); - init_bad_alloc_cxx(base); - init_logic_error_cxx(base); - init_length_error_cxx(base); - init_out_of_range_cxx(base); - init_invalid_argument_cxx(base); - init_runtime_error_cxx(base); - init_failure_cxx(base); -#endif -} diff --git a/dlls/msvcp80/ios.c b/dlls/msvcp80/ios.c deleted file mode 100644 index 3fe65bd4e48..00000000000 --- a/dlls/msvcp80/ios.c +++ /dev/null @@ -1,13327 +0,0 @@ -/* - * Copyright 2011 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include -#include -#include -#include - -#include "msvcp.h" -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(msvcp); - -/* ?_Index@ios_base@std@@0HA */ -int ios_base_Index = 0; -/* ?_Sync@ios_base@std@@0_NA */ -MSVCP_bool ios_base_Sync = FALSE; - -typedef struct { - streamoff off; - __int64 DECLSPEC_ALIGN(8) pos; - int state; -} fpos_int; - -static inline const char* debugstr_fpos_int(fpos_int *fpos) -{ - return wine_dbg_sprintf("fpos(%ld %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state); -} - -typedef struct { - void (__cdecl *pfunc)(ios_base*, streamsize); - streamsize arg; -} manip_streamsize; - -typedef struct { - void (__cdecl *pfunc)(ios_base*, int); - int arg; -} manip_int; - -typedef enum { - INITFL_new = 0, - INITFL_open = 1, - INITFL_close = 2 -} basic_filebuf__Initfl; - -typedef struct { - basic_streambuf_char base; - codecvt_char *cvt; - char putback; - MSVCP_bool wrotesome; - int state; - MSVCP_bool close; - FILE *file; -} basic_filebuf_char; - -typedef struct { - basic_streambuf_wchar base; - codecvt_wchar *cvt; - wchar_t putback; - MSVCP_bool wrotesome; - int state; - MSVCP_bool close; - FILE *file; -} basic_filebuf_wchar; - -typedef enum { - STRINGBUF_allocated = 1, - STRINGBUF_no_write = 2, - STRINGBUF_no_read = 4, - STRINGBUF_append = 8, - STRINGBUF_at_end = 16 -} basic_stringbuf_state; - -typedef struct { - basic_streambuf_char base; - char *seekhigh; - int state; - char allocator; /* empty struct */ -} basic_stringbuf_char; - -typedef struct { - basic_streambuf_wchar base; - wchar_t *seekhigh; - int state; - char allocator; /* empty struct */ -} basic_stringbuf_wchar; - -typedef struct { - ios_base base; - basic_streambuf_char *strbuf; - struct _basic_ostream_char *stream; - char fillch; -} basic_ios_char; - -typedef struct { - ios_base base; - basic_streambuf_wchar *strbuf; - struct _basic_ostream_wchar *stream; - wchar_t fillch; -} basic_ios_wchar; - -typedef struct _basic_ostream_char { - const int *vbtable; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_ostream_char; - -typedef struct _basic_ostream_wchar { - const int *vbtable; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_ostream_wchar; - -typedef struct { - const int *vbtable; - streamsize count; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_istream_char; - -typedef struct { - const int *vbtable; - streamsize count; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_istream_wchar; - -typedef struct { - basic_istream_char base1; - basic_ostream_char base2; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_iostream_char; - -typedef struct { - basic_istream_wchar base1; - basic_ostream_wchar base2; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_iostream_wchar; - -typedef struct { - basic_ostream_char base; - basic_filebuf_char filebuf; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_ofstream_char; - -typedef struct { - basic_ostream_wchar base; - basic_filebuf_wchar filebuf; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_ofstream_wchar; - -typedef struct { - basic_istream_char base; - basic_filebuf_char filebuf; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_ifstream_char; - -typedef struct { - basic_istream_wchar base; - basic_filebuf_wchar filebuf; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_ifstream_wchar; - -typedef struct { - basic_iostream_char base; - basic_filebuf_char filebuf; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_fstream_char; - -typedef struct { - basic_iostream_wchar base; - basic_filebuf_wchar filebuf; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_fstream_wchar; - -typedef struct { - basic_ostream_char base; - basic_stringbuf_char strbuf; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_ostringstream_char; - -typedef struct { - basic_ostream_wchar base; - basic_stringbuf_wchar strbuf; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_ostringstream_wchar; - -typedef struct { - basic_istream_char base; - basic_stringbuf_char strbuf; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_istringstream_char; - -typedef struct { - basic_istream_wchar base; - basic_stringbuf_wchar strbuf; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_istringstream_wchar; - -typedef struct { - basic_iostream_char base; - basic_stringbuf_char strbuf; - /* virtual inheritance - * basic_ios_char basic_ios; - */ -} basic_stringstream_char; - -typedef struct { - basic_iostream_wchar base; - basic_stringbuf_wchar strbuf; - /* virtual inheritance - * basic_ios_wchar basic_ios; - */ -} basic_stringstream_wchar; - -typedef enum { - STRSTATE_Allocated = 1, - STRSTATE_Constant = 2, - STRSTATE_Dynamic = 4, - STRSTATE_Frozen = 8 -} strstreambuf__Strstate; - -typedef struct { - basic_streambuf_char base; - streamsize minsize; - char *endsave; - char *seekhigh; - int strmode; - void* (__cdecl *palloc)(MSVCP_size_t); - void (__cdecl *pfree)(void*); -} strstreambuf; - -extern const vtable_ptr MSVCP_iosb_vtable; - -/* ??_7ios_base@std@@6B@ */ -extern const vtable_ptr MSVCP_ios_base_vtable; - -/* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ios_char_vtable; - -/* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ios_wchar_vtable; - -/* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ios_short_vtable; - -/* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_streambuf_char_vtable; - -/* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable; - -/* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_streambuf_short_vtable; - -/* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_filebuf_char_vtable; - -/* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable; - -/* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_filebuf_short_vtable; - -/* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable; - -/* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable; - -/* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable; - -/* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */ -const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)}; -/* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ostream_char_vtable; - -/* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */ -const int basic_ostream_wchar_vbtable[] = {0, sizeof(basic_ostream_wchar)}; -/* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable; - -/* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */ -const int basic_ostream_short_vbtable[] = {0, sizeof(basic_ostream_wchar)}; -/* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ostream_short_vtable; - -/* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */ -const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)}; -/* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_istream_char_vtable; - -/* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */ -const int basic_istream_wchar_vbtable[] = {0, sizeof(basic_istream_wchar)}; -/* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_istream_wchar_vtable; - -/* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */ -const int basic_istream_short_vbtable[] = {0, sizeof(basic_istream_wchar)}; -/* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_istream_short_vtable; - -/* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */ -const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)}; -/* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */ -const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)}; -/* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_iostream_char_vtable; - -/* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */ -/* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */ -const int basic_iostream_wchar_vbtable1[] = {0, sizeof(basic_iostream_wchar)}; -/* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */ -/* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */ -const int basic_iostream_wchar_vbtable2[] = {0, sizeof(basic_iostream_wchar)-FIELD_OFFSET(basic_iostream_wchar, base2)}; -/* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable; -/* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_iostream_short_vtable; - -/* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */ -const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)}; -/* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ofstream_char_vtable; - -/* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */ -const int basic_ofstream_wchar_vbtable[] = {0, sizeof(basic_ofstream_wchar)}; -/* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable; - -/* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */ -const int basic_ofstream_short_vbtable[] = {0, sizeof(basic_ofstream_wchar)}; -/* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ofstream_short_vtable; - -/* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */ -const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)}; -/* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ifstream_char_vtable; - -/* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */ -const int basic_ifstream_wchar_vbtable[] = {0, sizeof(basic_ifstream_wchar)}; -/* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable; - -/* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */ -const int basic_ifstream_short_vbtable[] = {0, sizeof(basic_ifstream_wchar)}; -/* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ifstream_short_vtable; - -/* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */ -const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)}; -/* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */ -const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)}; -/* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_fstream_char_vtable; - -/* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */ -/* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */ -const int basic_fstream_wchar_vbtable1[] = {0, sizeof(basic_fstream_wchar)}; -/* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */ -/* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */ -const int basic_fstream_wchar_vbtable2[] = {0, sizeof(basic_fstream_wchar)-FIELD_OFFSET(basic_fstream_wchar, base.base2)}; -/* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable; -/* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_fstream_short_vtable; - -/* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */ -const int basic_ostringstream_char_vbtable[] = {0, sizeof(basic_ostringstream_char)}; -/* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable; - -/* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */ -const int basic_ostringstream_wchar_vbtable[] = {0, sizeof(basic_ostringstream_wchar)}; -/* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable; - -/* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */ -const int basic_ostringstream_short_vbtable[] = {0, sizeof(basic_ostringstream_wchar)}; -/* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable; - -/* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */ -const int basic_istringstream_char_vbtable[] = {0, sizeof(basic_istringstream_char)}; -/* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_istringstream_char_vtable; - -/* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */ -const int basic_istringstream_wchar_vbtable[] = {0, sizeof(basic_istringstream_wchar)}; -/* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable; - -/* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */ -const int basic_istringstream_short_vbtable[] = {0, sizeof(basic_istringstream_wchar)}; -/* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_istringstream_short_vtable; - -/* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */ -const int basic_stringstream_char_vbtable1[] = {0, sizeof(basic_stringstream_char)}; -/* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */ -const int basic_stringstream_char_vbtable2[] = {0, sizeof(basic_stringstream_char)-FIELD_OFFSET(basic_stringstream_char, base.base2)}; -/* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_stringstream_char_vtable; - -/* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */ -const int basic_stringstream_wchar_vbtable1[] = {0, sizeof(basic_stringstream_wchar)}; -/* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */ -const int basic_stringstream_wchar_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)}; -/* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable; - -/* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */ -const int basic_stringstream_short_vbtable1[] = {0, sizeof(basic_stringstream_wchar)}; -/* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */ -const int basic_stringstream_short_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)}; -/* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */ -extern const vtable_ptr MSVCP_basic_stringstream_short_vtable; - -/* ??_7strstreambuf@std@@6B */ -extern const vtable_ptr MSVCP_strstreambuf_vtable; - -DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@") -DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@") -DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA0(basic_streambuf_char, 0, - ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0, - ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA0(basic_streambuf_short, 0, - ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor, - ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA1(basic_filebuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor, - ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA1(basic_filebuf_short, 0, &basic_streambuf_short_rtti_base_descriptor, - ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA1(basic_stringbuf_char, 0, &basic_streambuf_char_rtti_base_descriptor, - ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@") -DEFINE_RTTI_DATA1(basic_stringbuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor, - ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@") -DEFINE_RTTI_DATA1(basic_stringbuf_short, 0, &basic_streambuf_short_rtti_base_descriptor, - ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@") -DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA3(basic_ostream_wchar, sizeof(basic_ostream_wchar), &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA3(basic_ostream_short, sizeof(basic_ostream_wchar), &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA3(basic_istream_wchar, sizeof(basic_istream_wchar), &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA3(basic_istream_short, sizeof(basic_istream_wchar), &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char), - &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA8(basic_iostream_wchar, sizeof(basic_iostream_wchar), - &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA8(basic_iostream_short, sizeof(basic_iostream_wchar), - &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char), - &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA4(basic_ofstream_wchar, sizeof(basic_ofstream_wchar), - &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA4(basic_ofstream_short, sizeof(basic_ofstream_wchar), - &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char), - &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA4(basic_ifstream_wchar, sizeof(basic_ifstream_wchar), - &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA4(basic_ifstream_short, sizeof(basic_ifstream_wchar), - &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA8(basic_fstream_char, sizeof(basic_fstream_char), - &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@") -DEFINE_RTTI_DATA8(basic_fstream_wchar, sizeof(basic_fstream_wchar), - &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@") -DEFINE_RTTI_DATA8(basic_fstream_short, sizeof(basic_fstream_wchar), - &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@") -DEFINE_RTTI_DATA4(basic_ostringstream_char, sizeof(basic_ostringstream_char), - &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@") -DEFINE_RTTI_DATA4(basic_ostringstream_wchar, sizeof(basic_ostringstream_wchar), - &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@") -DEFINE_RTTI_DATA4(basic_ostringstream_short, sizeof(basic_ostringstream_wchar), - &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@") -DEFINE_RTTI_DATA4(basic_istringstream_char, sizeof(basic_istringstream_char), - &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@") -DEFINE_RTTI_DATA4(basic_istringstream_wchar, sizeof(basic_istringstream_wchar), - &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@") -DEFINE_RTTI_DATA4(basic_istringstream_short, sizeof(basic_istringstream_wchar), - &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@") -DEFINE_RTTI_DATA8(basic_stringstream_char, sizeof(basic_stringstream_char), - &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@") -DEFINE_RTTI_DATA8(basic_stringstream_wchar, sizeof(basic_stringstream_wchar), - &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@") -DEFINE_RTTI_DATA8(basic_stringstream_short, sizeof(basic_stringstream_wchar), - &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor, - &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor, - ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@") -DEFINE_RTTI_DATA1(strstreambuf, sizeof(strstreambuf), - &basic_streambuf_char_rtti_base_descriptor, ".?AVstrstreambuf@std@@") - -#ifndef __GNUC__ -void __asm_dummy_vtables(void) { -#endif - __ASM_VTABLE(iosb, - VTABLE_ADD_FUNC(iosb_vector_dtor)); - __ASM_VTABLE(ios_base, - VTABLE_ADD_FUNC(ios_base_vector_dtor)); - __ASM_VTABLE(basic_ios_char, - VTABLE_ADD_FUNC(basic_ios_char_vector_dtor)); - __ASM_VTABLE(basic_ios_wchar, - VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor)); - __ASM_VTABLE(basic_ios_short, - VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor)); - __ASM_VTABLE(basic_streambuf_char, - VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor) - VTABLE_ADD_FUNC(basic_streambuf_char_overflow) - VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc) - VTABLE_ADD_FUNC(basic_streambuf_char_underflow) - VTABLE_ADD_FUNC(basic_streambuf_char_uflow) - VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_char_xsputn) - VTABLE_ADD_FUNC(basic_streambuf_char_seekoff) - VTABLE_ADD_FUNC(basic_streambuf_char_seekpos) - VTABLE_ADD_FUNC(basic_streambuf_char_setbuf) - VTABLE_ADD_FUNC(basic_streambuf_char_sync) - VTABLE_ADD_FUNC(basic_streambuf_char_imbue)); - __ASM_VTABLE(basic_streambuf_wchar, - VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor) - VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc) - VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn) - VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff) - VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos) - VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf) - VTABLE_ADD_FUNC(basic_streambuf_wchar_sync) - VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue)); - __ASM_VTABLE(basic_streambuf_short, - VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor) - VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc) - VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn) - VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff) - VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos) - VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf) - VTABLE_ADD_FUNC(basic_streambuf_wchar_sync) - VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue)); - __ASM_VTABLE(basic_filebuf_char, - VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor) - VTABLE_ADD_FUNC(basic_filebuf_char_overflow) - VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc) - VTABLE_ADD_FUNC(basic_filebuf_char_underflow) - VTABLE_ADD_FUNC(basic_filebuf_char_uflow) - VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_char_xsputn) - VTABLE_ADD_FUNC(basic_filebuf_char_seekoff) - VTABLE_ADD_FUNC(basic_filebuf_char_seekpos) - VTABLE_ADD_FUNC(basic_filebuf_char_setbuf) - VTABLE_ADD_FUNC(basic_filebuf_char_sync) - VTABLE_ADD_FUNC(basic_filebuf_char_imbue)); - __ASM_VTABLE(basic_filebuf_wchar, - VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor) - VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow) - VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc) - VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow) - VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn) - VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff) - VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos) - VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf) - VTABLE_ADD_FUNC(basic_filebuf_wchar_sync) - VTABLE_ADD_FUNC(basic_filebuf_wchar_imbue)); - __ASM_VTABLE(basic_filebuf_short, - VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor) - VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow) - VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc) - VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow) - VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn) - VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff) - VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos) - VTABLE_ADD_FUNC(basic_filebuf_short_setbuf) - VTABLE_ADD_FUNC(basic_filebuf_wchar_sync) - VTABLE_ADD_FUNC(basic_filebuf_short_imbue)); - __ASM_VTABLE(basic_stringbuf_char, - VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor) - VTABLE_ADD_FUNC(basic_stringbuf_char_overflow) - VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc) - VTABLE_ADD_FUNC(basic_stringbuf_char_underflow) - VTABLE_ADD_FUNC(basic_streambuf_char_uflow) - VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_char_xsputn) - VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff) - VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos) - VTABLE_ADD_FUNC(basic_streambuf_char_setbuf) - VTABLE_ADD_FUNC(basic_streambuf_char_sync) - VTABLE_ADD_FUNC(basic_streambuf_char_imbue)); - __ASM_VTABLE(basic_stringbuf_wchar, - VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos) - VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf) - VTABLE_ADD_FUNC(basic_streambuf_wchar_sync) - VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue)); - __ASM_VTABLE(basic_stringbuf_short, - VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff) - VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos) - VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf) - VTABLE_ADD_FUNC(basic_streambuf_wchar_sync) - VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue)); - __ASM_VTABLE(basic_ostream_char, - VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor)); - __ASM_VTABLE(basic_ostream_wchar, - VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor)); - __ASM_VTABLE(basic_ostream_short, - VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor)); - __ASM_VTABLE(basic_istream_char, - VTABLE_ADD_FUNC(basic_istream_char_vector_dtor)); - __ASM_VTABLE(basic_istream_wchar, - VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor)); - __ASM_VTABLE(basic_istream_short, - VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor)); - __ASM_VTABLE(basic_iostream_char, - VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor)); - __ASM_VTABLE(basic_iostream_wchar, - VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor)); - __ASM_VTABLE(basic_iostream_short, - VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor)); - __ASM_VTABLE(basic_ofstream_char, - VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor)); - __ASM_VTABLE(basic_ofstream_wchar, - VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_ofstream_short, - VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_ifstream_char, - VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor)); - __ASM_VTABLE(basic_ifstream_wchar, - VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_ifstream_short, - VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_fstream_char, - VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor)); - __ASM_VTABLE(basic_fstream_wchar, - VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_fstream_short, - VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_ostringstream_char, - VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor)); - __ASM_VTABLE(basic_ostringstream_wchar, - VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_ostringstream_short, - VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_istringstream_char, - VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor)); - __ASM_VTABLE(basic_istringstream_wchar, - VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_istringstream_short, - VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_stringstream_char, - VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor)); - __ASM_VTABLE(basic_stringstream_wchar, - VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor)); - __ASM_VTABLE(basic_stringstream_short, - VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor)); - __ASM_VTABLE(strstreambuf, - VTABLE_ADD_FUNC(strstreambuf_vector_dtor) - VTABLE_ADD_FUNC(strstreambuf_overflow) - VTABLE_ADD_FUNC(strstreambuf_pbackfail) - VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc) - VTABLE_ADD_FUNC(strstreambuf_underflow) - VTABLE_ADD_FUNC(basic_streambuf_char_uflow) - VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn) - VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s) - VTABLE_ADD_FUNC(basic_streambuf_char_xsputn) - VTABLE_ADD_FUNC(strstreambuf_seekoff) - VTABLE_ADD_FUNC(strstreambuf_seekpos) - VTABLE_ADD_FUNC(basic_streambuf_char_setbuf) - VTABLE_ADD_FUNC(basic_streambuf_char_sync) - VTABLE_ADD_FUNC(basic_streambuf_char_imbue)); -#ifndef __GNUC__ -} -#endif - -/* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */ -/* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16) -void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last) -{ - TRACE("(%p %p %p %p)\n", this, first, next, last); - - this->wbuf = first; - this->wpos = next; - this->wsize = last-next; -} - -/* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */ -/* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12) -void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last) -{ - basic_streambuf_char_setp_next(this, first, first, last); -} - -/* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */ -/* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16) -void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last) -{ - TRACE("(%p %p %p %p)\n", this, first, next, last); - - this->rbuf = first; - this->rpos = next; - this->rsize = last-next; -} - -/* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */ -/* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4) -void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - - this->prbuf = &this->rbuf; - this->pwbuf = &this->wbuf; - this->prpos = &this->rpos; - this->pwpos = &this->wpos; - this->prsize = &this->rsize; - this->pwsize = &this->wsize; - - basic_streambuf_char_setp(this, NULL, NULL); - basic_streambuf_char_setg(this, NULL, NULL, NULL); -} - -/* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8) -basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized) -{ - TRACE("(%p %d)\n", this, uninitialized); - this->vtable = &MSVCP_basic_streambuf_char_vtable; - mutex_ctor(&this->lock); - return this; -} - -/* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */ -/* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4) -basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - - this->vtable = &MSVCP_basic_streambuf_char_vtable; - mutex_ctor(&this->lock); - this->loc = MSVCRT_operator_new(sizeof(locale)); - locale_ctor(this->loc); - basic_streambuf_char__Init_empty(this); - - return this; -} - -/* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4) -void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - - mutex_dtor(&this->lock); - locale_dtor(this->loc); - MSVCRT_operator_delete(this->loc); -} - -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8) -basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_streambuf_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_streambuf_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */ -/* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail, 4) -streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->prpos ? *this->prsize : 0; -} - -/* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ -/* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4) -char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - (*this->prsize)++; - (*this->prpos)--; - return *this->prpos; -} - -/* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ -/* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4) -char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - (*this->prsize)--; - return (*this->prpos)++; -} - -/* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ -/* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc, 4) -char* __thiscall basic_streambuf_char__Gnpreinc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - (*this->prsize)--; - (*this->prpos)++; - return *this->prpos; -} - -/* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */ -/* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28) -void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc) -{ - TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc); - - this->prbuf = gf; - this->pwbuf = pf; - this->prpos = gn; - this->pwpos = pn; - this->prsize = gc; - this->pwsize = pc; -} - -/* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4) -void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - mutex_lock(&this->lock); -} - -/* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */ -/* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail, 4) -streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->pwpos ? *this->pwsize : 0; -} - -/* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ -/* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4) -char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - (*this->pwsize)--; - return (*this->pwpos)++; -} - -/* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */ -/* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4) -#define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \ - int, (basic_streambuf_char*), (this)) -int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return EOF; -} - -/* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */ -/* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4) -#define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \ - int, (basic_streambuf_char*), (this)) -int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this) -{ - int ret; - - TRACE("(%p)\n", this); - - if(call_basic_streambuf_char_underflow(this)==EOF) - return EOF; - - ret = (unsigned char)**this->prpos; - (*this->prsize)--; - (*this->prpos)++; - return ret; -} - -/* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */ -/* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s, 16) -#define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \ - streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count)) -streamsize __thiscall basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count) -{ - streamsize copied, chunk; - int c; - - TRACE("(%p %p %lu %ld)\n", this, ptr, size, count); - - for(copied=0; copied count-copied) - chunk = count-copied; - - if(chunk > 0) { - memcpy_s(ptr+copied, size, *this->prpos, chunk); - *this->prpos += chunk; - *this->prsize -= chunk; - copied += chunk; - size -= chunk; - }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) { - ptr[copied] = c; - copied++; - size--; - }else { - break; - } - } - - return copied; -} - -/* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */ -/* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s, 16) -streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count) -{ - TRACE("(%p %p %lu %ld)\n", this, ptr, size, count); - return call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count); -} - -/* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4) -void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - mutex_unlock(&this->lock); -} - -/* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */ -/* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4) -char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->prbuf; -} - -/* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */ -/* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4) -char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->prpos; -} - -/* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */ -/* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4) -char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->prpos+*this->prsize; -} - -/* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */ -/* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4) -char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->pwpos+*this->pwsize; -} - -/* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */ -/* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8) -void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off) -{ - TRACE("(%p %d)\n", this, off); - *this->prpos += off; - *this->prsize -= off; -} - -/* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */ -/* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8) -locale* __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this, locale *ret) -{ - TRACE("(%p)\n", this); - return locale_copy_ctor(ret, this->loc); -} - -/* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */ -/* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8) -#define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \ - void, (basic_streambuf_char*, const locale*), (this, loc)) -void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); -} - -/* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */ -/* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8) -#define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \ - int, (basic_streambuf_char*, int), (this, ch)) -int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch) -{ - TRACE("(%p %d)\n", this, ch); - return EOF; -} - -/* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */ -/* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8) -#define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \ - int, (basic_streambuf_char*, int), (this, ch)) -int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch) -{ - TRACE("(%p %d)\n", this, ch); - return EOF; -} - -/* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */ -/* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4) -char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->pwbuf; -} - -/* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */ -/* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8) -void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off) -{ - TRACE("(%p %d)\n", this, off); - *this->pwpos += off; - *this->pwsize -= off; -} - -/* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */ -/* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4) -char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return *this->pwpos; -} - -/* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */ -/* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12) -locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); - memcpy(ret, this->loc, sizeof(locale)); - call_basic_streambuf_char_imbue(this, loc); - locale_copy_ctor(this->loc, loc); - return ret; -} - -/* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20) -#define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \ - fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode)) -fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - TRACE("(%p %ld %d %d)\n", this, off, way, mode); - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; -} - -/* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */ -/* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 20) -fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - TRACE("(%p %ld %d %d)\n", this, off, way, mode); - return call_basic_streambuf_char_seekoff(this, ret, off, way, mode); -} - -/* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */ -/* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 20) -fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this, - fpos_int *ret, streamoff off, unsigned int way, unsigned int mode) -{ - TRACE("(%p %ld %d %d)\n", this, off, way, mode); - return basic_streambuf_char_pubseekoff(this, ret, off, way, mode); -} - -/* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36) -#define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \ - fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode)) -fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this, - fpos_int *ret, fpos_int pos, int mode) -{ - TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode); - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; -} - -/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */ -/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36) -fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this, - fpos_int *ret, fpos_int pos, int mode) -{ - TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode); - return call_basic_streambuf_char_seekpos(this, ret, pos, mode); -} - -/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */ -/* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old, 36) -fpos_int* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this, - fpos_int *ret, fpos_int pos, unsigned int mode) -{ - TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode); - return basic_streambuf_char_pubseekpos(this, ret, pos, mode); -} - -/* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */ -/* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12) -#define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \ - basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count)) -basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, buf, count); - return this; -} - -/* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */ -/* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12) -basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, buf, count); - return call_basic_streambuf_char_setbuf(this, buf, count); -} - -/* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */ -/* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4) -#define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \ - int, (basic_streambuf_char*), (this)) -int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return 0; -} - -/* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4) -int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return call_basic_streambuf_char_sync(this); -} - -/* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */ -/* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12) -streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, ptr, count); - return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count); -} - -/* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */ -/* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4) -#define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \ - streamsize, (basic_streambuf_char*), (this)) -streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return 0; -} - -/* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4) -streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this) -{ - streamsize ret; - - TRACE("(%p)\n", this); - - ret = basic_streambuf_char__Gnavail(this); - return ret ? ret : call_basic_streambuf_char_showmanyc(this); -} - -/* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */ -/* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8) -int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch) -{ - TRACE("(%p %d)\n", this, ch); - if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) { - (*this->prsize)++; - (*this->prpos)--; - return (unsigned char)ch; - } - - return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch); -} - -/* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */ -/* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8) -int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch) -{ - TRACE("(%p %d)\n", this, ch); - return basic_streambuf_char__Pnavail(this) ? - (unsigned char)(*basic_streambuf_char__Pninc(this) = ch) : - call_basic_streambuf_char_overflow(this, (unsigned char)ch); -} - -/* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4) -int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - if(*this->prpos && *this->prpos>*this->prbuf) { - (*this->prsize)++; - (*this->prpos)--; - return (unsigned char)**this->prpos; - } - - return call_basic_streambuf_char_pbackfail(this, EOF); -} - -/* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4) -void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - if(basic_streambuf_char__Gnavail(this)) - basic_streambuf_char__Gninc(this); - else - call_basic_streambuf_char_uflow(this); -} - -/* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4) -int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return basic_streambuf_char__Gnavail(this) ? - (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this); -} - -/* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4) -int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - return basic_streambuf_char__Gnavail(this) ? - (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this); -} - -/* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4) -int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this) -{ - TRACE("(%p)\n", this); - - if(basic_streambuf_char__Gnavail(this) > 1) - return (unsigned char)*basic_streambuf_char__Gnpreinc(this); - return basic_streambuf_char_sbumpc(this)==EOF ? - EOF : basic_streambuf_char_sgetc(this); -} - -/* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */ -/* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12) -#define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \ - streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count)) -streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, ptr, count); - return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count); -} - -/* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */ -/* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12) -#define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \ - streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count)) -streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count) -{ - streamsize copied, chunk; - - TRACE("(%p %p %ld)\n", this, ptr, count); - - for(copied=0; copied count-copied) - chunk = count-copied; - - if(chunk > 0) { - memcpy(*this->pwpos, ptr+copied, chunk); - *this->pwpos += chunk; - *this->pwsize -= chunk; - copied += chunk; - }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr[copied]) != EOF) { - copied++; - }else { - break; - } - } - - return copied; -} - -/* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */ -/* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12) -streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, ptr, count); - return call_basic_streambuf_char_xsputn(this, ptr, count); -} - -/* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */ -/* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */ -/* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */ -/* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16) -void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last) -{ - TRACE("(%p %p %p %p)\n", this, first, next, last); - - this->wbuf = first; - this->wpos = next; - this->wsize = last-next; -} - -/* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */ -/* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */ -/* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */ -/* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12) -void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last) -{ - basic_streambuf_wchar_setp_next(this, first, first, last); -} - -/* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */ -/* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */ -/* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */ -/* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16) -void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last) -{ - TRACE("(%p %p %p %p)\n", this, first, next, last); - - this->rbuf = first; - this->rpos = next; - this->rsize = last-next; -} - -/* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */ -/* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */ -/* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */ -/* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4) -void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - - this->prbuf = &this->rbuf; - this->pwbuf = &this->wbuf; - this->prpos = &this->rpos; - this->pwpos = &this->wpos; - this->prsize = &this->rsize; - this->pwsize = &this->wsize; - - basic_streambuf_wchar_setp(this, NULL, NULL); - basic_streambuf_wchar_setg(this, NULL, NULL, NULL); -} - -/* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized, 8) -basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized) -{ - TRACE("(%p %d)\n", this, uninitialized); - this->vtable = &MSVCP_basic_streambuf_wchar_vtable; - mutex_ctor(&this->lock); - return this; -} - -/* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8) -basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized) -{ - TRACE("(%p %d)\n", this, uninitialized); - basic_streambuf_wchar_ctor_uninitialized(this, uninitialized); - this->vtable = &MSVCP_basic_streambuf_short_vtable; - return this; -} - -/* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */ -/* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor, 4) -basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - - this->vtable = &MSVCP_basic_streambuf_wchar_vtable; - mutex_ctor(&this->lock); - this->loc = MSVCRT_operator_new(sizeof(locale)); - locale_ctor(this->loc); - basic_streambuf_wchar__Init_empty(this); - - return this; -} - -/* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */ -/* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4) -basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - basic_streambuf_wchar_ctor(this); - this->vtable = &MSVCP_basic_streambuf_short_vtable; - return this; -} - -/* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4) -void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - - mutex_dtor(&this->lock); - locale_dtor(this->loc); - MSVCRT_operator_delete(this->loc); -} - -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8) -basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_streambuf_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_streambuf_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */ -/* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */ -/* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */ -/* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail, 4) -streamsize __thiscall basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->prpos ? *this->prsize : 0; -} - -/* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */ -/* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */ -/* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */ -/* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4) -wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - (*this->prsize)++; - (*this->prpos)--; - return *this->prpos; -} - -/* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */ -/* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */ -/* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */ -/* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4) -wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - (*this->prsize)--; - return (*this->prpos)++; -} - -/* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */ -/* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */ -/* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */ -/* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc, 4) -wchar_t* __thiscall basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - (*this->prsize)--; - (*this->prpos)++; - return *this->prpos; -} - -/* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */ -/* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */ -/* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */ -/* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28) -void __thiscall basic_streambuf_wchar__Init(basic_streambuf_wchar *this, wchar_t **gf, wchar_t **gn, int *gc, wchar_t **pf, wchar_t **pn, int *pc) -{ - TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc); - - this->prbuf = gf; - this->pwbuf = pf; - this->prpos = gn; - this->pwpos = pn; - this->prsize = gc; - this->pwsize = pc; -} - -/* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock, 4) -void __thiscall basic_streambuf_wchar__Lock(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - mutex_lock(&this->lock); -} - -/* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */ -/* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */ -/* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */ -/* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail, 4) -streamsize __thiscall basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->pwpos ? *this->pwsize : 0; -} - -/* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */ -/* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */ -/* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */ -/* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4) -wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - (*this->pwsize)--; - return (*this->pwpos)++; -} - -/* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */ -/* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */ -/* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */ -/* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4) -#define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \ - unsigned short, (basic_streambuf_wchar*), (this)) -unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return WEOF; -} - -/* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */ -/* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */ -/* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */ -/* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4) -#define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \ - unsigned short, (basic_streambuf_wchar*), (this)) -unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this) -{ - int ret; - - TRACE("(%p)\n", this); - - if(call_basic_streambuf_wchar_underflow(this)==WEOF) - return WEOF; - - ret = **this->prpos; - (*this->prsize)--; - (*this->prpos)++; - return ret; -} - -/* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */ -/* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */ -/* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */ -/* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s, 16) -#define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \ - streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count)) -streamsize __thiscall basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count) -{ - streamsize copied, chunk; - unsigned short c; - - TRACE("(%p %p %lu %ld)\n", this, ptr, size, count); - - for(copied=0; copied count-copied) - chunk = count-copied; - - if(chunk > 0) { - memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t)); - *this->prpos += chunk; - *this->prsize -= chunk; - copied += chunk; - size -= chunk*sizeof(wchar_t); - }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) { - ptr[copied] = c; - copied++; - size--; - }else { - break; - } - } - - return copied; -} - -/* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */ -/* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */ -/* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */ -/* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s, 16) -streamsize __thiscall basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count) -{ - TRACE("(%p %p %lu %ld)\n", this, ptr, size, count); - return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count); -} - -/* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock, 4) -void __thiscall basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - mutex_unlock(&this->lock); -} - -/* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */ -/* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */ -/* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */ -/* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4) -wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->prbuf; -} - -/* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */ -/* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */ -/* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */ -/* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4) -wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->prpos; -} - -/* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */ -/* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */ -/* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */ -/* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4) -wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->prpos+*this->prsize; -} - -/* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */ -/* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */ -/* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */ -/* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4) -wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->pwpos+*this->pwsize; -} - -/* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */ -/* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */ -/* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */ -/* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8) -void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off) -{ - TRACE("(%p %d)\n", this, off); - *this->prpos += off; - *this->prsize -= off; -} - -/* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */ -/* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */ -/* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */ -/* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8) -locale* __thiscall basic_streambuf_wchar_getloc(const basic_streambuf_wchar *this, locale *ret) -{ - TRACE("(%p)\n", this); - return locale_copy_ctor(ret, this->loc); -} - -/* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */ -/* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */ -/* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */ -/* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8) -#define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \ - void, (basic_streambuf_wchar*, const locale*), (this, loc)) -void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); -} - -/* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */ -/* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */ -/* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */ -/* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8) -#define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \ - unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch)) -unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch) -{ - TRACE("(%p %d)\n", this, ch); - return WEOF; -} - -/* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */ -/* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */ -/* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */ -/* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8) -#define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \ - unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch)) -unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch) -{ - TRACE("(%p %d)\n", this, ch); - return WEOF; -} - -/* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */ -/* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */ -/* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */ -/* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4) -wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->pwbuf; -} - -/* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */ -/* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */ -/* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */ -/* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8) -void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off) -{ - TRACE("(%p %d)\n", this, off); - *this->pwpos += off; - *this->pwsize -= off; -} - -/* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */ -/* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */ -/* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */ -/* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4) -wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return *this->pwpos; -} - -/* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */ -/* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */ -/* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */ -/* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12) -locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); - memcpy(ret, this->loc, sizeof(locale)); - call_basic_streambuf_wchar_imbue(this, loc); - locale_copy_ctor(this->loc, loc); - return ret; -} - -/* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -/* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20) -#define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \ - fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode)) -fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - TRACE("(%p %ld %d %d)\n", this, off, way, mode); - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; -} - -/* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */ -/* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */ -/* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */ -/* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 20) -fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - TRACE("(%p %ld %d %d)\n", this, off, way, mode); - return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode); -} - -/* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */ -/* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */ -/* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */ -/* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 20) -fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this, - fpos_int *ret, streamoff off, unsigned int way, unsigned int mode) -{ - TRACE("(%p %ld %d %d)\n", this, off, way, mode); - return basic_streambuf_wchar_pubseekoff(this, ret, off, way, mode); -} - -/* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36) -#define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \ - fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode)) -fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this, - fpos_int *ret, fpos_int pos, int mode) -{ - TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode); - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; -} - -/* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */ -/* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */ -/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */ -/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36) -fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this, - fpos_int *ret, fpos_int pos, int mode) -{ - TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode); - return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode); -} - -/* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */ -/* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */ -/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */ -/* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old, 36) -fpos_int* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this, - fpos_int *ret, fpos_int pos, unsigned int mode) -{ - TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode); - return basic_streambuf_wchar_pubseekpos(this, ret, pos, mode); -} - -/* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */ -/* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */ -/* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */ -/* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12) -#define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \ - basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count)) -basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, buf, count); - return this; -} - -/* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */ -/* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */ -/* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */ -/* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12) -basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, buf, count); - return call_basic_streambuf_wchar_setbuf(this, buf, count); -} - -/* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */ -/* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */ -/* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */ -/* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4) -#define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, \ - int, (basic_streambuf_wchar*), (this)) -int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return 0; -} - -/* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */ -/* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */ -/* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */ -/* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4) -int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return call_basic_streambuf_wchar_sync(this); -} - -/* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */ -/* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */ -/* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */ -/* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12) -streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, ptr, count); - return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count); -} - -/* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */ -/* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */ -/* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */ -/* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4) -#define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \ - streamsize, (basic_streambuf_wchar*), (this)) -streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return 0; -} - -/* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */ -/* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */ -/* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */ -/* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4) -streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this) -{ - streamsize ret; - - TRACE("(%p)\n", this); - - ret = basic_streambuf_wchar__Gnavail(this); - return ret ? ret : call_basic_streambuf_wchar_showmanyc(this); -} - -/* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */ -/* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */ -/* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */ -/* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8) -unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch) -{ - TRACE("(%p %d)\n", this, ch); - if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) { - (*this->prsize)++; - (*this->prpos)--; - return ch; - } - - return call_basic_streambuf_wchar_pbackfail(this, ch); -} - -/* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */ -/* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */ -/* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */ -/* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8) -unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch) -{ - TRACE("(%p %d)\n", this, ch); - return basic_streambuf_wchar__Pnavail(this) ? - (*basic_streambuf_wchar__Pninc(this) = ch) : - call_basic_streambuf_wchar_overflow(this, ch); -} - -/* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */ -/* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */ -/* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */ -/* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4) -unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - if(*this->prpos && *this->prpos>*this->prbuf) { - (*this->prsize)++; - (*this->prpos)--; - return **this->prpos; - } - - return call_basic_streambuf_wchar_pbackfail(this, WEOF); -} - -/* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4) -void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - if(basic_streambuf_wchar__Gnavail(this)) - basic_streambuf_wchar__Gninc(this); - else - call_basic_streambuf_wchar_uflow(this); -} - -/* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */ -/* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */ -/* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */ -/* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4) -unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return basic_streambuf_wchar__Gnavail(this) ? - *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this); -} - -/* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */ -/* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */ -/* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */ -/* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4) -unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - return basic_streambuf_wchar__Gnavail(this) ? - *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this); -} - -/* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */ -/* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */ -/* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */ -/* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4) -unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this) -{ - TRACE("(%p)\n", this); - - if(basic_streambuf_wchar__Gnavail(this) > 1) - return *basic_streambuf_wchar__Gnpreinc(this); - return basic_streambuf_wchar_sbumpc(this)==WEOF ? - WEOF : basic_streambuf_wchar_sgetc(this); -} - -/* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */ -/* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */ -/* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */ -/* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12) -#define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \ - streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count)) -streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, ptr, count); - return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count); -} - -/* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */ -/* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */ -/* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */ -/* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12) -#define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \ - streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count)) -streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count) -{ - streamsize copied, chunk; - - TRACE("(%p %p %ld)\n", this, ptr, count); - - for(copied=0; copied count-copied) - chunk = count-copied; - - if(chunk > 0) { - memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t)); - *this->pwpos += chunk; - *this->pwsize -= chunk; - copied += chunk; - }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) { - copied++; - }else { - break; - } - } - - return copied; -} - -/* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */ -/* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */ -/* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */ -/* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12) -streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, ptr, count); - return call_basic_streambuf_wchar_xsputn(this, ptr, count); -} - -/* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */ -/* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */ -int basic_filebuf_char__Init__Stinit = 0; - -/* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */ -/* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12) -void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which) -{ - TRACE("(%p %p %d)\n", this, file, which); - - this->cvt = NULL; - this->wrotesome = FALSE; - this->state = basic_filebuf_char__Init__Stinit; - this->close = (which == INITFL_open); - this->file = file; - - basic_streambuf_char__Init_empty(&this->base); - if(file) - basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr, - &file->_cnt, &file->_base, &file->_ptr, &file->_cnt); -} - -/* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */ -/* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 8) -void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt) -{ - TRACE("(%p %p)\n", this, cvt); - - if(codecvt_base_always_noconv(&cvt->base)) { - this->cvt = NULL; - }else { - basic_streambuf_char__Init_empty(&this->base); - this->cvt = cvt; - } -} - -/* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */ -/* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite, 4) -MSVCP_bool __thiscall basic_filebuf_char__Endwrite(basic_filebuf_char *this) -{ - TRACE("(%p)\n", this); - - if(!this->wrotesome || !this->cvt) - return TRUE; - - - if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF) - return FALSE; - - while(1) { - /* TODO: check if we need a dynamic buffer here */ - char buf[128]; - char *next; - int ret; - - ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next); - switch(ret) { - case CODECVT_ok: - this->wrotesome = FALSE; - /* fall through */ - case CODECVT_partial: - if(!fwrite(buf, next-buf, 1, this->file)) - return FALSE; - if(this->wrotesome) - break; - /* fall through */ - case CODECVT_noconv: - if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF) - return FALSE; - return TRUE; - default: - return FALSE; - } - } -} - -/* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */ -/* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4) -basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this) -{ - basic_filebuf_char *ret = this; - - TRACE("(%p)\n", this); - - if(!this->file) - return NULL; - - /* TODO: handle exceptions */ - if(!basic_filebuf_char__Endwrite(this)) - ret = NULL; - if(fclose(this->file)) - ret = NULL; - - basic_filebuf_char__Init(this, NULL, INITFL_close); - return ret; -} - -/* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8) -basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file) -{ - TRACE("(%p %p)\n", this, file); - - basic_streambuf_char_ctor(&this->base); - this->base.vtable = &MSVCP_basic_filebuf_char_vtable; - - basic_filebuf_char__Init(this, file, INITFL_new); - return this; -} - -/* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4) -basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this) -{ - return basic_filebuf_char_ctor_file(this, NULL); -} - -/* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8) -basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized) -{ - TRACE("(%p %d)\n", this, uninitialized); - - basic_streambuf_char_ctor(&this->base); - this->base.vtable = &MSVCP_basic_filebuf_char_vtable; - return this; -} - -/* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4) -void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this) -{ - TRACE("(%p)\n", this); - - if(this->close) - basic_filebuf_char_close(this); - basic_streambuf_char_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8) -basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_filebuf_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_filebuf_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4) -MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this) -{ - TRACE("(%p)\n", this); - return this->file != NULL; -} - -/* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */ -/* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */ -FILE* __cdecl _Fiopen_wchar(const wchar_t *name, int mode, int prot) -{ - static const wchar_t rW[] = {'r',0}; - static const struct { - int mode; - const wchar_t str[4]; - const wchar_t str_bin[4]; - } str_mode[] = { - {OPENMODE_out, {'w',0}, {'w','b',0}}, - {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}}, - {OPENMODE_app, {'a',0}, {'a','b',0}}, - {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}}, - {OPENMODE_in, {'r',0}, {'r','b',0}}, - {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}}, - {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}}, - {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}, - {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}} - }; - - int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary); - unsigned int mode_idx; - FILE *f = NULL; - - TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot); - - for(mode_idx=0; mode_idxbase.loc)); - return this; -} - -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */ -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */ -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */ -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode, 12) -basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar_mode(basic_filebuf_char *this, const wchar_t *name, unsigned int mode) -{ - return basic_filebuf_char_open_wchar(this, name, mode, SH_DENYNO); -} - -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */ -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open, 16) -basic_filebuf_char* __thiscall basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot) -{ - wchar_t nameW[FILENAME_MAX]; - - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0) - return NULL; - return basic_filebuf_char_open_wchar(this, nameW, mode, prot); -} - -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */ -/* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12) -basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, unsigned int mode) -{ - return basic_filebuf_char_open(this, name, mode, SH_DENYNO); -} - -/* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */ -/* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8) -int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c) -{ - char buf[8], *dyn_buf; - char ch = c, *to_next; - const char *from_next; - int ret, max_size; - - - TRACE("(%p %d)\n", this, c); - - if(!basic_filebuf_char_is_open(this)) - return EOF; - if(c == EOF) - return !c; - - if(!this->cvt) - return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF; - - from_next = &ch; - do { - ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1, - &from_next, buf, buf+sizeof(buf), &to_next); - - switch(ret) { - case CODECVT_partial: - if(to_next == buf) - break; - /* fall through */ - case CODECVT_ok: - if(!fwrite(buf, to_next-buf, 1, this->file)) - return EOF; - if(ret == CODECVT_partial) - continue; - return c; - case CODECVT_noconv: - return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF; - default: - return EOF; - } - - break; - } while(1); - - max_size = codecvt_base_max_length(&this->cvt->base); - dyn_buf = malloc(max_size); - if(!dyn_buf) - return EOF; - - ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1, - &from_next, dyn_buf, dyn_buf+max_size, &to_next); - - switch(ret) { - case CODECVT_ok: - ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file); - free(dyn_buf); - return ret ? c : EOF; - case CODECVT_partial: - ERR("buffer should be big enough to store all output\n"); - /* fall through */ - default: - free(dyn_buf); - return EOF; - } -} - -/* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */ -/* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8) -int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c) -{ - TRACE("(%p %d)\n", this, c); - - if(!basic_filebuf_char_is_open(this)) - return EOF; - - if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base) - && (c==EOF || (int)(unsigned char)basic_streambuf_char_gptr(&this->base)[-1]==c)) { - basic_streambuf_char__Gndec(&this->base); - return c==EOF ? !c : c; - }else if(c!=EOF && !this->cvt) { - return ungetc(c, this->file); - } - - return EOF; -} - -/* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */ -/* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4) -int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this) -{ - char ch, buf[128], *to_next; - const char *buf_next; - int c, i; - - TRACE("(%p)\n", this); - - if(!basic_filebuf_char_is_open(this)) - return EOF; - - if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base)) - return (unsigned char)*basic_streambuf_char__Gninc(&this->base); - - c = fgetc(this->file); - if(!this->cvt || c==EOF) - return c; - - buf_next = buf; - for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) { - buf[i] = c; - - switch(codecvt_char_in(this->cvt, &this->state, buf_next, - buf+i+1, &buf_next, &ch, &ch+1, &to_next)) { - case CODECVT_partial: - case CODECVT_ok: - if(to_next == &ch) { - c = fgetc(this->file); - if(c == EOF) - return EOF; - continue; - } - - for(i--; i>=buf_next-buf; i--) - ungetc(buf[i], this->file); - return ch; - case CODECVT_noconv: - return (unsigned char)buf[0]; - default: - return EOF; - } - } - - FIXME("buffer is too small\n"); - return EOF; -} - -/* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */ -/* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4) -int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this) -{ - int ret; - - TRACE("(%p)\n", this); - - if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base)) - return (unsigned char)*basic_streambuf_char_gptr(&this->base); - - ret = call_basic_streambuf_char_uflow(&this->base); - if(ret != EOF) - ret = call_basic_streambuf_char_pbackfail(&this->base, ret); - return ret; -} - -/* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20) -fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - fpos_t pos; - - TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode); - - if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this) - || fseek(this->file, off, way)) { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; - } - - fgetpos(this->file, &pos); - ret->off = 0; - ret->pos = pos; - ret->state = this->state; - return ret; -} - -/* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36) -fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this, - fpos_int *ret, fpos_int pos, int mode) -{ - fpos_t fpos; - - TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode); - - if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this) - || fseek(this->file, (LONG)pos.pos, SEEK_SET) - || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; - } - - fgetpos(this->file, &fpos); - ret->off = 0; - ret->pos = fpos; - ret->state = this->state; - return ret; -} - -/* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */ -/* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12) -basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, buf, count); - - if(!basic_filebuf_char_is_open(this)) - return NULL; - - if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count)) - return NULL; - - basic_filebuf_char__Init(this, this->file, INITFL_open); - return &this->base; -} - -/* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */ -/* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4) -int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_char_is_open(this)) - return 0; - - if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF) - return 0; - return fflush(this->file); -} - -/* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */ -/* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8) -void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); - basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc)); -} - -/* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */ -/* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */ -int basic_filebuf_wchar__Init__Stinit = 0; - -/* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */ -/* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */ -int basic_filebuf_short__Init__Stinit = 0; - -/* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */ -/* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Init, 12) -void __thiscall basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which) -{ - TRACE("(%p %p %d)\n", this, file, which); - - this->cvt = NULL; - this->wrotesome = FALSE; - this->state = basic_filebuf_wchar__Init__Stinit; - this->close = (which == INITFL_open); - this->file = file; - - basic_streambuf_wchar__Init_empty(&this->base); -} - -/* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */ -/* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12) -void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which) -{ - TRACE("(%p %p %d)\n", this, file, which); - - this->cvt = NULL; - this->wrotesome = FALSE; - this->state = basic_filebuf_short__Init__Stinit; - this->close = (which == INITFL_open); - this->file = file; - - basic_streambuf_wchar__Init_empty(&this->base); -} - -/* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */ -/* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */ -/* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */ -/* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt, 8) -void __thiscall basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this, codecvt_wchar *cvt) -{ - TRACE("(%p %p)\n", this, cvt); - - if(codecvt_base_always_noconv(&cvt->base)) { - this->cvt = NULL; - }else { - basic_streambuf_wchar__Init_empty(&this->base); - this->cvt = cvt; - } -} - -/* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */ -/* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */ -/* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */ -/* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Endwrite, 4) -MSVCP_bool __thiscall basic_filebuf_wchar__Endwrite(basic_filebuf_wchar *this) -{ - TRACE("(%p)\n", this); - - if(!this->wrotesome || !this->cvt) - return TRUE; - - if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF) - return FALSE; - - while(1) { - /* TODO: check if we need a dynamic buffer here */ - char buf[128]; - char *next; - int ret; - - ret = codecvt_wchar_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next); - switch(ret) { - case CODECVT_ok: - this->wrotesome = FALSE; - /* fall through */ - case CODECVT_partial: - if(!fwrite(buf, next-buf, 1, this->file)) - return FALSE; - if(this->wrotesome) - break; - /* fall through */ - case CODECVT_noconv: - if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF) - return FALSE; - return TRUE; - default: - return FALSE; - } - } -} - -/* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */ -/* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */ -/* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */ -/* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this) -{ - basic_filebuf_wchar *ret = this; - - TRACE("(%p)\n", this); - - if(!this->file) - return NULL; - - /* TODO: handle exceptions */ - if(!basic_filebuf_wchar__Endwrite(this)) - ret = NULL; - if(fclose(this->file)) - ret = NULL; - - basic_filebuf_wchar__Init(this, NULL, INITFL_close); - return ret; -} - -/* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_file, 8) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file) -{ - TRACE("(%p %p)\n", this, file); - - basic_streambuf_wchar_ctor(&this->base); - this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable; - - basic_filebuf_wchar__Init(this, file, INITFL_new); - return this; -} - -/* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8) -basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file) -{ - TRACE("(%p %p)\n", this, file); - - basic_streambuf_short_ctor(&this->base); - this->base.vtable = &MSVCP_basic_filebuf_short_vtable; - - basic_filebuf_short__Init(this, file, INITFL_new); - return this; -} - -/* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor, 4) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor(basic_filebuf_wchar *this) -{ - return basic_filebuf_wchar_ctor_file(this, NULL); -} - -/* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4) -basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this) -{ - return basic_filebuf_short_ctor_file(this, NULL); -} - -/* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_uninitialized, 8) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized) -{ - TRACE("(%p %d)\n", this, uninitialized); - - basic_streambuf_wchar_ctor(&this->base); - this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable; - return this; -} - -/* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8) -basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized) -{ - TRACE("(%p %d)\n", this, uninitialized); - - basic_streambuf_short_ctor(&this->base); - this->base.vtable = &MSVCP_basic_filebuf_short_vtable; - return this; -} - -/* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4) -void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this) -{ - TRACE("(%p)\n", this); - - if(this->close) - basic_filebuf_wchar_close(this); - basic_streambuf_wchar_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_filebuf_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_filebuf_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */ -/* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4) -MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this) -{ - TRACE("(%p)\n", this); - return this->file != NULL; -} - -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_wchar, 16) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot) -{ - FILE *f = NULL; - - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(basic_filebuf_wchar_is_open(this)) - return NULL; - - if(!(f = _Fiopen_wchar(name, mode, prot))) - return NULL; - - basic_filebuf_wchar__Init(this, f, INITFL_open); - basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(this->base.loc)); - return this; -} - -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PB_WHH@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEB_WHH@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBGHH@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBGHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_wchar, 16) -basic_filebuf_wchar* __thiscall basic_filebuf_short_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot) -{ - FILE *f = NULL; - - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(basic_filebuf_wchar_is_open(this)) - return NULL; - - if(!(f = _Fiopen_wchar(name, mode, prot))) - return NULL; - - basic_filebuf_short__Init(this, f, INITFL_open); - basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(this->base.loc)); - return this; -} - -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WI@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WI@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGI@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGI@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_wchar_mode, 12) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_wchar_mode(basic_filebuf_wchar *this, const wchar_t *name, unsigned int mode) -{ - return basic_filebuf_wchar_open_wchar(this, name, mode, SH_DENYNO); -} - -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PB_WI@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEB_WI@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBGI@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBGI@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_wchar_mode, 12) -basic_filebuf_wchar* __thiscall basic_filebuf_short_open_wchar_mode(basic_filebuf_wchar *this, const wchar_t *name, unsigned int mode) -{ - return basic_filebuf_short_open_wchar(this, name, mode, SH_DENYNO); -} - -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open, 16) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot) -{ - wchar_t nameW[FILENAME_MAX]; - - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0) - return NULL; - return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot); -} - -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDHH@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open, 16) -basic_filebuf_wchar* __thiscall basic_filebuf_short_open(basic_filebuf_wchar *this, const char *name, int mode, int prot) -{ - wchar_t nameW[FILENAME_MAX]; - - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0) - return NULL; - return basic_filebuf_short_open_wchar(this, nameW, mode, prot); -} - -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDI@Z */ -/* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12) -basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, unsigned int mode) -{ - return basic_filebuf_wchar_open(this, name, mode, SH_DENYNO); -} - -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDI@Z */ -/* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode, 12) -basic_filebuf_wchar* __thiscall basic_filebuf_short_open_mode(basic_filebuf_wchar *this, const char *name, unsigned int mode) -{ - return basic_filebuf_short_open(this, name, mode, SH_DENYNO); -} - -/* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */ -/* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */ -/* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */ -/* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8) -unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c) -{ - char buf[8], *dyn_buf, *to_next; - wchar_t ch = c; - const wchar_t *from_next; - int max_size; - unsigned short ret; - - - TRACE("(%p %d)\n", this, c); - - if(!basic_filebuf_wchar_is_open(this)) - return WEOF; - if(c == WEOF) - return !c; - - if(!this->cvt) - return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF; - - from_next = &ch; - do { - ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1, - &from_next, buf, buf+sizeof(buf), &to_next); - - switch(ret) { - case CODECVT_partial: - if(to_next == buf) - break; - /* fall through */ - case CODECVT_ok: - if(!fwrite(buf, to_next-buf, 1, this->file)) - return WEOF; - if(ret == CODECVT_partial) - continue; - return c; - case CODECVT_noconv: - return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF; - default: - return WEOF; - } - - break; - } while(1); - - max_size = codecvt_base_max_length(&this->cvt->base); - dyn_buf = malloc(max_size); - if(!dyn_buf) - return WEOF; - - ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1, - &from_next, dyn_buf, dyn_buf+max_size, &to_next); - - switch(ret) { - case CODECVT_ok: - ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file); - free(dyn_buf); - return ret ? c : WEOF; - case CODECVT_partial: - ERR("buffer should be big enough to store all output\n"); - /* fall through */ - default: - free(dyn_buf); - return WEOF; - } -} - -/* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */ -/* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */ -/* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */ -/* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8) -unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c) -{ - TRACE("(%p %d)\n", this, c); - - if(!basic_filebuf_wchar_is_open(this)) - return WEOF; - - if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base) - && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==c)) { - basic_streambuf_wchar__Gndec(&this->base); - return c==WEOF ? !c : c; - }else if(c!=WEOF && !this->cvt) { - return ungetwc(c, this->file); - }else if(c!=WEOF && basic_streambuf_wchar_gptr(&this->base)!=&this->putback) { - this->putback = c; - basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback, &this->putback+1); - return c; - } - - return WEOF; -} - -/* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */ -/* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */ -/* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */ -/* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4) -unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this) -{ - wchar_t ch, *to_next; - char buf[128]; - const char *buf_next; - int c, i; - - TRACE("(%p)\n", this); - - if(!basic_filebuf_wchar_is_open(this)) - return WEOF; - - if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base)) - return *basic_streambuf_wchar__Gninc(&this->base); - - if(!this->cvt) - return fgetwc(this->file); - - buf_next = buf; - for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) { - if((c = fgetc(this->file)) == EOF) - return WEOF; - buf[i] = c; - - switch(codecvt_wchar_in(this->cvt, &this->state, buf_next, - buf+i+1, &buf_next, &ch, &ch+1, &to_next)) { - case CODECVT_partial: - case CODECVT_ok: - if(to_next == &ch) - continue; - - for(i--; i>=buf_next-buf; i--) - ungetc(buf[i], this->file); - return ch; - case CODECVT_noconv: - if(i+1 < sizeof(wchar_t)) - continue; - - memcpy(&ch, buf, sizeof(wchar_t)); - return ch; - default: - return WEOF; - } - } - - FIXME("buffer is too small\n"); - return WEOF; -} - -/* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */ -/* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */ -/* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */ -/* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4) -unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this) -{ - unsigned short ret; - - TRACE("(%p)\n", this); - - if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base)) - return *basic_streambuf_wchar_gptr(&this->base); - - ret = call_basic_streambuf_wchar_uflow(&this->base); - if(ret != WEOF) - ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret); - return ret; -} - -/* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -/* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20) -fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - fpos_t pos; - - TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode); - - if(basic_streambuf_wchar_gptr(&this->base) == &this->putback) { - if(way == SEEKDIR_cur) - off -= sizeof(wchar_t); - - basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1); - } - - if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this) - || fseek(this->file, off, way)) { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; - } - - fgetpos(this->file, &pos); - ret->off = 0; - ret->pos = pos; - ret->state = this->state; - return ret; -} - -/* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36) -fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this, - fpos_int *ret, fpos_int pos, int mode) -{ - fpos_t fpos; - - TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode); - - if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this) - || fseek(this->file, (LONG)pos.pos, SEEK_SET) - || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; - } - - if(basic_streambuf_wchar_gptr(&this->base) == &this->putback) - basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1); - - fgetpos(this->file, &fpos); - ret->off = 0; - ret->pos = fpos; - ret->state = this->state; - return ret; -} - -/* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */ -/* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12) -basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, buf, count); - - if(!basic_filebuf_wchar_is_open(this)) - return NULL; - - if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t))) - return NULL; - - basic_filebuf_wchar__Init(this, this->file, INITFL_open); - return &this->base; -} - -/* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */ -/* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12) -basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count) -{ - TRACE("(%p %p %ld)\n", this, buf, count); - - if(!basic_filebuf_wchar_is_open(this)) - return NULL; - - if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t))) - return NULL; - - basic_filebuf_short__Init(this, this->file, INITFL_open); - return &this->base; -} - -/* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */ -/* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */ -/* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */ -/* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4) -int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_wchar_is_open(this)) - return 0; - - if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF) - return 0; - return fflush(this->file); -} - -/* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */ -/* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue, 8) -void __thiscall basic_filebuf_wchar_imbue(basic_filebuf_wchar *this, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); - basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc)); -} - -/* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */ -/* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue, 8) -void __thiscall basic_filebuf_short_imbue(basic_filebuf_wchar *this, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); - basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc)); -} - -/* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */ -/* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate, 8) -int __thiscall basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode) -{ - int state = 0; - - if(!(mode & OPENMODE_in)) - state |= STRINGBUF_no_read; - - if(!(mode & OPENMODE_out)) - state |= STRINGBUF_no_write; - - if(mode & OPENMODE_ate) - state |= STRINGBUF_at_end; - - if(mode & OPENMODE_app) - state |= STRINGBUF_append; - - return state; -} - -/* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */ -/* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16) -void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state) -{ - TRACE("(%p, %p, %ld, %d)\n", this, str, count, state); - - basic_streambuf_char__Init_empty(&this->base); - - this->state = state; - this->seekhigh = NULL; - - if(count && str) { - char *buf = MSVCRT_operator_new(count); - if(!buf) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - - memcpy(buf, str, count); - this->seekhigh = buf + count; - - this->state |= STRINGBUF_allocated; - - if(!(state & STRINGBUF_no_read)) - basic_streambuf_char_setg(&this->base, buf, buf, buf + count); - - if(!(state & STRINGBUF_no_write)) { - basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count); - - if(!basic_streambuf_char_gptr(&this->base)) - basic_streambuf_char_setg(&this->base, buf, 0, buf); - } - } -} - -/* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -/* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12) -basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this, - const basic_string_char *str, IOSB_openmode mode) -{ - TRACE("(%p %p %d)\n", this, str, mode); - - basic_streambuf_char_ctor(&this->base); - this->base.vtable = &MSVCP_basic_stringbuf_char_vtable; - - basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str), - str->size, basic_stringbuf_char__Getstate(this, mode)); - return this; -} - -/* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */ -/* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8) -basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode( - basic_stringbuf_char *this, IOSB_openmode mode) -{ - TRACE("(%p %d)\n", this, mode); - - basic_streambuf_char_ctor(&this->base); - this->base.vtable = &MSVCP_basic_stringbuf_char_vtable; - - basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode)); - return this; -} - -/* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4) -basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this) -{ - return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out); -} - -/* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */ -/* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4) -void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this) -{ - TRACE("(%p)\n", this); - - if(this->state & STRINGBUF_allocated) { - MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base)); - this->seekhigh = NULL; - this->state &= ~STRINGBUF_allocated; - } - - basic_streambuf_char__Init_empty(&this->base); -} - -/* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */ -/* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4) -void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this) -{ - TRACE("(%p)\n", this); - - basic_stringbuf_char__Tidy(this); - basic_streambuf_char_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8) -basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *) this - 1; - - for (i = *ptr - 1; i >= 0; i--) - basic_stringbuf_char_dtor(this+i); - - MSVCRT_operator_delete(ptr); - }else { - basic_stringbuf_char_dtor(this); - - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */ -/* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8) -int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta) -{ - MSVCP_size_t oldsize, size; - char *ptr, *buf; - - TRACE("(%p %x)\n", this, meta); - - if(meta == EOF) - return !EOF; - if(this->state & STRINGBUF_no_write) - return EOF; - - ptr = basic_streambuf_char_pptr(&this->base); - if((this->state&STRINGBUF_append) && ptrseekhigh) - basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base), - this->seekhigh, basic_streambuf_char_epptr(&this->base)); - - if(ptr && ptrbase)) - return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta); - - oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0); - size = oldsize|0xf; - size += size/2; - buf = MSVCRT_operator_new(size); - if(!buf) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - - if(!oldsize) { - this->seekhigh = buf; - basic_streambuf_char_setp(&this->base, buf, buf+size); - if(this->state & STRINGBUF_no_read) - basic_streambuf_char_setg(&this->base, buf, NULL, buf); - else - basic_streambuf_char_setg(&this->base, buf, buf, buf+1); - - this->state |= STRINGBUF_allocated; - }else { - ptr = basic_streambuf_char_eback(&this->base); - memcpy(buf, ptr, oldsize); - - this->seekhigh = buf+(this->seekhigh-ptr); - basic_streambuf_char_setp_next(&this->base, buf, - buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size); - if(this->state & STRINGBUF_no_read) - basic_streambuf_char_setg(&this->base, buf, NULL, buf); - else - basic_streambuf_char_setg(&this->base, buf, - buf+(basic_streambuf_char_gptr(&this->base)-ptr), - basic_streambuf_char_pptr(&this->base)+1); - - MSVCRT_operator_delete(ptr); - } - - return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta); -} - -/* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */ -/* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8) -int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c) -{ - char *cur; - - TRACE("(%p %x)\n", this, c); - - cur = basic_streambuf_char_gptr(&this->base); - if(!cur || cur==basic_streambuf_char_eback(&this->base) - || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write)) - return EOF; - - if(c != EOF) - cur[-1] = c; - basic_streambuf_char_gbump(&this->base, -1); - return c==EOF ? !EOF : c; -} - -/* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */ -/* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4) -int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this) -{ - char *ptr, *cur; - - TRACE("(%p)\n", this); - - cur = basic_streambuf_char_gptr(&this->base); - if(!cur || this->state&STRINGBUF_no_read) - return EOF; - - ptr = basic_streambuf_char_pptr(&this->base); - if(this->seekhigh < ptr) - this->seekhigh = ptr; - - ptr = basic_streambuf_char_egptr(&this->base); - if(this->seekhigh > ptr) - basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh); - - if(cur < this->seekhigh) - return (unsigned char)*cur; - return EOF; -} - -/* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20) -fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - char *beg, *cur_r, *cur_w; - - TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode); - - cur_w = basic_streambuf_char_pptr(&this->base); - if(cur_w > this->seekhigh) - this->seekhigh = cur_w; - - ret->off = 0; - ret->pos = 0; - ret->state = 0; - - beg = basic_streambuf_char_eback(&this->base); - cur_r = basic_streambuf_char_gptr(&this->base); - if((mode & OPENMODE_in) && cur_r) { - if(way==SEEKDIR_cur && !(mode & OPENMODE_out)) - off += cur_r-beg; - else if(way == SEEKDIR_end) - off += this->seekhigh-beg; - else if(way != SEEKDIR_beg) - off = -1; - - if(off<0 || off>this->seekhigh-beg) { - off = -1; - }else { - basic_streambuf_char_gbump(&this->base, beg-cur_r+off); - if((mode & OPENMODE_out) && cur_w) { - basic_streambuf_char_setp_next(&this->base, beg, - basic_streambuf_char_gptr(&this->base), - basic_streambuf_char_epptr(&this->base)); - } - } - }else if((mode & OPENMODE_out) && cur_w) { - if(way == SEEKDIR_cur) - off += cur_w-beg; - else if(way == SEEKDIR_end) - off += this->seekhigh-beg; - else if(way != SEEKDIR_beg) - off = -1; - - if(off<0 || off>this->seekhigh-beg) - off = -1; - else - basic_streambuf_char_pbump(&this->base, beg-cur_w+off); - }else { - off = -1; - } - - ret->off = off; - return ret; -} - -/* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36) -fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this, - fpos_int *ret, fpos_int pos, int mode) -{ - TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode); - - if(pos.off==-1 && pos.pos==0 && pos.state==0) { - *ret = pos; - return ret; - } - - return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode); -} - -/* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -/* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8) -void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str) -{ - TRACE("(%p %p)\n", this, str); - - basic_stringbuf_char__Tidy(this); - basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str), str->size, this->state); -} - -/* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8) -basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret) -{ - char *ptr; - - TRACE("(%p)\n", this); - - if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) { - char *pptr; - - ptr = basic_streambuf_char_pbase(&this->base); - pptr = basic_streambuf_char_pptr(&this->base); - - return MSVCP_basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr); - } - - if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) { - ptr = basic_streambuf_char_eback(&this->base); - return MSVCP_basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr); - } - - return MSVCP_basic_string_char_ctor(ret); -} - -/* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */ -/* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */ -/* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */ -/* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate, 8) -int __thiscall basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode) -{ - int state = 0; - - if(!(mode & OPENMODE_in)) - state |= STRINGBUF_no_read; - - if(!(mode & OPENMODE_out)) - state |= STRINGBUF_no_write; - - if(mode & OPENMODE_ate) - state |= STRINGBUF_at_end; - - if(mode & OPENMODE_app) - state |= STRINGBUF_append; - - return state; -} - -/* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */ -/* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */ -/* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */ -/* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16) -void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state) -{ - TRACE("(%p, %p, %lu, %d)\n", this, str, count, state); - - basic_streambuf_wchar__Init_empty(&this->base); - - this->state = state; - this->seekhigh = NULL; - - if(count && str) { - wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t)); - if(!buf) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - - memcpy(buf, str, count*sizeof(wchar_t)); - this->seekhigh = buf + count; - - this->state |= STRINGBUF_allocated; - - if(!(state & STRINGBUF_no_read)) - basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count); - - if(!(state & STRINGBUF_no_write)) { - basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count); - - if(!basic_streambuf_wchar_gptr(&this->base)) - basic_streambuf_wchar_setg(&this->base, buf, 0, buf); - } - } -} - -/* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -/* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_str, 12) -basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this, - const basic_string_wchar *str, IOSB_openmode mode) -{ - TRACE("(%p %p %d)\n", this, str, mode); - - basic_streambuf_wchar_ctor(&this->base); - this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable; - - basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str), - str->size, basic_stringbuf_wchar__Getstate(this, mode)); - return this; -} - -/* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -/* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12) -basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this, - const basic_string_wchar *str, IOSB_openmode mode) -{ - basic_stringbuf_wchar_ctor_str(this, str, mode); - this->base.vtable = &MSVCP_basic_stringbuf_short_vtable; - return this; -} - -/* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */ -/* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_mode, 8) -basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor_mode( - basic_stringbuf_wchar *this, IOSB_openmode mode) -{ - TRACE("(%p %d)\n", this, mode); - - basic_streambuf_wchar_ctor(&this->base); - this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable; - - basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode)); - return this; -} - -/* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */ -/* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8) -basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode( - basic_stringbuf_wchar *this, IOSB_openmode mode) -{ - basic_stringbuf_wchar_ctor_mode(this, mode); - this->base.vtable = &MSVCP_basic_stringbuf_short_vtable; - return this; -} - -/* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor, 4) -basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor(basic_stringbuf_wchar *this) -{ - return basic_stringbuf_wchar_ctor_mode(this, OPENMODE_in|OPENMODE_out); -} - -/* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4) -basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this) -{ - return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out); -} - -/* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */ -/* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */ -/* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */ -/* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4) -void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this) -{ - TRACE("(%p)\n", this); - - if(this->state & STRINGBUF_allocated) { - MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base)); - this->seekhigh = NULL; - this->state &= ~STRINGBUF_allocated; - } - - basic_streambuf_wchar__Init_empty(&this->base); -} - -/* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */ -/* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */ -/* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */ -/* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4) -void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this) -{ - TRACE("(%p)\n", this); - - basic_stringbuf_wchar__Tidy(this); - basic_streambuf_wchar_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8) -basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *) this - 1; - - for (i = *ptr - 1; i >= 0; i--) - basic_stringbuf_wchar_dtor(this+i); - - MSVCRT_operator_delete(ptr); - }else { - basic_stringbuf_wchar_dtor(this); - - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */ -/* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */ -/* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */ -/* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8) -unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta) -{ - MSVCP_size_t oldsize, size; - wchar_t *ptr, *buf; - - TRACE("(%p %x)\n", this, meta); - - if(meta == WEOF) - return !WEOF; - if(this->state & STRINGBUF_no_write) - return WEOF; - - ptr = basic_streambuf_wchar_pptr(&this->base); - if((this->state&STRINGBUF_append) && ptrseekhigh) - basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base), - this->seekhigh, basic_streambuf_wchar_epptr(&this->base)); - - if(ptr && ptrbase)) - return (*basic_streambuf_wchar__Pninc(&this->base) = meta); - - oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0); - size = oldsize|0xf; - size += size/2; - buf = MSVCRT_operator_new(size*sizeof(wchar_t)); - if(!buf) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - - if(!oldsize) { - this->seekhigh = buf; - basic_streambuf_wchar_setp(&this->base, buf, buf+size); - if(this->state & STRINGBUF_no_read) - basic_streambuf_wchar_setg(&this->base, buf, NULL, buf); - else - basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1); - - this->state |= STRINGBUF_allocated; - }else { - ptr = basic_streambuf_wchar_eback(&this->base); - memcpy(buf, ptr, oldsize*sizeof(wchar_t)); - - this->seekhigh = buf+(this->seekhigh-ptr); - basic_streambuf_wchar_setp_next(&this->base, buf, - buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size); - if(this->state & STRINGBUF_no_read) - basic_streambuf_wchar_setg(&this->base, buf, NULL, buf); - else - basic_streambuf_wchar_setg(&this->base, buf, - buf+(basic_streambuf_wchar_gptr(&this->base)-ptr), - basic_streambuf_wchar_pptr(&this->base)+1); - - MSVCRT_operator_delete(ptr); - } - - return (*basic_streambuf_wchar__Pninc(&this->base) = meta); -} - -/* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */ -/* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */ -/* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */ -/* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8) -unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c) -{ - wchar_t *cur; - - TRACE("(%p %x)\n", this, c); - - cur = basic_streambuf_wchar_gptr(&this->base); - if(!cur || cur==basic_streambuf_wchar_eback(&this->base) - || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write)) - return WEOF; - - if(c != WEOF) - cur[-1] = c; - basic_streambuf_wchar_gbump(&this->base, -1); - return c==WEOF ? !WEOF : c; -} - -/* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */ -/* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */ -/* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */ -/* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4) -unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this) -{ - wchar_t *ptr, *cur; - - TRACE("(%p)\n", this); - - cur = basic_streambuf_wchar_gptr(&this->base); - if(!cur || this->state&STRINGBUF_no_read) - return WEOF; - - ptr = basic_streambuf_wchar_pptr(&this->base); - if(this->seekhigh < ptr) - this->seekhigh = ptr; - - ptr = basic_streambuf_wchar_egptr(&this->base); - if(this->seekhigh > ptr) - basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh); - - if(cur < this->seekhigh) - return *cur; - return WEOF; -} - -/* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -/* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20) -fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this, - fpos_int *ret, streamoff off, int way, int mode) -{ - wchar_t *beg, *cur_r, *cur_w; - - TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode); - - cur_w = basic_streambuf_wchar_pptr(&this->base); - if(cur_w > this->seekhigh) - this->seekhigh = cur_w; - - ret->off = 0; - ret->pos = 0; - ret->state = 0; - - beg = basic_streambuf_wchar_eback(&this->base); - cur_r = basic_streambuf_wchar_gptr(&this->base); - if((mode & OPENMODE_in) && cur_r) { - if(way==SEEKDIR_cur && !(mode & OPENMODE_out)) - off += cur_r-beg; - else if(way == SEEKDIR_end) - off += this->seekhigh-beg; - else if(way != SEEKDIR_beg) - off = -1; - - if(off<0 || off>this->seekhigh-beg) { - off = -1; - }else { - basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off); - if((mode & OPENMODE_out) && cur_w) { - basic_streambuf_wchar_setp_next(&this->base, beg, - basic_streambuf_wchar_gptr(&this->base), - basic_streambuf_wchar_epptr(&this->base)); - } - } - }else if((mode & OPENMODE_out) && cur_w) { - if(way == SEEKDIR_cur) - off += cur_w-beg; - else if(way == SEEKDIR_end) - off += this->seekhigh-beg; - else if(way != SEEKDIR_beg) - off = -1; - - if(off<0 || off>this->seekhigh-beg) - off = -1; - else - basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off); - }else { - off = -1; - } - - ret->off = off; - return ret; -} - -/* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36) -fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this, - fpos_int *ret, fpos_int pos, int mode) -{ - TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode); - - if(pos.off==-1 && pos.pos==0 && pos.state==0) { - *ret = pos; - return ret; - } - - return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode); -} - -/* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -/* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8) -void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str) -{ - TRACE("(%p %p)\n", this, str); - - basic_stringbuf_wchar__Tidy(this); - basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str), str->size, this->state); -} - -/* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8) -basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret) -{ - wchar_t *ptr; - - TRACE("(%p)\n", this); - - if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) { - wchar_t *pptr; - - ptr = basic_streambuf_wchar_pbase(&this->base); - pptr = basic_streambuf_wchar_pptr(&this->base); - - return MSVCP_basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr); - } - - if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) { - ptr = basic_streambuf_wchar_eback(&this->base); - return MSVCP_basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr); - } - - return MSVCP_basic_string_wchar_ctor(ret); -} - -/* ??0ios_base@std@@IAE@XZ */ -/* ??0ios_base@std@@IEAA@XZ */ -DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4) -ios_base* __thiscall ios_base_ctor(ios_base *this) -{ - TRACE("(%p)\n", this); - this->vtable = &MSVCP_ios_base_vtable; - return this; -} - -/* ??0ios_base@std@@QAE@ABV01@@Z */ -/* ??0ios_base@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8) -ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy) -{ - TRACE("(%p %p)\n", this, copy); - *this = *copy; - this->vtable = &MSVCP_ios_base_vtable; - return this; -} - -/* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */ -/* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8) -void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event) -{ - IOS_BASE_fnarray *cur; - - TRACE("(%p %x)\n", this, event); - - for(cur=this->calls; cur; cur=cur->next) - cur->event_handler(event, this, cur->index); -} - -/* ?_Tidy@ios_base@std@@AAAXXZ */ -/* ?_Tidy@ios_base@std@@AEAAXXZ */ -void CDECL ios_base_Tidy(ios_base *this) -{ - IOS_BASE_iosarray *arr_cur, *arr_next; - IOS_BASE_fnarray *event_cur, *event_next; - - TRACE("(%p)\n", this); - - ios_base_Callfns(this, EVENT_erase_event); - - for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) { - arr_next = arr_cur->next; - MSVCRT_operator_delete(arr_cur); - } - this->arr = NULL; - - for(event_cur=this->calls; event_cur; event_cur=event_next) { - event_next = event_cur->next; - MSVCRT_operator_delete(event_cur); - } - this->calls = NULL; -} - -/* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */ -/* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */ -void CDECL ios_base_Ios_base_dtor(ios_base *obj) -{ - TRACE("(%p)\n", obj); - if(obj->loc) { - locale_dtor(obj->loc); - MSVCRT_operator_delete(obj->loc); - } - ios_base_Tidy(obj); -} - -/* ??1ios_base@std@@UAE@XZ */ -/* ??1ios_base@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4) -void __thiscall ios_base_dtor(ios_base *this) -{ - ios_base_Ios_base_dtor(this); -} - -DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8) -ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - ios_base_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - ios_base_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8) -void* __thiscall iosb_vector_dtor(void *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - INT_PTR *ptr = (INT_PTR *)this-1; - MSVCRT_operator_delete(ptr); - } else { - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */ -/* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8) -IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index) -{ - IOS_BASE_iosarray *p; - - TRACE("(%p %d)\n", this, index); - - for(p=this->arr; p; p=p->next) { - if(p->index == index) - return p; - } - - for(p=this->arr; p; p=p->next) { - if(!p->long_val && !p->ptr_val) { - p->index = index; - return p; - } - } - - p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray)); - p->next = this->arr; - p->index = index; - p->long_val = 0; - p->ptr_val = NULL; - this->arr = p; - return p; -} - -/* ?iword@ios_base@std@@QAEAAJH@Z */ -/* ?iword@ios_base@std@@QEAAAEAJH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_iword, 8) -LONG* __thiscall ios_base_iword(ios_base *this, int index) -{ - TRACE("(%p %d)\n", this, index); - return &ios_base_Findarr(this, index)->long_val; -} - -/* ?pword@ios_base@std@@QAEAAPAXH@Z */ -/* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_pword, 8) -void** __thiscall ios_base_pword(ios_base *this, int index) -{ - TRACE("(%p %d)\n", this, index); - return &ios_base_Findarr(this, index)->ptr_val; -} - -/* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */ -/* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12) -void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index) -{ - IOS_BASE_fnarray *event; - - TRACE("(%p %p %d)\n", this, callback, index); - - event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray)); - event->next = this->calls; - event->index = index; - event->event_handler = callback; - this->calls = event; -} - -/* ?clear@ios_base@std@@QAEXH_N@Z */ -/* ?clear@ios_base@std@@QEAAXH_N@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12) -void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise) -{ - TRACE("(%p %x %x)\n", this, state, reraise); - - this->state = state & IOSTATE_mask; - if(!(this->state & this->except)) - return; - - if(reraise) - throw_exception(EXCEPTION_RERAISE, NULL); - else if(this->state & this->except & IOSTATE_eofbit) - throw_exception(EXCEPTION_FAILURE, "eofbit is set"); - else if(this->state & this->except & IOSTATE_failbit) - throw_exception(EXCEPTION_FAILURE, "failbit is set"); - else if(this->state & this->except & IOSTATE_badbit) - throw_exception(EXCEPTION_FAILURE, "badbit is set"); - else if(this->state & this->except & IOSTATE__Hardfail) - throw_exception(EXCEPTION_FAILURE, "_Hardfail is set"); -} - -/* ?clear@ios_base@std@@QAEXH@Z */ -/* ?clear@ios_base@std@@QEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_clear, 8) -void __thiscall ios_base_clear(ios_base *this, IOSB_iostate state) -{ - ios_base_clear_reraise(this, state, FALSE); -} - -/* ?clear@ios_base@std@@QAEXI@Z */ -/* ?clear@ios_base@std@@QEAAXI@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned, 8) -void __thiscall ios_base_clear_unsigned(ios_base *this, unsigned int state) -{ - ios_base_clear_reraise(this, (IOSB_iostate)state, FALSE); -} - -/* ?exceptions@ios_base@std@@QAEXH@Z */ -/* ?exceptions@ios_base@std@@QEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8) -void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state) -{ - TRACE("(%p %x)\n", this, state); - this->except = state & IOSTATE_mask; - ios_base_clear(this, this->state); -} - -/* ?exceptions@ios_base@std@@QAEXI@Z */ -/* ?exceptions@ios_base@std@@QEAAXI@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned, 8) -void __thiscall ios_base_exceptions_set_unsigned(ios_base *this, unsigned int state) -{ - TRACE("(%p %x)\n", this, state); - ios_base_exceptions_set(this, state); -} - -/* ?exceptions@ios_base@std@@QBEHXZ */ -/* ?exceptions@ios_base@std@@QEBAHXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4) -IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this) -{ - TRACE("(%p)\n", this); - return this->except; -} - -/* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */ -/* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8) -ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs) -{ - TRACE("(%p %p)\n", this, rhs); - - if(this != rhs) { - IOS_BASE_iosarray *arr_cur; - IOS_BASE_fnarray *event_cur; - - ios_base_Tidy(this); - - for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) { - if(arr_cur->long_val) - *ios_base_iword(this, arr_cur->index) = arr_cur->long_val; - if(arr_cur->ptr_val) - *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val; - } - this->stdstr = rhs->stdstr; - this->fmtfl = rhs->fmtfl; - this->prec = rhs->prec; - this->wide = rhs->wide; - locale_operator_assign(this->loc, rhs->loc); - - for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next) - ios_base_register_callback(this, event_cur->event_handler, event_cur->index); - - ios_base_Callfns(this, EVENT_copyfmt_event); - ios_base_exceptions_set(this, rhs->except); - } - - return this; -} - -/* ??4ios_base@std@@QAEAAV01@ABV01@@Z */ -/* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_assign, 8) -ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right) -{ - TRACE("(%p %p)\n", this, right); - - if(this != right) { - this->state = right->state; - ios_base_copyfmt(this, right); - } - - return this; -} - -/* ?fail@ios_base@std@@QBE_NXZ */ -/* ?fail@ios_base@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_fail, 4) -MSVCP_bool __thiscall ios_base_fail(const ios_base *this) -{ - TRACE("(%p)\n", this); - return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0; -} - -/* ??7ios_base@std@@QBE_NXZ */ -/* ??7ios_base@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4) -MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this) -{ - TRACE("(%p)\n", this); - return ios_base_fail(this); -} - -/* ??Bios_base@std@@QBEPAXXZ */ -/* ??Bios_base@std@@QEBAPEAXXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4) -void* __thiscall ios_base_op_fail(const ios_base *this) -{ - TRACE("(%p)\n", this); - return ios_base_fail(this) ? NULL : (void*)this; -} - -/* ?_Addstd@ios_base@std@@SAXPAV12@@Z */ -/* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */ -void CDECL ios_base_Addstd(ios_base *add) -{ - FIXME("(%p) stub\n", add); -} - -/* ?_Index_func@ios_base@std@@CAAAHXZ */ -/* ?_Index_func@ios_base@std@@CAAEAHXZ */ -int* CDECL ios_base_Index_func(void) -{ - TRACE("\n"); - return &ios_base_Index; -} - -/* ?_Init@ios_base@std@@IAEXXZ */ -/* ?_Init@ios_base@std@@IEAAXXZ */ -DEFINE_THISCALL_WRAPPER(ios_base__Init, 4) -void __thiscall ios_base__Init(ios_base *this) -{ - TRACE("(%p)\n", this); - - this->stdstr = 0; - this->state = this->except = IOSTATE_goodbit; - this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec; - this->prec = 6; - this->wide = 0; - this->arr = NULL; - this->calls = NULL; - this->loc = MSVCRT_operator_new(sizeof(locale)); - locale_ctor(this->loc); -} - -/* ?_Sync_func@ios_base@std@@CAAA_NXZ */ -/* ?_Sync_func@ios_base@std@@CAAEA_NXZ */ -MSVCP_bool* CDECL ios_base_Sync_func(void) -{ - TRACE("\n"); - return &ios_base_Sync; -} - -/* ?bad@ios_base@std@@QBE_NXZ */ -/* ?bad@ios_base@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_bad, 4) -MSVCP_bool __thiscall ios_base_bad(const ios_base *this) -{ - TRACE("(%p)\n", this); - return (this->state & IOSTATE_badbit) != 0; -} - -/* ?eof@ios_base@std@@QBE_NXZ */ -/* ?eof@ios_base@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_eof, 4) -MSVCP_bool __thiscall ios_base_eof(const ios_base *this) -{ - TRACE("(%p)\n", this); - return (this->state & IOSTATE_eofbit) != 0; -} - -/* ?flags@ios_base@std@@QAEHH@Z */ -/* ?flags@ios_base@std@@QEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8) -IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags) -{ - IOSB_fmtflags ret = this->fmtfl; - - TRACE("(%p %x)\n", this, flags); - - this->fmtfl = flags & FMTFLAG_mask; - return ret; -} - -/* ?flags@ios_base@std@@QBEHXZ */ -/* ?flags@ios_base@std@@QEBAHXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4) -IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this) -{ - TRACE("(%p)\n", this); - return this->fmtfl; -} - -/* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */ -/* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */ -DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8) -locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret) -{ - TRACE("(%p)\n", this); - return locale_copy_ctor(ret, this->loc); -} - -/* ?good@ios_base@std@@QBE_NXZ */ -/* ?good@ios_base@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_good, 4) -MSVCP_bool __thiscall ios_base_good(const ios_base *this) -{ - TRACE("(%p)\n", this); - return this->state == IOSTATE_goodbit; -} - -/* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */ -/* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12) -locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc) -{ - TRACE("(%p %p)\n", this, loc); - *ret = *this->loc; - locale_copy_ctor(this->loc, loc); - return ret; -} - -/* ?precision@ios_base@std@@QAEHH@Z */ -/* ?precision@ios_base@std@@QEAA_J_J@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8) -streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision) -{ - streamsize ret = this->prec; - - TRACE("(%p %ld)\n", this, precision); - - this->prec = precision; - return ret; -} - -/* ?precision@ios_base@std@@QBEHXZ */ -/* ?precision@ios_base@std@@QEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4) -streamsize __thiscall ios_base_precision_get(const ios_base *this) -{ - TRACE("(%p)\n", this); - return this->prec; -} - -/* ?rdstate@ios_base@std@@QBEHXZ */ -/* ?rdstate@ios_base@std@@QEBAHXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4) -IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this) -{ - TRACE("(%p)\n", this); - return this->state; -} - -/* ?setf@ios_base@std@@QAEHHH@Z */ -/* ?setf@ios_base@std@@QEAAHHH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12) -IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask) -{ - IOSB_fmtflags ret = this->fmtfl; - - TRACE("(%p %x %x)\n", this, flags, mask); - - this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask); - return ret; -} - -/* ?setf@ios_base@std@@QAEHH@Z */ -/* ?setf@ios_base@std@@QEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_setf, 8) -IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags) -{ - return ios_base_setf_mask(this, flags, ~0); -} - -/* ?setstate@ios_base@std@@QAEXH_N@Z */ -/* ?setstate@ios_base@std@@QEAAXH_N@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12) -void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise) -{ - TRACE("(%p %x %x)\n", this, state, reraise); - - if(state != IOSTATE_goodbit) - ios_base_clear_reraise(this, this->state | state, reraise); -} - -/* ?setstate@ios_base@std@@QAEXH@Z */ -/* ?setstate@ios_base@std@@QEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_setstate, 8) -void __thiscall ios_base_setstate(ios_base *this, IOSB_iostate state) -{ - ios_base_setstate_reraise(this, state, FALSE); -} - -/* ?setstate@ios_base@std@@QAEXI@Z */ -/* ?setstate@ios_base@std@@QEAAXI@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned, 8) -void __thiscall ios_base_setstate_unsigned(ios_base *this, unsigned int state) -{ - ios_base_setstate_reraise(this, (IOSB_iostate)state, FALSE); -} - -/* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */ -MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync) -{ - _Lockit lock; - MSVCP_bool ret; - - TRACE("(%x)\n", sync); - - _Lockit_ctor_locktype(&lock, _LOCK_STREAM); - ret = ios_base_Sync; - ios_base_Sync = sync; - _Lockit_dtor(&lock); - return ret; -} - -/* ?unsetf@ios_base@std@@QAEXH@Z */ -/* ?unsetf@ios_base@std@@QEAAXH@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8) -void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags) -{ - TRACE("(%p %x)\n", this, flags); - this->fmtfl &= ~flags; -} - -/* ?width@ios_base@std@@QAEHH@Z */ -/* ?width@ios_base@std@@QEAA_J_J@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8) -streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width) -{ - streamsize ret = this->wide; - - TRACE("(%p %ld)\n", this, width); - - this->wide = width; - return ret; -} - -/* ?width@ios_base@std@@QBEHXZ */ -/* ?width@ios_base@std@@QEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4) -streamsize __thiscall ios_base_width_get(ios_base *this) -{ - TRACE("(%p)\n", this); - return this->wide; -} - -/* ?xalloc@ios_base@std@@SAHXZ */ -int CDECL ios_base_xalloc(void) -{ - _Lockit lock; - int ret; - - TRACE("\n"); - - _Lockit_ctor_locktype(&lock, _LOCK_STREAM); - ret = ios_base_Index++; - _Lockit_dtor(&lock); - return ret; -} - -/* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */ -/* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4) -basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this) -{ - TRACE("(%p)\n", this); - - ios_base_ctor(&this->base); - this->base.vtable = &MSVCP_basic_ios_char_vtable; - return this; -} - -/* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */ -/* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12) -void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd) -{ - TRACE("(%p %p %x)\n", this, streambuf, isstd); - ios_base__Init(&this->base); - this->strbuf = streambuf; - this->stream = NULL; - this->fillch = ' '; - - if(!streambuf) - ios_base_setstate(&this->base, IOSTATE_badbit); - - if(isstd) - FIXME("standard streams not handled yet\n"); -} - -/* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -/* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8) -basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf) -{ - TRACE("(%p %p)\n", this, strbuf); - - basic_ios_char_ctor(this); - basic_ios_char_init(this, strbuf, FALSE); - return this; -} - -/* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4) -void __thiscall basic_ios_char_dtor(basic_ios_char *this) -{ - TRACE("(%p)\n", this); - ios_base_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8) -basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ios_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ios_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */ -/* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12) -void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise) -{ - TRACE("(%p %x %x)\n", this, state, reraise); - ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise); -} - -/* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */ -/* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_clear, 8) -void __thiscall basic_ios_char_clear(basic_ios_char *this, unsigned int state) -{ - basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE); -} - -/* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */ -/* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8) -basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy) -{ - TRACE("(%p %p)\n", this, copy); - if(this == copy) - return this; - - this->stream = copy->stream; - this->fillch = copy->fillch; - ios_base_copyfmt(&this->base, ©->base); - return this; -} - -/* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */ -/* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8) -char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill) -{ - char ret = this->fillch; - - TRACE("(%p %c)\n", this, fill); - - this->fillch = fill; - return ret; -} - -/* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */ -/* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4) -char __thiscall basic_ios_char_fill_get(basic_ios_char *this) -{ - TRACE("(%p)\n", this); - return this->fillch; -} - -/* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */ -/* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12) -locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc) -{ - TRACE("(%p %p %p)\n", this, ret, loc); - - if(this->strbuf) { - basic_streambuf_char_pubimbue(this->strbuf, ret, loc); - locale_dtor(ret); - } - - return ios_base_imbue(&this->base, ret, loc); -} - -/* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */ -/* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12) -char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def) -{ - TRACE("(%p %c %c)\n", this, ch, def); - return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf->loc), ch, def); -} - -/* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */ -/* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8) -basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf) -{ - basic_streambuf_char *ret = this->strbuf; - - TRACE("(%p %p)\n", this, streambuf); - - this->strbuf = streambuf; - basic_ios_char_clear(this, IOSTATE_goodbit); - return ret; -} - -/* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */ -/* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4) -basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this) -{ - TRACE("(%p)\n", this); - return this->strbuf; -} - -/* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */ -/* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12) -void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise) -{ - TRACE("(%p %x %x)\n", this, state, reraise); - - if(state != IOSTATE_goodbit) - basic_ios_char_clear_reraise(this, this->base.state | state, reraise); -} - -/* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */ -/* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate, 8) -void __thiscall basic_ios_char_setstate(basic_ios_char *this, unsigned int state) -{ - basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE); -} - -/* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */ -/* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8) -basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream) -{ - basic_ostream_char *ret = this->stream; - - TRACE("(%p %p)\n", this, ostream); - - this->stream = ostream; - return ret; -} - -/* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */ -/* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4) -basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this) -{ - TRACE("(%p)\n", this); - return this->stream; -} - -/* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */ -/* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8) -char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf->loc), ch); -} - - -/* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */ -/* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor, 4) -basic_ios_wchar* __thiscall basic_ios_wchar_ctor(basic_ios_wchar *this) -{ - TRACE("(%p)\n", this); - - ios_base_ctor(&this->base); - this->base.vtable = &MSVCP_basic_ios_wchar_vtable; - return this; -} - -/* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */ -/* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4) -basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this) -{ - basic_ios_wchar_ctor(this); - this->base.vtable = &MSVCP_basic_ios_short_vtable; - return this; -} - -/* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */ -/* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */ -/* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */ -/* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12) -void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd) -{ - TRACE("(%p %p %x)\n", this, streambuf, isstd); - ios_base__Init(&this->base); - this->strbuf = streambuf; - this->stream = NULL; - this->fillch = ' '; - - if(!streambuf) - ios_base_setstate(&this->base, IOSTATE_badbit); - - if(isstd) - FIXME("standard streams not handled yet\n"); -} - -/* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -/* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf, 8) -basic_ios_wchar* __thiscall basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf) -{ - TRACE("(%p %p)\n", this, strbuf); - - basic_ios_wchar_ctor(this); - basic_ios_wchar_init(this, strbuf, FALSE); - return this; -} - -/* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -/* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8) -basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf) -{ - basic_ios_wchar_ctor_streambuf(this, strbuf); - this->base.vtable = &MSVCP_basic_ios_short_vtable; - return this; -} - -/* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4) -void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this) -{ - TRACE("(%p)\n", this); - ios_base_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8) -basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ios_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ios_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */ -/* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */ -/* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */ -/* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12) -void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise) -{ - TRACE("(%p %x %x)\n", this, state, reraise); - ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise); -} - -/* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */ -/* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */ -/* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */ -/* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear, 8) -void __thiscall basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state) -{ - basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE); -} - -/* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */ -/* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */ -/* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */ -/* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8) -basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy) -{ - TRACE("(%p %p)\n", this, copy); - if(this == copy) - return this; - - this->stream = copy->stream; - this->fillch = copy->fillch; - ios_base_copyfmt(&this->base, ©->base); - return this; -} - -/* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */ -/* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */ -/* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */ -/* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8) -wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill) -{ - wchar_t ret = this->fillch; - - TRACE("(%p %c)\n", this, fill); - - this->fillch = fill; - return ret; -} - -/* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */ -/* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */ -/* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */ -/* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4) -wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this) -{ - TRACE("(%p)\n", this); - return this->fillch; -} - -/* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */ -/* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */ -/* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */ -/* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12) -locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc) -{ - TRACE("(%p %p %p)\n", this, ret, loc); - - if(this->strbuf) { - basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc); - locale_dtor(ret); - } - - return ios_base_imbue(&this->base, ret, loc); -} - -/* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */ -/* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */ -/* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */ -/* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12) -char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def) -{ - TRACE("(%p %c %c)\n", this, ch, def); - return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf->loc), ch, def); -} - -/* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */ -/* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */ -/* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */ -/* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8) -basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf) -{ - basic_streambuf_wchar *ret = this->strbuf; - - TRACE("(%p %p)\n", this, streambuf); - - this->strbuf = streambuf; - basic_ios_wchar_clear(this, IOSTATE_goodbit); - return ret; -} - -/* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */ -/* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4) -basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this) -{ - TRACE("(%p)\n", this); - return this->strbuf; -} - -/* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */ -/* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */ -/* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */ -/* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12) -void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise) -{ - TRACE("(%p %x %x)\n", this, state, reraise); - - if(state != IOSTATE_goodbit) - basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise); -} - -/* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */ -/* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */ -/* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */ -/* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate, 8) -void __thiscall basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state) -{ - basic_ios_wchar_setstate_reraise(this, state, FALSE); -} - -/* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */ -/* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */ -/* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */ -/* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8) -basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream) -{ - basic_ostream_wchar *ret = this->stream; - - TRACE("(%p %p)\n", this, ostream); - - this->stream = ostream; - return ret; -} - -/* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */ -/* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4) -basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this) -{ - TRACE("(%p)\n", this); - return this->stream; -} - -/* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */ -/* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */ -/* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */ -/* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */ -DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8) -wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf->loc), ch); -} - -/* Caution: basic_ostream uses virtual inheritance. - * All constructors have additional parameter that says if base class should be initialized. - * Base class needs to be accessed using vbtable. - */ -static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this) -{ - return (basic_ios_char*)((char*)this+this->vbtable[1]); -} - -static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]); -} - -static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]); -} - -/* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */ -/* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 16) -basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this, - basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init) -{ - basic_ios_char *base; - - TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init); - - if(virt_init) { - this->vbtable = basic_ostream_char_vbtable; - base = basic_ostream_char_get_basic_ios(this); - basic_ios_char_ctor(base); - }else { - base = basic_ostream_char_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_ostream_char_vtable; - basic_ios_char_init(base, strbuf, isstd); - return this; -} - -/* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */ -/* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized, 16) -basic_ostream_char* __thiscall basic_ostream_char_ctor_uninitialized(basic_ostream_char *this, - int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init) -{ - basic_ios_char *base; - - TRACE("(%p %d %x)\n", this, uninitialized, addstd); - - if(virt_init) { - this->vbtable = basic_ostream_char_vbtable; - base = basic_ostream_char_get_basic_ios(this); - basic_ios_char_ctor(base); - }else { - base = basic_ostream_char_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_ostream_char_vtable; - if(addstd) - ios_base_Addstd(&base->base); - return this; -} - -/* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4) -void __thiscall basic_ostream_char_dtor(basic_ios_char *base) -{ - basic_ostream_char *this = basic_ostream_char_from_basic_ios(base); - - /* don't destroy virtual base here */ - TRACE("(%p)\n", this); -} - -/* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4) -void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this) -{ - TRACE("(%p)\n", this); - basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this)); -} - -DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8) -basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_ostream_char *this = basic_ostream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ostream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ostream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */ -/* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4) -basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this) -{ - /* this function is not matching C++ specification */ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base) - && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1) - basic_ios_char_setstate(base, IOSTATE_badbit); - return this; -} - -/* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */ -/* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */ -basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream) -{ - return basic_ostream_char_flush(ostream); -} - -/* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4) -void __thiscall basic_ostream_char__Osfx(basic_ostream_char *this) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(base->base.fmtfl & FMTFLAG_unitbuf) - basic_ostream_char_flush(this); -} - -/* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4) -void __thiscall basic_ostream_char_osfx(basic_ostream_char *this) -{ - TRACE("(%p)\n", this); - basic_ostream_char__Osfx(this); -} - -static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr); - - if(basic_ios_char_rdbuf_get(base)) - basic_streambuf_char__Lock(base->strbuf); - - if(ios_base_good(&base->base) && base->stream) - basic_ostream_char_flush(base->stream); - - return ios_base_good(&base->base); -} - -static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr); - - if(ios_base_good(&base->base) && !__uncaught_exception()) - basic_ostream_char_osfx(ostr); - - if(basic_ios_char_rdbuf_get(base)) - basic_streambuf_char__Unlock(base->strbuf); -} - -/* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */ -/* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4) -MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(ios_base_good(&base->base) && base->stream) - basic_ostream_char_flush(base->stream); - return ios_base_good(&base->base); -} - -/* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */ -/* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8) -basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p %c)\n", this, ch); - - if(!basic_ostream_char_sentry_create(this) - || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) { - basic_ostream_char_sentry_destroy(this); - basic_ios_char_setstate(base, IOSTATE_badbit); - return this; - } - - basic_ostream_char_sentry_destroy(this); - return this; -} - -/* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */ -/* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp, 12) -basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this, streamoff off, int way) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p %ld %d)\n", this, off, way); - - if(!ios_base_fail(&base->base)) { - fpos_int seek; - - basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base), - &seek, off, way, OPENMODE_out); - if(seek.off==-1 && seek.pos==0 && seek.state==0) - basic_ios_char_setstate(base, IOSTATE_failbit); - } - return this; -} - -/* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */ -/* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28) -basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos)); - - if(!ios_base_fail(&base->base)) { - fpos_int seek; - - basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base), - &seek, pos, OPENMODE_out); - if(seek.off==-1 && seek.pos==0 && seek.state==0) - basic_ios_char_setstate(base, IOSTATE_failbit); - } - return this; -} - -/* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */ -/* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8) -fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(!ios_base_fail(&base->base)) { - basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base), - ret, 0, SEEKDIR_cur, OPENMODE_out); - }else { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - } - return ret; -} - -/* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */ -/* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12) -basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - - TRACE("(%p %s %ld)\n", this, debugstr_a(str), count); - - if(!basic_ostream_char_sentry_create(this) - || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) { - basic_ostream_char_sentry_destroy(this); - basic_ios_char_setstate(base, IOSTATE_badbit); - return this; - } - - basic_ostream_char_sentry_destroy(this); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %d)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), - (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex)) - ? (LONG)((unsigned short)val) : (LONG)val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %u)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %d)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %u)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %f)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12) -basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %lf)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12) -basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %lf)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - IOSB_iostate state = IOSTATE_badbit; - int c = '\n'; - - TRACE("(%p %p)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - for(c = basic_streambuf_char_sgetc(val); c!=EOF; - c = basic_streambuf_char_snextc(val)) { - state = IOSTATE_goodbit; - - if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) { - state = IOSTATE_badbit; - break; - } - } - }else { - state = IOSTATE_badbit; - } - basic_ostream_char_sentry_destroy(this); - - ios_base_width_set(&base->base, 0); - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12) -basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p)\n", this); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12) -basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p)\n", this); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %x)\n", this, val); - - if(basic_ostream_char_sentry_create(this)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_put *numput = num_put_char_use_facet(strbuf->loc); - ostreambuf_iterator_char dest = {0, strbuf}; - - num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val); - } - basic_ostream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */ -/* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */ -basic_ostream_char* __cdecl basic_ostream_char_ends(basic_ostream_char *ostr) -{ - TRACE("(%p)\n", ostr); - - basic_ostream_char_put(ostr, 0); - return ostr; -} - -/* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */ -/* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */ -basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr) -{ - TRACE("(%p)\n", ostr); - - basic_ostream_char_put(ostr, '\n'); - basic_ostream_char_flush(ostr); - return ostr; -} - -/* $?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", ostr, str); - - if(basic_ostream_char_sentry_create(ostr)) { - MSVCP_size_t len = MSVCP_basic_string_char_length(str); - streamsize pad = (base->base.wide>len ? base->base.wide-len : 0); - - if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - for(; pad!=0; pad--) { - if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) { - state = IOSTATE_badbit; - break; - } - } - } - - if(state == IOSTATE_goodbit) { - if(basic_streambuf_char_sputn(base->strbuf, MSVCP_basic_string_char_c_str(str), len) != len) - state = IOSTATE_badbit; - } - - if(state == IOSTATE_goodbit) { - for(; pad!=0; pad--) { - if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) { - state = IOSTATE_badbit; - break; - } - } - } - - base->base.wide = 0; - }else { - state = IOSTATE_badbit; - } - basic_ostream_char_sentry_destroy(ostr); - - basic_ios_char_setstate(base, state); - return ostr; -} - -/* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */ -basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %d)\n", ostr, ch); - - if(basic_ostream_char_sentry_create(ostr)) { - streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0); - - if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - for(; pad!=0; pad--) { - if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) { - state = IOSTATE_badbit; - break; - } - } - } - - if(state == IOSTATE_goodbit) { - if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF) - state = IOSTATE_badbit; - } - - if(state == IOSTATE_goodbit) { - for(; pad!=0; pad--) { - if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) { - state = IOSTATE_badbit; - break; - } - } - } - - base->base.wide = 0; - }else { - state = IOSTATE_badbit; - } - basic_ostream_char_sentry_destroy(ostr); - - basic_ios_char_setstate(base, state); - return ostr; -} - -/* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */ -/* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */ -basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str) -{ - basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %s)\n", ostr, str); - - if(basic_ostream_char_sentry_create(ostr)) { - MSVCP_size_t len = strlen(str); - streamsize pad = (base->base.wide>len ? base->base.wide-len : 0); - - if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - for(; pad!=0; pad--) { - if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) { - state = IOSTATE_badbit; - break; - } - } - } - - if(state == IOSTATE_goodbit) { - if(basic_streambuf_char_sputn(base->strbuf, str, len) != len) - state = IOSTATE_badbit; - } - - if(state == IOSTATE_goodbit) { - for(; pad!=0; pad--) { - if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) { - state = IOSTATE_badbit; - break; - } - } - } - - base->base.wide = 0; - }else { - state = IOSTATE_badbit; - } - basic_ostream_char_sentry_destroy(ostr); - - basic_ios_char_setstate(base, state); - return ostr; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this, - basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(this); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this, - basic_ios_char* (__cdecl *pfunc)(basic_ios_char*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(basic_ostream_char_get_basic_ios(this)); - return this; -} - -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */ -/* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8) -basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base( - basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(&basic_ostream_char_get_basic_ios(this)->base); - return this; -} - -/* Caution: basic_ostream uses virtual inheritance. */ -static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this) -{ - return (basic_ios_wchar*)((char*)this+this->vbtable[1]); -} - -static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]); -} - -static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]); -} - -/* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */ -/* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor, 16) -basic_ostream_wchar* __thiscall basic_ostream_wchar_ctor(basic_ostream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init) -{ - basic_ios_wchar *base; - - TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init); - - if(virt_init) { - this->vbtable = basic_ostream_wchar_vbtable; - base = basic_ostream_wchar_get_basic_ios(this); - basic_ios_wchar_ctor(base); - }else { - base = basic_ostream_wchar_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_ostream_wchar_vtable; - basic_ios_wchar_init(base, strbuf, isstd); - return this; -} - -/* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */ -/* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor, 16) -basic_ostream_wchar* __thiscall basic_ostream_short_ctor(basic_ostream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init) -{ - basic_ostream_wchar_ctor(this, strbuf, isstd, virt_init); - basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable; - return this; -} - -/* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */ -/* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor_uninitialized, 16) -basic_ostream_wchar* __thiscall basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar *this, - int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init) -{ - basic_ios_wchar *base; - - TRACE("(%p %d %x)\n", this, uninitialized, addstd); - - if(virt_init) { - this->vbtable = basic_ostream_wchar_vbtable; - base = basic_ostream_wchar_get_basic_ios(this); - basic_ios_wchar_ctor(base); - }else { - base = basic_ostream_wchar_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_ostream_wchar_vtable; - if(addstd) - ios_base_Addstd(&base->base); - return this; -} - -/* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */ -/* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized, 16) -basic_ostream_wchar* __thiscall basic_ostream_short_ctor_uninitialized(basic_ostream_wchar *this, - int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init) -{ - basic_ostream_wchar_ctor_uninitialized(this, uninitialized, addstd, virt_init); - basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable; - return this; -} - -/* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4) -void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base) -{ - basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base); - - /* don't destroy virtual base here */ - TRACE("(%p)\n", this); -} - -/* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4) -void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this) -{ - TRACE("(%p)\n", this); - basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this)); -} - -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ostream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ostream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */ -/* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */ -/* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */ -/* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4) -basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this) -{ - /* this function is not matching C++ specification */ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base) - && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1) - basic_ios_wchar_setstate(base, IOSTATE_badbit); - return this; -} - -/* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */ -/* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */ -/* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */ -/* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */ -basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream) -{ - return basic_ostream_wchar_flush(ostream); -} - -/* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx, 4) -void __thiscall basic_ostream_wchar__Osfx(basic_ostream_wchar *this) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(base->base.fmtfl & FMTFLAG_unitbuf) - basic_ostream_wchar_flush(this); -} - -/* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4) -void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this) -{ - TRACE("(%p)\n", this); - basic_ostream_wchar__Osfx(this); -} - -static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr); - - if(basic_ios_wchar_rdbuf_get(base)) - basic_streambuf_wchar__Lock(base->strbuf); - - if(ios_base_good(&base->base) && base->stream) - basic_ostream_wchar_flush(base->stream); - - return ios_base_good(&base->base); -} - -static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr); - - if(ios_base_good(&base->base) && !__uncaught_exception()) - basic_ostream_wchar_osfx(ostr); - - if(basic_ios_wchar_rdbuf_get(base)) - basic_streambuf_wchar__Unlock(base->strbuf); -} - -/* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */ -/* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */ -/* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */ -/* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4) -MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(ios_base_good(&base->base) && base->stream) - basic_ostream_wchar_flush(base->stream); - return ios_base_good(&base->base); -} - -/* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */ -/* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */ -/* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */ -/* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p %c)\n", this, ch); - - if(!basic_ostream_wchar_sentry_create(this) - || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) { - basic_ostream_wchar_sentry_destroy(this); - basic_ios_wchar_setstate(base, IOSTATE_badbit); - return this; - } - - basic_ostream_wchar_sentry_destroy(this); - return this; -} - -/* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */ -/* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */ -/* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */ -/* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp, 12) -basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp(basic_ostream_wchar *this, streamoff off, int way) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p %ld %d)\n", this, off, way); - - if(!ios_base_fail(&base->base)) { - fpos_int seek; - - basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base), - &seek, off, way, OPENMODE_out); - if(seek.off==-1 && seek.pos==0 && seek.state==0) - basic_ios_wchar_setstate(base, IOSTATE_failbit); - } - return this; -} - -/* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */ -/* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */ -/* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */ -/* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28) -basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos)); - - if(!ios_base_fail(&base->base)) { - fpos_int seek; - - basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base), - &seek, pos, OPENMODE_out); - if(seek.off==-1 && seek.pos==0 && seek.state==0) - basic_ios_wchar_setstate(base, IOSTATE_failbit); - } - return this; -} - -/* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */ -/* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */ -/* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */ -/* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8) -fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p)\n", this); - - if(!ios_base_fail(&base->base)) { - basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base), - ret, 0, SEEKDIR_cur, OPENMODE_out); - }else { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - } - return ret; -} - -/* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */ -/* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */ -/* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */ -/* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12) -basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - - TRACE("(%p %s %ld)\n", this, debugstr_w(str), count); - - if(!basic_ostream_wchar_sentry_create(this) - || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) { - basic_ostream_wchar_sentry_destroy(this); - basic_ios_wchar_setstate(base, IOSTATE_badbit); - return this; - } - - basic_ostream_wchar_sentry_destroy(this); - return this; -} - -static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %d)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), - (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex)) - ? (LONG)((unsigned short)val) : (LONG)val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_short(basic_ostream_wchar *this, short val) -{ - return basic_ostream_print_short(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8) -basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val) -{ - return basic_ostream_print_short(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %d)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val) -{ - return basic_ostream_print_ushort(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort, 8) -basic_ostream_wchar* __thiscall basic_ostream_short_print_ushort(basic_ostream_wchar *this, unsigned short val) -{ - return basic_ostream_print_ushort(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %d)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int(basic_ostream_wchar *this, int val) -{ - return basic_ostream_print_int(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8) -basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val) -{ - return basic_ostream_print_int(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %u)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint(basic_ostream_wchar *this, unsigned int val) -{ - return basic_ostream_print_uint(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8) -basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val) -{ - return basic_ostream_print_uint(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %f)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_float(basic_ostream_wchar *this, float val) -{ - return basic_ostream_print_float(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8) -basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val) -{ - return basic_ostream_print_float(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %lf)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double, 12) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_double(basic_ostream_wchar *this, double val) -{ - return basic_ostream_print_double(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12) -basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val) -{ - return basic_ostream_print_double(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %lf)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble, 12) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ldouble(basic_ostream_wchar *this, double val) -{ - return basic_ostream_print_ldouble(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12) -basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val) -{ - return basic_ostream_print_ldouble(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - IOSB_iostate state = IOSTATE_badbit; - unsigned short c = '\n'; - - TRACE("(%p %p)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF; - c = basic_streambuf_wchar_snextc(val)) { - state = IOSTATE_goodbit; - - if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) { - state = IOSTATE_badbit; - break; - } - } - }else { - state = IOSTATE_badbit; - } - basic_ostream_wchar_sentry_destroy(this); - - ios_base_width_set(&base->base, 0); - basic_ios_wchar_setstate(base, state); - return this; -} - -static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ptr(basic_ostream_wchar *this, const void *val) -{ - return basic_ostream_print_ptr(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8) -basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val) -{ - return basic_ostream_print_ptr(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p)\n", this); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64, 12) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int64(basic_ostream_wchar *this, __int64 val) -{ - return basic_ostream_print_int64(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12) -basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val) -{ - return basic_ostream_print_int64(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p)\n", this); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64, 12) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint64(basic_ostream_wchar *this, unsigned __int64 val) -{ - return basic_ostream_print_uint64(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12) -basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val) -{ - return basic_ostream_print_uint64(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %x)\n", this, val); - - if(basic_ostream_wchar_sentry_create(this)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - ostreambuf_iterator_wchar dest = {0, strbuf}; - - num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val); - } - basic_ostream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_bool(basic_ostream_wchar *this, MSVCP_bool val) -{ - return basic_ostream_print_bool(this, val, num_put_wchar_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8) -basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val) -{ - return basic_ostream_print_bool(this, val, num_put_short_use_facet( - basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc)); -} - -/* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */ -/* ?ends@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */ -/* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */ -/* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */ -basic_ostream_wchar* __cdecl basic_ostream_wchar_ends(basic_ostream_wchar *ostr) -{ - TRACE("(%p)\n", ostr); - - basic_ostream_wchar_put(ostr, 0); - return ostr; -} - -/* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */ -/* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */ -/* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */ -/* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */ -basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr) -{ - TRACE("(%p)\n", ostr); - - basic_ostream_wchar_put(ostr, '\n'); - basic_ostream_wchar_flush(ostr); - return ostr; -} - -/* ??$?6_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?6_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?6GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?6GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", ostr, str); - - if(basic_ostream_wchar_sentry_create(ostr)) { - MSVCP_size_t len = MSVCP_basic_string_wchar_length(str); - streamsize pad = (base->base.wide>len ? base->base.wide-len : 0); - - if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - for(; pad!=0; pad--) { - if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) { - state = IOSTATE_badbit; - break; - } - } - } - - if(state == IOSTATE_goodbit) { - if(basic_streambuf_wchar_sputn(base->strbuf, MSVCP_basic_string_wchar_c_str(str), len) != len) - state = IOSTATE_badbit; - } - - if(state == IOSTATE_goodbit) { - for(; pad!=0; pad--) { - if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) { - state = IOSTATE_badbit; - break; - } - } - } - - base->base.wide = 0; - }else { - state = IOSTATE_badbit; - } - basic_ostream_wchar_sentry_destroy(ostr); - - basic_ios_wchar_setstate(base, state); - return ostr; -} - -/* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */ -/* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */ -/* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */ -/* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */ -basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %d)\n", ostr, ch); - - if(basic_ostream_wchar_sentry_create(ostr)) { - streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0); - - if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - for(; pad!=0; pad--) { - if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) { - state = IOSTATE_badbit; - break; - } - } - } - - if(state == IOSTATE_goodbit) { - if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF) - state = IOSTATE_badbit; - } - - if(state == IOSTATE_goodbit) { - for(; pad!=0; pad--) { - if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) { - state = IOSTATE_badbit; - break; - } - } - } - - base->base.wide = 0; - }else { - state = IOSTATE_badbit; - } - basic_ostream_wchar_sentry_destroy(ostr); - - basic_ios_wchar_setstate(base, state); - return ostr; -} - -/* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */ -/* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */ -/* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */ -/* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */ -basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str) -{ - basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %s)\n", ostr, debugstr_w(str)); - - if(basic_ostream_wchar_sentry_create(ostr)) { - MSVCP_size_t len = wcslen(str); - streamsize pad = (base->base.wide>len ? base->base.wide-len : 0); - - if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - for(; pad!=0; pad--) { - if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) { - state = IOSTATE_badbit; - break; - } - } - } - - if(state == IOSTATE_goodbit) { - if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len) - state = IOSTATE_badbit; - } - - if(state == IOSTATE_goodbit) { - for(; pad!=0; pad--) { - if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) { - state = IOSTATE_badbit; - break; - } - } - } - - base->base.wide = 0; - }else { - state = IOSTATE_badbit; - } - basic_ostream_wchar_sentry_destroy(ostr); - - basic_ios_wchar_setstate(base, state); - return ostr; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this, - basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(this); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this, - basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(basic_ostream_wchar_get_basic_ios(this)); - return this; -} - -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */ -/* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */ -/* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8) -basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base( - basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(&basic_ostream_wchar_get_basic_ios(this)->base); - return this; -} - -/* Caution: basic_istream uses virtual inheritance. */ -static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this) -{ - return (basic_ios_char*)((char*)this+this->vbtable[1]); -} - -static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]); -} - -static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]); -} - -/* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */ -/* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init, 20) -basic_istream_char* __thiscall basic_istream_char_ctor_init(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init) -{ - basic_ios_char *base; - - TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init); - - if(virt_init) { - this->vbtable = basic_istream_char_vbtable; - base = basic_istream_char_get_basic_ios(this); - basic_ios_char_ctor(base); - }else { - base = basic_istream_char_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_istream_char_vtable; - this->count = 0; - if(!noinit) - basic_ios_char_init(base, strbuf, isstd); - return this; -} - -/* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */ -/* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16) -basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init) -{ - return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init); -} - -/* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12) -basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init) -{ - basic_ios_char *base; - - TRACE("(%p %d %d)\n", this, uninitialized, virt_init); - - if(virt_init) { - this->vbtable = basic_istream_char_vbtable; - base = basic_istream_char_get_basic_ios(this); - basic_ios_char_ctor(base); - }else { - base = basic_istream_char_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_istream_char_vtable; - ios_base_Addstd(&base->base); - return this; -} - -/* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4) -void __thiscall basic_istream_char_dtor(basic_ios_char *base) -{ - basic_istream_char *this = basic_istream_char_from_basic_ios(base); - - /* don't destroy virtual base here */ - TRACE("(%p)\n", this); -} - -/* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4) -void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this) -{ - TRACE("(%p)\n", this); - basic_istream_char_dtor(basic_istream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_istream_char_get_basic_ios(this)); -} - -DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8) -basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_istream_char *this = basic_istream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_istream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_istream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */ -/* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx, 8) -MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - - TRACE("(%p %d)\n", this, noskip); - - if(ios_base_good(&base->base)) { - if(basic_ios_char_tie_get(base)) - basic_ostream_char_flush(basic_ios_char_tie_get(base)); - - if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc); - int ch; - - for(ch = basic_streambuf_char_sgetc(strbuf); ; - ch = basic_streambuf_char_snextc(strbuf)) { - if(ch == EOF) { - basic_ios_char_setstate(base, IOSTATE_eofbit); - break; - } - - if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch)) - break; - } - } - } - - if(!ios_base_good(&base->base)) { - basic_ios_char_setstate(base, IOSTATE_failbit); - return FALSE; - } - - return TRUE; -} - -/* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */ -/* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8) -MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip) -{ - return basic_istream_char__Ipfx(this, noskip); -} - -/* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4) -void __thiscall basic_istream_char_isfx(basic_istream_char *this) -{ - TRACE("(%p)\n", this); -} - -static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(istr); - - if(basic_ios_char_rdbuf_get(base)) - basic_streambuf_char__Lock(base->strbuf); - - return basic_istream_char_ipfx(istr, noskip); -} - -static void basic_istream_char_sentry_destroy(basic_istream_char *istr) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(istr); - - if(basic_ios_char_rdbuf_get(base)) - basic_streambuf_char__Unlock(base->strbuf); -} - -/* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */ -/* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4) -int __thiscall basic_istream_char_gcount(const basic_istream_char *this) -{ - TRACE("(%p)\n", this); - return this->count; -} - -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4) -int __thiscall basic_istream_char_get(basic_istream_char *this) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int ret; - - TRACE("(%p)\n", this); - - this->count = 0; - - if(!basic_istream_char_sentry_create(this, TRUE)) { - basic_istream_char_sentry_destroy(this); - return EOF; - } - - ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base)); - basic_istream_char_sentry_destroy(this); - if(ret == EOF) - basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit); - else - this->count++; - - return ret; -} - -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */ -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8) -basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch) -{ - int ret; - - TRACE("(%p %p)\n", this, ch); - - ret = basic_istream_char_get(this); - if(ret != EOF) - *ch = (char)ret; - return this; -} - -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */ -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16) -basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int ch = delim; - - TRACE("(%p %p %ld %c)\n", this, str, count, delim); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - - for(ch = basic_streambuf_char_sgetc(strbuf); count>1; - ch = basic_streambuf_char_snextc(strbuf)) { - if(ch==EOF || ch==delim) - break; - - *str++ = ch; - this->count++; - count--; - } - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) | - (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - if(count > 0) - *str = 0; - return this; -} - -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */ -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12) -basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count) -{ - return basic_istream_char_get_str_delim(this, str, count, '\n'); -} - -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */ -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12) -basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int ch = delim; - - TRACE("(%p %p %c)\n", this, strbuf, delim); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE)) { - basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base); - - for(ch = basic_streambuf_char_sgetc(strbuf_read); ; - ch = basic_streambuf_char_snextc(strbuf_read)) { - if(ch==EOF || ch==delim) - break; - - if(basic_streambuf_char_sputc(strbuf, ch) == EOF) - break; - this->count++; - } - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) | - (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return this; -} - -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */ -/* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8) -basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf) -{ - return basic_istream_char_get_streambuf_delim(this, strbuf, '\n'); -} - -/* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */ -/* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16) -basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int ch = (unsigned char)delim; - - TRACE("(%p %p %ld %c)\n", this, str, count, delim); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE) && count>0) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - - while(count > 1) { - ch = basic_streambuf_char_sbumpc(strbuf); - - if(ch==EOF || ch==(unsigned char)delim) - break; - - *str++ = ch; - this->count++; - count--; - } - - if(ch == (unsigned char)delim) - this->count++; - else if(ch != EOF) { - ch = basic_streambuf_char_sgetc(strbuf); - - if(ch == (unsigned char)delim) { - basic_streambuf_char__Gninc(strbuf); - this->count++; - } - } - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) | - (!this->count || (ch!=(unsigned char)delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit)); - if(count > 0) - *str = 0; - return this; -} - -/* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */ -/* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12) -basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count) -{ - return basic_istream_char_getline_delim(this, str, count, '\n'); -} - -/* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */ -/* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12) -basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int ch = (unsigned char)delim; - unsigned int state; - - TRACE("(%p %ld %d)\n", this, count, delim); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - state = IOSTATE_goodbit; - - while(count > 0) { - ch = basic_streambuf_char_sbumpc(strbuf); - - if(ch==EOF) { - state = IOSTATE_eofbit; - break; - } - - if(ch==(unsigned char)delim) - break; - - this->count++; - if(count != INT_MAX) - count--; - } - }else - state = IOSTATE_failbit; - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */ -/* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */ -basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(istream); - int ch = '\n'; - - TRACE("(%p)\n", istream); - - if(basic_istream_char_sentry_create(istream, TRUE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const ctype_char *ctype = ctype_char_use_facet(strbuf->loc); - - for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch); - ch = basic_streambuf_char_snextc(strbuf)) { - if(ch == EOF) - break; - } - } - basic_istream_char_sentry_destroy(istream); - - if(ch == EOF) - basic_ios_char_setstate(base, IOSTATE_eofbit); - return istream; -} - -/* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4) -int __thiscall basic_istream_char_peek(basic_istream_char *this) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int ret = EOF; - - TRACE("(%p)\n", this); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE)) - ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); - basic_istream_char_sentry_destroy(this); - - if (ret == EOF) - basic_ios_char_setstate(base, IOSTATE_eofbit); - - return ret; -} - -/* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */ -/* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s, 16) -basic_istream_char* __thiscall basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %p %lu %ld)\n", this, str, size, count); - - if(basic_istream_char_sentry_create(this, TRUE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - - this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count); - if(this->count != count) - state |= IOSTATE_failbit | IOSTATE_eofbit; - }else { - this->count = 0; - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */ -/* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12) -basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count) -{ - return basic_istream_char__Read_s(this, str, count, count); -} - -/* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */ -/* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s, 16) -streamsize __thiscall basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %p %lu %ld)\n", this, str, size, count); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE)) { - streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base)); - if(avail > count) - avail = count; - - if(avail == -1) - state |= IOSTATE_eofbit; - else if(avail > 0) - basic_istream_char__Read_s(this, str, size, avail); - }else { - state |= IOSTATE_failbit; - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this->count; -} - -/* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */ -/* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12) -streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count) -{ - return basic_istream_char__Readsome_s(this, str, count, count); -} - -/* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */ -/* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8) -basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %c)\n", this, ch); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - - if(!ios_base_good(&base->base)) - state |= IOSTATE_failbit; - else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF) - state |= IOSTATE_badbit; - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */ -/* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4) -basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p)\n", this); - - this->count = 0; - - if(basic_istream_char_sentry_create(this, TRUE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - - if(!ios_base_good(&base->base)) - state |= IOSTATE_failbit; - else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF) - state |= IOSTATE_badbit; - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */ -/* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4) -int __thiscall basic_istream_char_sync(basic_istream_char *this) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - - TRACE("(%p)\n", this); - - if(!strbuf) - return -1; - - if(basic_istream_char_sentry_create(this, TRUE)) { - if(basic_streambuf_char_pubsync(strbuf) != -1) { - basic_istream_char_sentry_destroy(this); - return 0; - } - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, IOSTATE_badbit); - return -1; -} - -/* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */ -/* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8) -fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - - TRACE("(%p %p)\n", this, ret); - - if(ios_base_fail(&base->base)) { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; - } - - basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base), - ret, 0, SEEKDIR_cur, OPENMODE_in); - - if(ret->off==-1 && ret->pos==0 && ret->state==0) - basic_ios_char_setstate(base, IOSTATE_failbit); - - return ret; -} - -/* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */ -/* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12) -basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - - TRACE("(%p %ld %d)\n", this, off, dir); - - if(!ios_base_fail(&base->base)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - fpos_int ret; - - basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in); - - if(ret.off==-1 && ret.pos==0 && ret.state==0) - basic_ios_char_setstate(base, IOSTATE_failbit); - else - basic_ios_char_clear(base, IOSTATE_goodbit); - return this; - }else - basic_ios_char_clear(base, IOSTATE_goodbit); - - return this; -} - -/* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */ -/* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28) -basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - - TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos)); - - if(!ios_base_fail(&base->base)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - fpos_int ret; - - basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in); - - if(ret.off==-1 && ret.pos==0 && ret.state==0) - basic_ios_char_setstate(base, IOSTATE_failbit); - else - basic_ios_char_clear(base, IOSTATE_goodbit); - return this; - }else - basic_ios_char_clear(base, IOSTATE_goodbit); - - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8) -basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - LONG tmp; - - first.strbuf = strbuf; - num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp); - - if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp)) - *v = tmp; - else - state |= IOSTATE_failbit; - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8) -basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8) -basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_long(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8) -basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8) -basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_long(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8) -basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8) -basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_float(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8) -basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_double(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8) -basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8) -basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_void(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8) -basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8) -basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8) -basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_char_sentry_create(this, FALSE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - const num_get *numget = num_get_char_use_facet(strbuf->loc); - istreambuf_iterator_char first={0}, last={0}; - - first.strbuf = strbuf; - num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state); - return this; -} - -/* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */ -/* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */ -basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim( - basic_istream_char *istream, basic_string_char *str, char delim) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(istream); - IOSB_iostate state = IOSTATE_goodbit; - int c = (unsigned char)delim; - - TRACE("(%p %p %c)\n", istream, str, delim); - - if(basic_istream_char_sentry_create(istream, TRUE)) { - basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); - MSVCP_basic_string_char_clear(str); - - c = basic_streambuf_char_sgetc(strbuf); - for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf)) - MSVCP_basic_string_char_append_ch(str, c); - if(c==EOF) state |= IOSTATE_eofbit; - else if(c==(unsigned char)delim) basic_streambuf_char_sbumpc(strbuf); - - if(!MSVCP_basic_string_char_length(str) && c!=(unsigned char)delim) state |= IOSTATE_failbit; - } - basic_istream_char_sentry_destroy(istream); - - basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state); - return istream; -} - -/* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -basic_istream_char* __cdecl basic_istream_char_getline_bstr( - basic_istream_char *istream, basic_string_char *str) -{ - return basic_istream_char_getline_bstr_delim(istream, str, '\n'); -} - -/* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -basic_istream_char* __cdecl basic_istream_char_read_bstr( - basic_istream_char *istream, basic_string_char *str) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(istream); - IOSB_iostate state = IOSTATE_failbit; - int c = '\n'; - - TRACE("(%p %p)\n", istream, str); - - if(basic_istream_char_sentry_create(istream, FALSE)) { - const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc); - MSVCP_size_t count = ios_base_width_get(&base->base); - - if(!count) - count = -1; - - MSVCP_basic_string_char_clear(str); - - for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); - c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0; - c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) { - state = IOSTATE_goodbit; - MSVCP_basic_string_char_append_ch(str, c); - } - } - basic_istream_char_sentry_destroy(istream); - - ios_base_width_set(&base->base, 0); - basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return istream; -} - -/* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */ -/* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */ -basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(istream); - IOSB_iostate state = IOSTATE_failbit; - int c = '\n'; - - TRACE("(%p %p)\n", istream, str); - - if(basic_istream_char_sentry_create(istream, FALSE)) { - const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc); - MSVCP_size_t count = ios_base_width_get(&base->base)-1; - - for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); - c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0; - c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) { - state = IOSTATE_goodbit; - *str++ = c; - } - } - basic_istream_char_sentry_destroy(istream); - - *str = 0; - ios_base_width_set(&base->base, 0); - basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return istream; -} - -/* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */ -/* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */ -/* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */ -basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch) -{ - IOSB_iostate state = IOSTATE_failbit; - int c = 0; - - TRACE("(%p %p)\n", istream, ch); - - if(basic_istream_char_sentry_create(istream, FALSE)) { - c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get( - basic_istream_char_get_basic_ios(istream))); - if(c != EOF) { - state = IOSTATE_goodbit; - *ch = c; - } - } - basic_istream_char_sentry_destroy(istream); - - basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), - state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return istream; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8) -basic_istream_char* __thiscall basic_istream_char_read_streambuf( - basic_istream_char *this, basic_streambuf_char *streambuf) -{ - basic_ios_char *base = basic_istream_char_get_basic_ios(this); - IOSB_iostate state = IOSTATE_failbit; - int c = '\n'; - - TRACE("(%p %p)\n", this, streambuf); - - if(basic_istream_char_sentry_create(this, FALSE)) { - for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF; - c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) { - state = IOSTATE_goodbit; - if(basic_streambuf_char_sputc(streambuf, c) == EOF) - break; - } - } - basic_istream_char_sentry_destroy(this); - - basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8) -basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this, - basic_istream_char* (__cdecl *pfunc)(basic_istream_char*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(this); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8) -basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this, - basic_ios_char* (__cdecl *pfunc)(basic_ios_char*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(basic_istream_char_get_basic_ios(this)); - return this; -} - -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */ -/* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8) -basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this, - ios_base* (__cdecl *pfunc)(ios_base*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(&basic_istream_char_get_basic_ios(this)->base); - return this; -} - -/* Caution: basic_istream uses virtual inheritance. */ -static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this) -{ - return (basic_ios_wchar*)((char*)this+this->vbtable[1]); -} - -static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]); -} - -static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]); -} - -/* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */ -/* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init, 20) -basic_istream_wchar* __thiscall basic_istream_wchar_ctor_init(basic_istream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init) -{ - basic_ios_wchar *base; - - TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init); - - if(virt_init) { - this->vbtable = basic_istream_wchar_vbtable; - base = basic_istream_wchar_get_basic_ios(this); - basic_ios_wchar_ctor(base); - }else { - base = basic_istream_wchar_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_istream_wchar_vtable; - this->count = 0; - if(!noinit) - basic_ios_wchar_init(base, strbuf, isstd); - return this; -} - -/* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */ -/* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_init, 20) -basic_istream_wchar* __thiscall basic_istream_short_ctor_init(basic_istream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init) -{ - basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init); - basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable; - return this; -} - -/* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */ -/* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor, 16) -basic_istream_wchar* __thiscall basic_istream_wchar_ctor(basic_istream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init) -{ - return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init); -} - -/* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */ -/* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16) -basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init) -{ - return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init); -} - -/* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized, 12) -basic_istream_wchar* __thiscall basic_istream_wchar_ctor_uninitialized( - basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init) -{ - basic_ios_wchar *base; - - TRACE("(%p %d %d)\n", this, uninitialized, virt_init); - - if(virt_init) { - this->vbtable = basic_istream_wchar_vbtable; - base = basic_istream_wchar_get_basic_ios(this); - basic_ios_wchar_ctor(base); - }else { - base = basic_istream_wchar_get_basic_ios(this); - } - - base->base.vtable = &MSVCP_basic_istream_wchar_vtable; - ios_base_Addstd(&base->base); - return this; -} - -/* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */ -/* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12) -basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized( - basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init) -{ - basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init); - basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable; - return this; -} - -/* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4) -void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base) -{ - basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base); - - /* don't destroy virtual base here */ - TRACE("(%p)\n", this); -} - -/* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4) -void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this) -{ - TRACE("(%p)\n", this); - basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this)); -} - -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_istream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_istream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */ -/* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */ -/* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */ -/* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx, 8) -MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - - TRACE("(%p %d)\n", this, noskip); - - if(ios_base_good(&base->base)) { - if(basic_ios_wchar_tie_get(base)) - basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base)); - - if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - const ctype_wchar *ctype = ctype_wchar_use_facet(base->strbuf->loc); - int ch; - - for(ch = basic_streambuf_wchar_sgetc(strbuf); ; - ch = basic_streambuf_wchar_snextc(strbuf)) { - if(ch == WEOF) { - basic_ios_wchar_setstate(base, IOSTATE_eofbit); - break; - } - - if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch)) - break; - } - } - } - - if(!ios_base_good(&base->base)) { - basic_ios_wchar_setstate(base, IOSTATE_failbit); - return FALSE; - } - return TRUE; -} - -/* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */ -/* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */ -/* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */ -/* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8) -MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip) -{ - return basic_istream_wchar__Ipfx(this, noskip); -} - -/* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4) -void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this) -{ - TRACE("(%p)\n", this); -} - -static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr); - - if(basic_ios_wchar_rdbuf_get(base)) - basic_streambuf_wchar__Lock(base->strbuf); - - return basic_istream_wchar_ipfx(istr, noskip); -} - -static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr); - - if(basic_ios_wchar_rdbuf_get(base)) - basic_streambuf_wchar__Unlock(base->strbuf); -} - -/* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */ -/* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */ -/* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */ -/* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4) -int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this) -{ - TRACE("(%p)\n", this); - return this->count; -} - -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */ -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4) -unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int ret; - - TRACE("(%p)\n", this); - - this->count = 0; - - if(!basic_istream_wchar_sentry_create(this, TRUE)) { - basic_istream_wchar_sentry_destroy(this); - return WEOF; - } - - ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base)); - basic_istream_wchar_sentry_destroy(this); - if(ret == WEOF) - basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit); - else - this->count++; - - return ret; -} - -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */ -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch) -{ - unsigned short ret; - - TRACE("(%p %p)\n", this, ch); - - ret = basic_istream_wchar_get(this); - if(ret != WEOF) - *ch = (wchar_t)ret; - return this; -} - -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */ -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16) -basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - unsigned short ch = delim; - - TRACE("(%p %p %ld %c)\n", this, str, count, delim); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - - for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1; - ch = basic_streambuf_wchar_snextc(strbuf)) { - if(ch==WEOF || ch==delim) - break; - - *str++ = ch; - this->count++; - count--; - } - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) | - (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - if(count > 0) - *str = 0; - return this; -} - -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */ -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12) -basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count) -{ - return basic_istream_wchar_get_str_delim(this, str, count, '\n'); -} - -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */ -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12) -basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - unsigned short ch = delim; - - TRACE("(%p %p %c)\n", this, strbuf, delim); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base); - - for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ; - ch = basic_streambuf_wchar_snextc(strbuf_read)) { - if(ch==WEOF || ch==delim) - break; - - if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF) - break; - this->count++; - } - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) | - (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return this; -} - -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */ -/* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */ -/* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf) -{ - return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n'); -} - -/* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */ -/* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */ -/* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */ -/* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16) -basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - unsigned short ch = delim; - - TRACE("(%p %p %ld %c)\n", this, str, count, delim); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - - while(count > 1) { - ch = basic_streambuf_wchar_sbumpc(strbuf); - - if(ch==WEOF || ch==delim) - break; - - *str++ = ch; - this->count++; - count--; - } - - if(ch == delim) - this->count++; - else if(ch != WEOF) { - ch = basic_streambuf_wchar_sgetc(strbuf); - - if(ch == delim) { - basic_streambuf_wchar__Gninc(strbuf); - this->count++; - } - } - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) | - (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit)); - if(count > 0) - *str = 0; - return this; -} - -/* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */ -/* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */ -/* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */ -/* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12) -basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count) -{ - return basic_istream_wchar_getline_delim(this, str, count, '\n'); -} - -/* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */ -/* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */ -/* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */ -/* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12) -basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - unsigned short ch = delim; - unsigned int state; - - TRACE("(%p %ld %d)\n", this, count, delim); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - state = IOSTATE_goodbit; - - while(count > 0) { - ch = basic_streambuf_wchar_sbumpc(strbuf); - - if(ch==WEOF) { - state = IOSTATE_eofbit; - break; - } - - if(ch==delim) - break; - - this->count++; - if(count != INT_MAX) - count--; - } - }else - state = IOSTATE_failbit; - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */ -/* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */ -/* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */ -/* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */ -basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream); - unsigned short ch = '\n'; - - TRACE("(%p)\n", istream); - - if(basic_istream_wchar_sentry_create(istream, TRUE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - const ctype_wchar *ctype = ctype_wchar_use_facet(strbuf->loc); - - for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch); - ch = basic_streambuf_wchar_snextc(strbuf)) { - if(ch == WEOF) - break; - } - } - basic_istream_wchar_sentry_destroy(istream); - - if(ch == WEOF) - basic_ios_wchar_setstate(base, IOSTATE_eofbit); - return istream; -} - -/* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */ -/* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */ -/* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */ -/* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4) -unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - unsigned short ret = WEOF; - - TRACE("(%p)\n", this); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE)) - ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); - basic_istream_wchar_sentry_destroy(this); - - if (ret == WEOF) - basic_ios_wchar_setstate(base, IOSTATE_eofbit); - - return ret; -} - -/* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */ -/* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */ -/* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */ -/* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Read_s, 16) -basic_istream_wchar* __thiscall basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %p %lu %ld)\n", this, str, size, count); - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - - this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count); - if(this->count != count) - state |= IOSTATE_failbit | IOSTATE_eofbit; - }else { - this->count = 0; - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */ -/* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */ -/* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */ -/* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12) -basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count) -{ - return basic_istream_wchar__Read_s(this, str, count, count); -} - -/* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */ -/* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */ -/* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */ -/* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Readsome_s, 16) -streamsize __thiscall basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %p %lu %ld)\n", this, str, size, count); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base)); - if(avail > count) - avail = count; - - if(avail == -1) - state |= IOSTATE_eofbit; - else if(avail > 0) - basic_istream_wchar__Read_s(this, str, size, avail); - }else { - state |= IOSTATE_failbit; - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this->count; -} - -/* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */ -/* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */ -/* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */ -/* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12) -streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count) -{ - return basic_istream_wchar__Readsome_s(this, str, count, count); -} - -/* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */ -/* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */ -/* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */ -/* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p %c)\n", this, ch); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - - if(!ios_base_good(&base->base)) - state |= IOSTATE_failbit; - else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF) - state |= IOSTATE_badbit; - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */ -/* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */ -/* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */ -/* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4) -basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - IOSB_iostate state = IOSTATE_goodbit; - - TRACE("(%p)\n", this); - - this->count = 0; - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - - if(!ios_base_good(&base->base)) - state |= IOSTATE_failbit; - else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF) - state |= IOSTATE_badbit; - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */ -/* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */ -/* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */ -/* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4) -int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - - TRACE("(%p)\n", this); - - if(!strbuf) - return -1; - - if(basic_istream_wchar_sentry_create(this, TRUE)) { - if(basic_streambuf_wchar_pubsync(strbuf) != -1) { - basic_istream_wchar_sentry_destroy(this); - return 0; - } - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, IOSTATE_badbit); - return -1; -} - -/* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */ -/* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */ -/* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */ -/* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8) -fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - - TRACE("(%p %p)\n", this, ret); - - if(ios_base_fail(&base->base)) { - ret->off = -1; - ret->pos = 0; - ret->state = 0; - return ret; - } - - basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base), - ret, 0, SEEKDIR_cur, OPENMODE_in); - if(ret->off==-1 && ret->pos==0 && ret->state==0) - basic_ios_wchar_setstate(base, IOSTATE_failbit); - - return ret; -} - -/* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */ -/* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */ -/* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */ -/* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 12) -basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - - TRACE("(%p %ld %d)\n", this, off, dir); - - if(!ios_base_fail(&base->base)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - fpos_int ret; - - basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in); - - if(ret.off==-1 && ret.pos==0 && ret.state==0) - basic_ios_wchar_setstate(base, IOSTATE_failbit); - else - basic_ios_wchar_clear(base, IOSTATE_goodbit); - return this; - }else - basic_ios_wchar_clear(base, IOSTATE_goodbit); - - return this; -} - -/* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */ -/* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */ -/* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */ -/* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28) -basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - - TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos)); - - if(!ios_base_fail(&base->base)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - fpos_int ret; - - basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in); - - if(ret.off==-1 && ret.pos==0 && ret.state==0) - basic_ios_wchar_setstate(base, IOSTATE_failbit); - else - basic_ios_wchar_clear(base, IOSTATE_goodbit); - return this; - }else - basic_ios_wchar_clear(base, IOSTATE_goodbit); - - return this; -} - -static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - LONG tmp; - - first.strbuf = strbuf; - num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp); - - if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp)) - *v = tmp; - else - state |= IOSTATE_failbit; - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_short(basic_istream_wchar *this, short *v) -{ - return basic_istream_read_short(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v) -{ - return basic_istream_read_short(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_ushort(basic_istream_wchar *this, unsigned short *v) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - const num_get *numget = num_get_wchar_use_facet(strbuf->loc); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_ushort(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_int(basic_istream_wchar *this, int *v) -{ - return basic_istream_read_int(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v) -{ - return basic_istream_read_int(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_uint(basic_istream_wchar *this, unsigned int *v) -{ - return basic_istream_read_uint(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v) -{ - return basic_istream_read_uint(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_long(basic_istream_wchar *this, LONG *v) -{ - return basic_istream_read_long(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v) -{ - return basic_istream_read_long(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_ulong(basic_istream_wchar *this, ULONG *v) -{ - return basic_istream_read_ulong(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v) -{ - return basic_istream_read_ulong(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_float(basic_istream_wchar *this, float *v) -{ - return basic_istream_read_float(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v) -{ - return basic_istream_read_float(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_double(basic_istream_wchar *this, double *v) -{ - return basic_istream_read_double(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v) -{ - return basic_istream_read_double(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_ldouble(basic_istream_wchar *this, double *v) -{ - return basic_istream_read_ldouble(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v) -{ - return basic_istream_read_ldouble(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_ptr(basic_istream_wchar *this, void **v) -{ - return basic_istream_read_ptr(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v) -{ - return basic_istream_read_ptr(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_int64(basic_istream_wchar *this, __int64 *v) -{ - return basic_istream_read_int64(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v) -{ - return basic_istream_read_int64(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_uint64(basic_istream_wchar *this, unsigned __int64 *v) -{ - return basic_istream_read_uint64(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v) -{ - return basic_istream_read_uint64(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - int state = IOSTATE_goodbit; - - TRACE("(%p %p)\n", this, v); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - istreambuf_iterator_wchar first={0}, last={0}; - - first.strbuf = strbuf; - num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v); - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_bool(basic_istream_wchar *this, MSVCP_bool *v) -{ - return basic_istream_read_bool(this, v, num_get_wchar_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8) -basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v) -{ - return basic_istream_read_bool(this, v, num_get_short_use_facet( - basic_istream_wchar_get_basic_ios(this)->strbuf->loc)); -} - -/* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */ -/* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */ -/* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@G@Z */ -/* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@G@Z */ -basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim( - basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream); - IOSB_iostate state = IOSTATE_goodbit; - int c = delim; - - TRACE("(%p %p %c)\n", istream, str, delim); - - if(basic_istream_wchar_sentry_create(istream, TRUE)) { - basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); - MSVCP_basic_string_wchar_clear(str); - - c = basic_streambuf_wchar_sgetc(strbuf); - for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf)) - MSVCP_basic_string_wchar_append_ch(str, c); - if(c==delim) basic_streambuf_wchar_sbumpc(strbuf); - else if(c==WEOF) state |= IOSTATE_eofbit; - - if(!MSVCP_basic_string_wchar_length(str) && c!=delim) state |= IOSTATE_failbit; - } - basic_istream_wchar_sentry_destroy(istream); - - basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream), state); - return istream; -} - -/* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr( - basic_istream_wchar *istream, basic_string_wchar *str) -{ - return basic_istream_wchar_getline_bstr_delim(istream, str, '\n'); -} - -static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream, - basic_string_wchar *str, const ctype_wchar *ctype) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream); - IOSB_iostate state = IOSTATE_failbit; - int c = '\n'; - - TRACE("(%p %p)\n", istream, str); - - if(basic_istream_wchar_sentry_create(istream, FALSE)) { - MSVCP_size_t count = ios_base_width_get(&base->base); - - if(!count) - count = -1; - - MSVCP_basic_string_wchar_clear(str); - - for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); - c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0; - c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) { - state = IOSTATE_goodbit; - MSVCP_basic_string_wchar_append_ch(str, c); - } - } - basic_istream_wchar_sentry_destroy(istream); - - ios_base_width_set(&base->base, 0); - basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return istream; -} - -/* ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr( - basic_istream_wchar *istream, basic_string_wchar *str) -{ - return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet( - basic_istream_wchar_get_basic_ios(istream)->strbuf->loc)); -} - -/* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -basic_istream_wchar* __cdecl basic_istream_short_read_bstr( - basic_istream_wchar *istream, basic_string_wchar *str) -{ - return basic_istream_read_bstr(istream, str, ctype_short_use_facet( - basic_istream_wchar_get_basic_ios(istream)->strbuf->loc)); -} - -static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream); - IOSB_iostate state = IOSTATE_failbit; - unsigned short c = '\n'; - - TRACE("(%p %p)\n", istream, str); - - if(basic_istream_wchar_sentry_create(istream, FALSE)) { - MSVCP_size_t count = ios_base_width_get(&base->base)-1; - - for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); - c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0; - c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) { - state = IOSTATE_goodbit; - *str++ = c; - } - } - basic_istream_wchar_sentry_destroy(istream); - - *str = 0; - ios_base_width_set(&base->base, 0); - basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return istream; -} - -/* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@PA_W@Z */ -/* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@PEA_W@Z */ -basic_istream_wchar* __cdecl basic_istream_wchar_read_str(basic_istream_wchar *istream, wchar_t *str) -{ - return basic_istream_read_str(istream, str, ctype_wchar_use_facet( - basic_istream_wchar_get_basic_ios(istream)->strbuf->loc)); -} - -/* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */ -/* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */ -basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str) -{ - return basic_istream_read_str(istream, str, ctype_short_use_facet( - basic_istream_wchar_get_basic_ios(istream)->strbuf->loc)); -} - -/* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */ -/* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */ -/* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */ -/* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */ -basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch) -{ - IOSB_iostate state = IOSTATE_failbit; - unsigned short c = 0; - - TRACE("(%p %p)\n", istream, ch); - - if(basic_istream_wchar_sentry_create(istream, FALSE)) { - c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get( - basic_istream_wchar_get_basic_ios(istream))); - if(c != WEOF) { - state = IOSTATE_goodbit; - *ch = c; - } - } - basic_istream_wchar_sentry_destroy(istream); - - basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream), - state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return istream; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf( - basic_istream_wchar *this, basic_streambuf_wchar *streambuf) -{ - basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this); - IOSB_iostate state = IOSTATE_failbit; - unsigned short c = '\n'; - - TRACE("(%p %p)\n", this, streambuf); - - if(basic_istream_wchar_sentry_create(this, FALSE)) { - for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF; - c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) { - state = IOSTATE_goodbit; - if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF) - break; - } - } - basic_istream_wchar_sentry_destroy(this); - - basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit)); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this, - basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(this); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this, - basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(basic_istream_wchar_get_basic_ios(this)); - return this; -} - -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */ -/* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */ -/* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */ -DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8) -basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base( - basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*)) -{ - TRACE("(%p %p)\n", this, pfunc); - pfunc(&basic_istream_wchar_get_basic_ios(this)->base); - return this; -} - -static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]); -} - -static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]); -} - -/* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -/* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12) -basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %p %d)\n", this, strbuf, virt_init); - - if(virt_init) { - this->base1.vbtable = basic_iostream_char_vbtable1; - this->base2.vbtable = basic_iostream_char_vbtable2; - basic_ios = basic_istream_char_get_basic_ios(&this->base1); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base1); - } - - basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable; - - basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE); - basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE); - return this; -} - -/* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4) -void __thiscall basic_iostream_char_dtor(basic_ios_char *base) -{ - basic_iostream_char *this = basic_iostream_char_from_basic_ios(base); - - TRACE("(%p)\n", this); - basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2)); - basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1)); -} - -/* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4) -void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this) -{ - TRACE("(%p)\n", this); - basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1)); -} - -DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8) -basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_iostream_char *this = basic_iostream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_iostream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_iostream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]); -} - -static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]); -} - -/* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -/* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor, 12) -basic_iostream_wchar* __thiscall basic_iostream_wchar_ctor(basic_iostream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %p %d)\n", this, strbuf, virt_init); - - if(virt_init) { - this->base1.vbtable = basic_iostream_wchar_vbtable1; - this->base2.vbtable = basic_iostream_wchar_vbtable2; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base1); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base1); - } - - basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE); - basic_ostream_wchar_ctor_uninitialized(&this->base2, 0, FALSE, FALSE); - - basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable; - return this; -} - -/* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -/* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */ -DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12) -basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this, - basic_streambuf_wchar *strbuf, MSVCP_bool virt_init) -{ - basic_iostream_wchar_ctor(this, strbuf, virt_init); - basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable; - return this; -} - -/* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4) -void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base) -{ - basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base); - - TRACE("(%p)\n", this); - basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2)); - basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1)); -} - -/* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4) -void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this) -{ - TRACE("(%p)\n", this); - basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1)); -} - -DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8) -basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_iostream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_iostream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]); -} - -static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]); -} - -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */ -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8) -basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %d)\n", this, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ofstream_char_vbtable; - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - } - - basic_filebuf_char_ctor(&this->filebuf); - basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable; - return this; -} - -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file, 12) -basic_ofstream_char* __thiscall basic_ofstream_char_ctor_file( - basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %p %d)\n", this, file, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ofstream_char_vbtable; - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - } - - basic_filebuf_char_ctor_file(&this->filebuf, file); - basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable; - return this; -} - -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */ -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 20) -basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init); - - basic_ofstream_char_ctor(this, virt_init); - - if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar, 20) -basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name_wchar(basic_ofstream_char *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init); - - basic_ofstream_char_ctor(this, virt_init); - - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4) -void __thiscall basic_ofstream_char_dtor(basic_ios_char *base) -{ - basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base)); - basic_filebuf_char_dtor(&this->filebuf); -} - -/* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4) -void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this) -{ - TRACE("(%p)\n", this); - - basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8) -basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ofstream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ofstream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4) -void __thiscall basic_ofstream_char_close(basic_ofstream_char *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_char_close(&this->filebuf)) { - basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4) -MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this) -{ - TRACE("(%p)\n", this); - return basic_filebuf_char_is_open(&this->filebuf); -} - -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 16) -void __thiscall basic_ofstream_char_open(basic_ofstream_char *this, - const char *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12) -void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this, - const char *name, unsigned int mode) -{ - basic_ofstream_char_open(this, name, mode, _SH_DENYNO); -} - -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar, 16) -void __thiscall basic_ofstream_char_open_wchar(basic_ofstream_char *this, - const wchar_t *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old, 12) -void __thiscall basic_ofstream_char_open_wchar_old(basic_ofstream_char *this, - const wchar_t *name, unsigned int mode) -{ - basic_ofstream_char_open_wchar(this, name, mode, _SH_DENYNO); -} - -/* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */ -/* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4) -basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this) -{ - TRACE("(%p)\n", this); - return (basic_filebuf_char*)&this->filebuf; -} - -static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]); -} - -static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]); -} - -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */ -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor, 8) -basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %d)\n", this, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ofstream_wchar_vbtable; - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - } - - basic_filebuf_wchar_ctor(&this->filebuf); - basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable; - return this; -} - -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */ -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8) -basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init) -{ - basic_ofstream_wchar_ctor(this, virt_init); - basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable; - return this; -} - -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_file, 12) -basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_file( - basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %p %d)\n", this, file, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ofstream_wchar_vbtable; - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - } - - basic_filebuf_wchar_ctor_file(&this->filebuf, file); - basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable; - return this; -} - -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_file, 12) -basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_file( - basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init) -{ - basic_ofstream_wchar_ctor_file(this, file, virt_init); - basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable; - return this; -} - -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */ -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_name, 20) -basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_name(basic_ofstream_wchar *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init); - - basic_ofstream_wchar_ctor(this, virt_init); - - if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */ -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 20) -basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - basic_ofstream_wchar_ctor_name(this, name, mode, prot, virt_init); - basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable; - return this; -} - -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_name_wchar, 20) -basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_name_wchar(basic_ofstream_wchar *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init); - - basic_ofstream_wchar_ctor(this, virt_init); - - if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name_wchar, 20) -basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name_wchar(basic_ofstream_wchar *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - basic_ofstream_wchar_ctor_name_wchar(this, name, mode, prot, virt_init); - basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable; - return this; -} - -/* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4) -void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base) -{ - basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base)); - basic_filebuf_wchar_dtor(&this->filebuf); -} - -/* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4) -void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this) -{ - TRACE("(%p)\n", this); - - basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8) -basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ofstream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ofstream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4) -void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_wchar_close(&this->filebuf)) { - basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */ -/* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4) -MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this) -{ - TRACE("(%p)\n", this); - return basic_filebuf_wchar_is_open(&this->filebuf); -} - -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 16) -void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this, - const char *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12) -void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this, - const char *name, unsigned int mode) -{ - basic_ofstream_wchar_open(this, name, mode, _SH_DENYNO); -} - -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_wchar, 16) -void __thiscall basic_ofstream_wchar_open_wchar(basic_ofstream_wchar *this, - const wchar_t *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) { - basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_wchar_old, 12) -void __thiscall basic_ofstream_wchar_open_wchar_old(basic_ofstream_wchar *this, - const wchar_t *name, unsigned int mode) -{ - basic_ofstream_wchar_open_wchar(this, name, mode, _SH_DENYNO); -} - -/* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */ -/* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4) -basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this) -{ - TRACE("(%p)\n", this); - return (basic_filebuf_wchar*)&this->filebuf; -} - -static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]); -} - -static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]); -} - -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */ -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8) -basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %d)\n", this, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ifstream_char_vbtable; - basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base); - } - - basic_filebuf_char_ctor(&this->filebuf); - basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable; - return this; -} - -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file, 12) -basic_ifstream_char* __thiscall basic_ifstream_char_ctor_file( - basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %p %d)\n", this, file, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ifstream_char_vbtable; - basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base); - } - - basic_filebuf_char_ctor_file(&this->filebuf, file); - basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable; - return this; -} - -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */ -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 20) -basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init); - - basic_ifstream_char_ctor(this, virt_init); - - if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar, 20) -basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name_wchar(basic_ifstream_char *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init); - - basic_ifstream_char_ctor(this, virt_init); - - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4) -void __thiscall basic_ifstream_char_dtor(basic_ios_char *base) -{ - basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base)); - basic_filebuf_char_dtor(&this->filebuf); -} - -/* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4) -void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this) -{ - TRACE("(%p)\n", this); - - basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8) -basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ifstream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ifstream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4) -void __thiscall basic_ifstream_char_close(basic_ifstream_char *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_char_close(&this->filebuf)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4) -MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this) -{ - TRACE("(%p)\n", this); - return basic_filebuf_char_is_open(&this->filebuf); -} - -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 16) -void __thiscall basic_ifstream_char_open(basic_ifstream_char *this, - const char *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12) -void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this, - const char *name, unsigned int mode) -{ - basic_ifstream_char_open(this, name, mode, _SH_DENYNO); -} - -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar, 16) -void __thiscall basic_ifstream_char_open_wchar(basic_ifstream_char *this, - const wchar_t *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old, 12) -void __thiscall basic_ifstream_char_open_wchar_old(basic_ifstream_char *this, - const wchar_t *name, unsigned int mode) -{ - basic_ifstream_char_open_wchar(this, name, mode, _SH_DENYNO); -} - -/* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */ -/* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4) -basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this) -{ - TRACE("(%p)\n", this); - return (basic_filebuf_char*)&this->filebuf; -} - -static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]); -} - -static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]); -} - -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */ -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor, 8) -basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %d)\n", this, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ifstream_wchar_vbtable; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - } - - basic_filebuf_wchar_ctor(&this->filebuf); - basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable; - return this; -} - -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */ -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8) -basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init) -{ - basic_ifstream_wchar_ctor(this, virt_init); - basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable; - return this; -} - -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_file, 12) -basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_file( - basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %p %d)\n", this, file, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ifstream_wchar_vbtable; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - } - - basic_filebuf_wchar_ctor_file(&this->filebuf, file); - basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable; - return this; -} - -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_file, 12) -basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_file( - basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init) -{ - basic_ifstream_wchar_ctor_file(this, file, virt_init); - basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable; - return this; -} - -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */ -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name, 20) -basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_name(basic_ifstream_wchar *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init); - - basic_ifstream_wchar_ctor(this, virt_init); - - if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */ -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 20) -basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - basic_ifstream_wchar_ctor_name(this, name, mode, prot, virt_init); - basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable; - return this; -} - -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name_wchar, 20) -basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_name_wchar(basic_ifstream_wchar *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init); - - basic_ifstream_wchar_ctor(this, virt_init); - - if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name_wchar, 20) -basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name_wchar(basic_ifstream_wchar *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - basic_ifstream_wchar_ctor_name_wchar(this, name, mode, prot, virt_init); - basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable; - return this; -} - -/* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4) -void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base) -{ - basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base)); - basic_filebuf_wchar_dtor(&this->filebuf); -} - -/* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4) -void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this) -{ - TRACE("(%p)\n", this); - - basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8) -basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ifstream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ifstream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4) -void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_wchar_close(&this->filebuf)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */ -/* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4) -MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this) -{ - TRACE("(%p)\n", this); - return basic_filebuf_wchar_is_open(&this->filebuf); -} - -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 16) -void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this, - const char *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12) -void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this, - const char *name, unsigned int mode) -{ - basic_ifstream_wchar_open(this, name, mode, _SH_DENYNO); -} - -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_wchar, 16) -void __thiscall basic_ifstream_wchar_open_wchar(basic_ifstream_wchar *this, - const wchar_t *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_wchar_old, 12) -void __thiscall basic_ifstream_wchar_open_wchar_old(basic_ifstream_wchar *this, - const wchar_t *name, unsigned int mode) -{ - basic_ifstream_wchar_open_wchar(this, name, mode, _SH_DENYNO); -} - -/* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */ -/* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4) -basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this) -{ - TRACE("(%p)\n", this); - return (basic_filebuf_wchar*)&this->filebuf; -} - -static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]); -} - -static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]); -} - -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */ -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8) -basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %d)\n", this, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_fstream_char_vbtable1; - this->base.base2.vbtable = basic_fstream_char_vbtable2; - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - } - - basic_filebuf_char_ctor(&this->filebuf); - basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable; - return this; -} - -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file, 12) -basic_fstream_char* __thiscall basic_fstream_char_ctor_file(basic_fstream_char *this, - FILE *file, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %p %d)\n", this, file, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_fstream_char_vbtable1; - this->base.base2.vbtable = basic_fstream_char_vbtable2; - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - } - - basic_filebuf_char_ctor_file(&this->filebuf, file); - basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable; - return this; -} - -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */ -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 20) -basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init); - - basic_fstream_char_ctor(this, virt_init); - - if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar, 20) -basic_fstream_char* __thiscall basic_fstream_char_ctor_name_wchar(basic_fstream_char *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init); - - basic_fstream_char_ctor(this, virt_init); - - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */ -/* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4) -void __thiscall basic_fstream_char_dtor(basic_ios_char *base) -{ - basic_fstream_char *this = basic_fstream_char_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base)); - basic_filebuf_char_dtor(&this->filebuf); -} - -/* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4) -void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this) -{ - TRACE("(%p)\n", this); - - basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1)); -} - -DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8) -basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_fstream_char *this = basic_fstream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_fstream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_fstream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */ -/* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4) -void __thiscall basic_fstream_char_close(basic_fstream_char *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_char_close(&this->filebuf)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4) -MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this) -{ - TRACE("(%p)\n", this); - return basic_filebuf_char_is_open(&this->filebuf); -} - -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 16) -void __thiscall basic_fstream_char_open(basic_fstream_char *this, - const char *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12) -void __thiscall basic_fstream_char_open_old(basic_fstream_char *this, - const char *name, unsigned int mode) -{ - basic_fstream_char_open(this, name, mode, _SH_DENYNO); -} - -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar, 16) -void __thiscall basic_fstream_char_open_wchar(basic_fstream_char *this, - const wchar_t *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) { - basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old, 12) -void __thiscall basic_fstream_char_open_wchar_old(basic_fstream_char *this, - const wchar_t *name, unsigned int mode) -{ - basic_fstream_char_open_wchar(this, name, mode, _SH_DENYNO); -} - -/* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */ -/* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4) -basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this) -{ - TRACE("(%p)\n", this); - return (basic_filebuf_char*)&this->filebuf; -} - -static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]); -} - -static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]); -} - -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */ -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor, 8) -basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %d)\n", this, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_fstream_wchar_vbtable1; - this->base.base2.vbtable = basic_fstream_wchar_vbtable2; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - } - - basic_filebuf_wchar_ctor(&this->filebuf); - basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable; - return this; -} - -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */ -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8) -basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init) -{ - basic_fstream_wchar_ctor(this, virt_init); - basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable; - return this; -} - -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_file, 12) -basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_file(basic_fstream_wchar *this, - FILE *file, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %p %d)\n", this, file, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_fstream_wchar_vbtable1; - this->base.base2.vbtable = basic_fstream_wchar_vbtable2; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - } - - basic_filebuf_wchar_ctor_file(&this->filebuf, file); - basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable; - return this; -} - -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */ -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_file, 12) -basic_fstream_wchar* __thiscall basic_fstream_short_ctor_file(basic_fstream_wchar *this, - FILE *file, MSVCP_bool virt_init) -{ - basic_fstream_wchar_ctor_file(this, file, virt_init); - basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable; - return this; -} - -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name, 20) -basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_name(basic_fstream_wchar *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init); - - basic_fstream_wchar_ctor(this, virt_init); - - if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 20) -basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this, - const char *name, int mode, int prot, MSVCP_bool virt_init) -{ - basic_fstream_wchar_ctor_name(this, name, mode, prot, virt_init); - basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable; - return this; -} - -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name_wchar, 20) -basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_name_wchar(basic_fstream_wchar *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init); - - basic_fstream_wchar_ctor(this, virt_init); - - if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } - return this; -} - -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */ -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */ -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */ -/* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name_wchar, 20) -basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name_wchar(basic_fstream_wchar *this, - const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) -{ - basic_fstream_wchar_ctor_name_wchar(this, name, mode, prot, virt_init); - basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable; - return this; -} - -/* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */ -/* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */ -/* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */ -/* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4) -void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base) -{ - basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base)); - basic_filebuf_wchar_dtor(&this->filebuf); -} - -/* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4) -void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this) -{ - TRACE("(%p)\n", this); - - basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1)); -} - -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8) -basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_fstream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_fstream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */ -/* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */ -/* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */ -/* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4) -void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this) -{ - TRACE("(%p)\n", this); - - if(!basic_filebuf_wchar_close(&this->filebuf)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */ -/* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */ -/* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4) -MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this) -{ - TRACE("(%p)\n", this); - return basic_filebuf_wchar_is_open(&this->filebuf); -} - -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 16) -void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this, - const char *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, name, mode, prot); - - if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12) -void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this, - const char *name, unsigned int mode) -{ - basic_fstream_wchar_open(this, name, mode, _SH_DENYNO); -} - -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_wchar, 16) -void __thiscall basic_fstream_wchar_open_wchar(basic_fstream_wchar *this, - const wchar_t *name, int mode, int prot) -{ - TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - - if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode, prot)) { - basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit); - } -} - -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */ -/* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_wchar_old, 12) -void __thiscall basic_fstream_wchar_open_wchar_old(basic_fstream_wchar *this, - const wchar_t *name, unsigned int mode) -{ - basic_fstream_wchar_open_wchar(this, name, mode, _SH_DENYNO); -} - -/* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */ -/* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */ -/* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4) -basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this) -{ - TRACE("(%p)\n", this); - return (basic_filebuf_wchar*)&this->filebuf; -} - -static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]); -} - -static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]); -} - -/* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -/* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16) -basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this, - const basic_string_char *str, int mode, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %p %d %d)\n", this, str, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ostringstream_char_vbtable; - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - } - - basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out); - basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable; - return this; -} - -/* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */ -/* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12) -basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode( - basic_ostringstream_char *this, int mode, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %d %d)\n", this, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ostringstream_char_vbtable; - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_ostream_char_get_basic_ios(&this->base); - } - - basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out); - basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable; - return this; -} - -/* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 4) -basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor( - basic_ostringstream_char *this) -{ - return basic_ostringstream_char_ctor_mode(this, 0, TRUE); -} - -/* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */ -/* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4) -void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base) -{ - basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_stringbuf_char_dtor(&this->strbuf); - basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base)); -} - -/* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4) -void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this) -{ - TRACE("(%p)\n", this); - - basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8) -basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ostringstream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ostringstream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?rdbuf@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?rdbuf@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4) -basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this) -{ - TRACE("(%p)\n", this); - return (basic_stringbuf_char*)&this->strbuf; -} - -/* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -/* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8) -void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str) -{ - TRACE("(%p %p)\n", this, str); - basic_stringbuf_char_str_set(&this->strbuf, str); -} - -/* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8) -basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret) -{ - TRACE("(%p %p)\n", this, ret); - return basic_stringbuf_char_str_get(&this->strbuf, ret); -} - -static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]); -} - -static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]); -} - -/* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -/* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_str, 16) -basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this, - const basic_string_wchar *str, int mode, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %p %d %d)\n", this, str, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ostringstream_wchar_vbtable; - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - } - - basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out); - basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable; - return this; -} - -/* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -/* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16) -basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this, - const basic_string_wchar *str, int mode, MSVCP_bool virt_init) -{ - basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init); - basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable; - return this; -} - -/* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */ -/* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_mode, 12) -basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor_mode( - basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %d %d)\n", this, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_ostringstream_wchar_vbtable; - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_ostream_wchar_get_basic_ios(&this->base); - } - - basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out); - basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable; - return this; -} - -/* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */ -/* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12) -basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode( - basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init) -{ - basic_ostringstream_wchar_ctor_mode(this, mode, virt_init); - basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable; - return this; -} - -/* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor, 4) -basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor( - basic_ostringstream_wchar *this) -{ - return basic_ostringstream_wchar_ctor_mode(this, 0, TRUE); -} - -/* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 4) -basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor( - basic_ostringstream_wchar *this) -{ - return basic_ostringstream_short_ctor_mode(this, 0, TRUE); -} - -/* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */ -/* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */ -/* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */ -/* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4) -void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base) -{ - basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_stringbuf_wchar_dtor(&this->strbuf); - basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base)); -} - -/* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -/* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4) -void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this) -{ - TRACE("(%p)\n", this); - - basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8) -basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_ostringstream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_ostringstream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?rdbuf@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?rdbuf@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?rdbuf@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?rdbuf@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4) -basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this) -{ - TRACE("(%p)\n", this); - return (basic_stringbuf_wchar*)&this->strbuf; -} - -/* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -/* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8) -void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str) -{ - TRACE("(%p %p)\n", this, str); - basic_stringbuf_wchar_str_set(&this->strbuf, str); -} - -/* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8) -basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret) -{ - TRACE("(%p %p)\n", this, ret); - return basic_stringbuf_wchar_str_get(&this->strbuf, ret); -} - -static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]); -} - -static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]); -} - -/* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -/* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16) -basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this, - const basic_string_char *str, int mode, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %p %d %d)\n", this, str, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_istringstream_char_vbtable; - basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base); - } - - basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in); - basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable; - return this; -} - -/* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */ -/* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12) -basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode( - basic_istringstream_char *this, int mode, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %d %d)\n", this, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_istringstream_char_vbtable; - basic_ios = basic_istream_char_get_basic_ios(&this->base); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base); - } - - basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in); - basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable; - return this; -} - -/* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 4) -basic_istringstream_char* __thiscall basic_istringstream_char_ctor( - basic_istringstream_char *this) -{ - return basic_istringstream_char_ctor_mode(this, 0, TRUE); -} - -/* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */ -/* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4) -void __thiscall basic_istringstream_char_dtor(basic_ios_char *base) -{ - basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_stringbuf_char_dtor(&this->strbuf); - basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base)); -} - -/* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4) -void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this) -{ - TRACE("(%p)\n", this); - - basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8) -basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_istringstream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_istringstream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?rdbuf@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?rdbuf@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4) -basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this) -{ - TRACE("(%p)\n", this); - return (basic_stringbuf_char*)&this->strbuf; -} - -/* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -/* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8) -void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str) -{ - TRACE("(%p %p)\n", this, str); - basic_stringbuf_char_str_set(&this->strbuf, str); -} - -/* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8) -basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret) -{ - TRACE("(%p %p)\n", this, ret); - return basic_stringbuf_char_str_get(&this->strbuf, ret); -} - -static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]); -} - -static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]); -} - -/* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -/* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_str, 16) -basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this, - const basic_string_wchar *str, int mode, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %p %d %d)\n", this, str, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_istringstream_wchar_vbtable; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - } - - basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in); - basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable; - return this; -} - -/* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -/* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16) -basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this, - const basic_string_wchar *str, int mode, MSVCP_bool virt_init) -{ - basic_istringstream_wchar_ctor_str(this, str, mode, virt_init); - basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable; - return this; -} - -/* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */ -/* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_mode, 12) -basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor_mode( - basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %d %d)\n", this, mode, virt_init); - - if(virt_init) { - this->base.vbtable = basic_istringstream_wchar_vbtable; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base); - } - - basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in); - basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE); - basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable; - return this; -} - -/* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */ -/* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12) -basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode( - basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init) -{ - basic_istringstream_wchar_ctor_mode(this, mode, virt_init); - basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable; - return this; -} - -/* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor, 4) -basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor( - basic_istringstream_wchar *this) -{ - return basic_istringstream_wchar_ctor_mode(this, 0, TRUE); -} - -/* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 4) -basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor( - basic_istringstream_wchar *this) -{ - return basic_istringstream_short_ctor_mode(this, 0, TRUE); -} - -/* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */ -/* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */ -/* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */ -/* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4) -void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base) -{ - basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_stringbuf_wchar_dtor(&this->strbuf); - basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base)); -} - -/* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -/* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4) -void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this) -{ - TRACE("(%p)\n", this); - - basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base)); -} - -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8) -basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_istringstream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_istringstream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?rdbuf@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?rdbuf@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?rdbuf@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?rdbuf@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4) -basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this) -{ - TRACE("(%p)\n", this); - return (basic_stringbuf_wchar*)&this->strbuf; -} - -/* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -/* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8) -void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str) -{ - TRACE("(%p %p)\n", this, str); - basic_stringbuf_wchar_str_set(&this->strbuf, str); -} - -/* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8) -basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret) -{ - TRACE("(%p %p)\n", this, ret); - return basic_stringbuf_wchar_str_get(&this->strbuf, ret); -} - -static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr) -{ - return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]); -} - -static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr) -{ - return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]); -} - -/* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -/* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16) -basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this, - const basic_string_char *str, int mode, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %p %d %d)\n", this, str, mode, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_stringstream_char_vbtable1; - this->base.base2.vbtable = basic_stringstream_char_vbtable2; - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - } - - basic_stringbuf_char_ctor_str(&this->strbuf, str, mode); - basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable; - return this; -} - -/* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */ -/* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12) -basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode( - basic_stringstream_char *this, int mode, MSVCP_bool virt_init) -{ - basic_ios_char *basic_ios; - - TRACE("(%p %d %d)\n", this, mode, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_stringstream_char_vbtable1; - this->base.base2.vbtable = basic_stringstream_char_vbtable2; - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - basic_ios_char_ctor(basic_ios); - }else { - basic_ios = basic_istream_char_get_basic_ios(&this->base.base1); - } - - basic_stringbuf_char_ctor_mode(&this->strbuf, mode); - basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable; - return this; -} - -/* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 4) -basic_stringstream_char* __thiscall basic_stringstream_char_ctor( - basic_stringstream_char *this) -{ - return basic_stringstream_char_ctor_mode( - this, OPENMODE_out|OPENMODE_in, TRUE); -} - -/* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */ -/* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4) -void __thiscall basic_stringstream_char_dtor(basic_ios_char *base) -{ - basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base)); - basic_stringbuf_char_dtor(&this->strbuf); -} - -/* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4) -void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this) -{ - TRACE("(%p)\n", this); - - basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this)); - basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1)); -} - -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8) -basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags) -{ - basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_stringstream_char_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_stringstream_char_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?rdbuf@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?rdbuf@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4) -basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this) -{ - TRACE("(%p)\n", this); - return (basic_stringbuf_char*)&this->strbuf; -} - -/* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -/* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8) -void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str) -{ - TRACE("(%p %p)\n", this, str); - basic_stringbuf_char_str_set(&this->strbuf, str); -} - -/* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8) -basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret) -{ - TRACE("(%p %p)\n", this, ret); - return basic_stringbuf_char_str_get(&this->strbuf, ret); -} - -static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr) -{ - return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]); -} - -static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr) -{ - return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]); -} - -/* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -/* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_str, 16) -basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this, - const basic_string_wchar *str, int mode, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %p %d %d)\n", this, str, mode, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_stringstream_wchar_vbtable1; - this->base.base2.vbtable = basic_stringstream_wchar_vbtable2; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - } - - basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode); - basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable; - return this; -} - -/* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -/* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16) -basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this, - const basic_string_wchar *str, int mode, MSVCP_bool virt_init) -{ - basic_stringstream_wchar_ctor_str(this, str, mode, virt_init); - basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable; - return this; -} - -/* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */ -/* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_mode, 12) -basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor_mode( - basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init) -{ - basic_ios_wchar *basic_ios; - - TRACE("(%p %d %d)\n", this, mode, virt_init); - - if(virt_init) { - this->base.base1.vbtable = basic_stringstream_wchar_vbtable1; - this->base.base2.vbtable = basic_stringstream_wchar_vbtable2; - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - basic_ios_wchar_ctor(basic_ios); - }else { - basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1); - } - - basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode); - basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE); - basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable; - return this; -} - -/* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */ -/* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12) -basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode( - basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init) -{ - basic_stringstream_wchar_ctor_mode(this, mode, virt_init); - basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable; - return this; -} - -/* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor, 4) -basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor( - basic_stringstream_wchar *this) -{ - return basic_stringstream_wchar_ctor_mode( - this, OPENMODE_out|OPENMODE_in, TRUE); -} - -/* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 4) -basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor( - basic_stringstream_wchar *this) -{ - return basic_stringstream_short_ctor_mode( - this, OPENMODE_out|OPENMODE_in, TRUE); -} - -/* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */ -/* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */ -/* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */ -/* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4) -void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base) -{ - basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base); - - TRACE("(%p)\n", this); - - basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base)); - basic_stringbuf_wchar_dtor(&this->strbuf); -} - -/* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -/* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4) -void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this) -{ - TRACE("(%p)\n", this); - - basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this)); - basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1)); -} - -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8) -basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags) -{ - basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base); - - TRACE("(%p %x)\n", this, flags); - - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - basic_stringstream_wchar_vbase_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - basic_stringstream_wchar_vbase_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?rdbuf@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?rdbuf@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?rdbuf@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?rdbuf@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4) -basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this) -{ - TRACE("(%p)\n", this); - return (basic_stringbuf_wchar*)&this->strbuf; -} - -/* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -/* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8) -void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str) -{ - TRACE("(%p %p)\n", this, str); - basic_stringbuf_wchar_str_set(&this->strbuf, str); -} - -/* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8) -basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret) -{ - TRACE("(%p %p)\n", this, ret); - return basic_stringbuf_wchar_str_get(&this->strbuf, ret); -} - -/* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */ -/* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20) -void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode) -{ - TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode); - - this->minsize = 32; - this->endsave = NULL; - this->strmode = mode; - this->palloc = NULL; - this->pfree = NULL; - - if(!g) { - this->strmode |= STRSTATE_Dynamic; - if(len > this->minsize) - this->minsize = len; - this->seekhigh = NULL; - return; - } - - if(len < 0) - len = INT_MAX; - else if(!len) - len = strlen(g); - - this->seekhigh = g+len; - basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh); - if(p) - basic_streambuf_char_setp(&this->base, p, this->seekhigh); -} - -/* ??0strstreambuf@std@@QAE@PACH0@Z */ -/* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */ -/* ??0strstreambuf@std@@QAE@PADH0@Z */ -/* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */ -/* ??0strstreambuf@std@@QAE@PAEH0@Z */ -/* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get_put, 16) -strstreambuf* __thiscall strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p) -{ - TRACE("(%p %p %ld %p)\n", this, g, len, p); - - basic_streambuf_char_ctor(&this->base); - this->base.vtable = &MSVCP_strstreambuf_vtable; - - strstreambuf__Init(this, len, g, p, 0); - return this; -} - -/* ??0strstreambuf@std@@QAE@H@Z */ -/* ??0strstreambuf@std@@QEAA@_J@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_len, 8) -strstreambuf* __thiscall strstreambuf_ctor_len(strstreambuf *this, streamsize len) -{ - return strstreambuf_ctor_get_put(this, NULL, len, NULL); -} - -/* ??0strstreambuf@std@@QAE@P6APAXI@ZP6AXPAX@Z@Z */ -/* ??0strstreambuf@std@@QEAA@P6APEAX_K@ZP6AXPEAX@Z@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_alloc, 12) -strstreambuf* __thiscall strstreambuf_ctor_alloc(strstreambuf *this, void* (__cdecl *palloc)(MSVCP_size_t), void (__cdecl *pfree)(void*)) -{ - TRACE("(%p %p %p)\n", this, palloc, pfree); - - strstreambuf_ctor_get_put(this, NULL, 0, NULL); - this->palloc = palloc; - this->pfree = pfree; - return this; -} - -/* ??0strstreambuf@std@@QAE@PBCH@Z */ -/* ??0strstreambuf@std@@QEAA@PEBC_J@Z */ -/* ??0strstreambuf@std@@QAE@PBDH@Z */ -/* ??0strstreambuf@std@@QEAA@PEBD_J@Z */ -/* ??0strstreambuf@std@@QAE@PBEH@Z */ -/* ??0strstreambuf@std@@QEAA@PEBE_J@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get, 12) -strstreambuf* __thiscall strstreambuf_ctor_get(strstreambuf *this, const char *g, streamsize len) -{ - TRACE("(%p %p %ld)\n", this, g, len); - - strstreambuf_ctor_get_put(this, (char*)g, len, NULL); - this->strmode |= STRSTATE_Constant; - return this; -} - -/* ??_Fstrstreambuf@std@@QAEXXZ */ -/* ??_Fstrstreambuf@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(strstreambuf_ctor, 4) -strstreambuf* __thiscall strstreambuf_ctor(strstreambuf *this) -{ - return strstreambuf_ctor_get_put(this, NULL, 0, NULL); -} - -/* ?_Tidy@strstreambuf@std@@IAEXXZ */ -/* ?_Tidy@strstreambuf@std@@IEAAXXZ */ -DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4) -void __thiscall strstreambuf__Tidy(strstreambuf *this) -{ - TRACE("(%p)\n", this); - - if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) { - if(this->pfree) - this->pfree(basic_streambuf_char_eback(&this->base)); - else - MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base)); - } - - this->endsave = NULL; - this->seekhigh = NULL; - this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen); - basic_streambuf_char_setg(&this->base, NULL, NULL, NULL); - basic_streambuf_char_setp(&this->base, NULL, NULL); -} - -/* ??1strstreambuf@std@@UAE@XZ */ -/* ??1strstreambuf@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4) -void __thiscall strstreambuf_dtor(strstreambuf *this) -{ - TRACE("(%p)\n", this); - - strstreambuf__Tidy(this); - basic_streambuf_char_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8) -strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - strstreambuf_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - strstreambuf_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?freeze@strstreambuf@std@@QAEX_N@Z */ -/* ?freeze@strstreambuf@std@@QEAAX_N@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8) -void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze) -{ - TRACE("(%p %d)\n", this, freeze); - - if(!freeze == !(this->strmode *STRSTATE_Frozen)) - return; - - if(freeze) { - this->strmode |= STRSTATE_Frozen; - this->endsave = basic_streambuf_char_epptr(&this->base); - basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base), - basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base)); - }else { - this->strmode &= ~STRSTATE_Frozen; - basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base), - basic_streambuf_char_pptr(&this->base), this->endsave); - } -} - -/* ?str@strstreambuf@std@@QAEPADXZ */ -/* ?str@strstreambuf@std@@QEAAPEADXZ */ -DEFINE_THISCALL_WRAPPER(strstreambuf_str, 4) -char* __thiscall strstreambuf_str(strstreambuf *this) -{ - TRACE("(%p)\n", this); - - strstreambuf_freeze(this, TRUE); - return basic_streambuf_char_gptr(&this->base); -} - -/* ?pcount@strstreambuf@std@@QBEHXZ */ -/* ?pcount@strstreambuf@std@@QEBA_JXZ */ -DEFINE_THISCALL_WRAPPER(strstreambuf_pcount, 4) -streamsize __thiscall strstreambuf_pcount(const strstreambuf *this) -{ - char *ppos = basic_streambuf_char_pptr(&this->base); - - TRACE("(%p)\n", this); - - return ppos ? ppos-basic_streambuf_char_pbase(&this->base) : 0; -} - -/* ?overflow@strstreambuf@std@@MAEHH@Z */ -/* ?overflow@strstreambuf@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8) -int __thiscall strstreambuf_overflow(strstreambuf *this, int c) -{ - MSVCP_size_t old_size, size; - char *ptr, *buf; - - TRACE("(%p %d)\n", this, c); - - if(c == EOF) - return !EOF; - - if(this->strmode & STRSTATE_Frozen) - return EOF; - - ptr = basic_streambuf_char_pptr(&this->base); - if(ptr && ptrbase)) - return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c); - - if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant)) - return EOF; - - ptr = basic_streambuf_char_eback(&this->base); - old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0; - - size = old_size + old_size/2; - if(size < this->minsize) - size = this->minsize; - - if(this->palloc) - buf = this->palloc(size); - else - buf = MSVCRT_operator_new(size); - if(!buf) - return EOF; - - memcpy(buf, ptr, old_size); - if(this->strmode & STRSTATE_Allocated) { - if(this->pfree) - this->pfree(ptr); - else - MSVCRT_operator_delete(ptr); - } - - this->strmode |= STRSTATE_Allocated; - if(!old_size) { - this->seekhigh = buf; - basic_streambuf_char_setp(&this->base, buf, buf+size); - basic_streambuf_char_setg(&this->base, buf, buf, buf); - }else { - this->seekhigh = this->seekhigh-ptr+buf; - basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf, - basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size); - basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf, - basic_streambuf_char_pptr(&this->base)); - } - - return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c); -} - -/* ?pbackfail@strstreambuf@std@@MAEHH@Z */ -/* ?pbackfail@strstreambuf@std@@MEAAHH@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8) -int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c) -{ - char *ptr = basic_streambuf_char_gptr(&this->base); - - TRACE("(%p %d)\n", this, c); - - if(ptr<=basic_streambuf_char_eback(&this->base) - || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1])) - return EOF; - - basic_streambuf_char_gbump(&this->base, -1); - if(c == EOF) - return !EOF; - if(this->strmode & STRSTATE_Constant) - return (unsigned char)c; - - return (unsigned char)(ptr[0] = c); -} - -/* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */ -/* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20) -fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode) -{ - char *eback = basic_streambuf_char_eback(&this->base); - char *pptr = basic_streambuf_char_pptr(&this->base); - char *gptr = basic_streambuf_char_gptr(&this->base); - - TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode); - - ret->off = 0; - ret->state = 0; - - if(pptr > this->seekhigh) - this->seekhigh = pptr; - - if((mode & OPENMODE_in) && gptr) { - if(way==SEEKDIR_cur && !(mode & OPENMODE_out)) - off += gptr-eback; - else if(way == SEEKDIR_end) - off += this->seekhigh-eback; - else if(way != SEEKDIR_beg) - off = -1; - - if(off<0 || off>this->seekhigh-eback) { - off = -1; - }else { - basic_streambuf_char_gbump(&this->base, eback-gptr+off); - if((mode & OPENMODE_out) && pptr) { - basic_streambuf_char_setp_next(&this->base, eback, - gptr, basic_streambuf_char_epptr(&this->base)); - } - } - }else if((mode & OPENMODE_out) && pptr) { - if(way == SEEKDIR_cur) - off += pptr-eback; - else if(way == SEEKDIR_end) - off += this->seekhigh-eback; - else if(way != SEEKDIR_beg) - off = -1; - - if(off<0 || off>this->seekhigh-eback) - off = -1; - else - basic_streambuf_char_pbump(&this->base, eback-pptr+off); - }else { - off = -1; - } - - ret->pos = off; - return ret; -} - -/* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */ -/* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */ -DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36) -fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode) -{ - TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode); - - if(pos.off==-1 && pos.pos==0 && pos.state==0) { - *ret = pos; - return ret; - } - - return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode); -} - -/* ?underflow@strstreambuf@std@@MAEHXZ */ -/* ?underflow@strstreambuf@std@@MEAAHXZ */ -DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4) -int __thiscall strstreambuf_underflow(strstreambuf *this) -{ - char *gptr = basic_streambuf_char_gptr(&this->base); - char *pptr; - - TRACE("(%p)\n", this); - - if(!gptr) - return EOF; - - if(gptr < basic_streambuf_char_egptr(&this->base)) - return (unsigned char)(*gptr); - - pptr = basic_streambuf_char_gptr(&this->base); - if(pptr > this->seekhigh) - this->seekhigh = pptr; - - if(this->seekhigh <= gptr) - return EOF; - - basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), - gptr, this->seekhigh); - return (unsigned char)(*gptr); -} - -static void __cdecl setprecision_func(ios_base *base, streamsize prec) -{ - ios_base_precision_set(base, prec); -} - -/* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */ -/* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */ -manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec) -{ - TRACE("(%p %ld)\n", ret, prec); - - ret->pfunc = setprecision_func; - ret->arg = prec; - return ret; -} - -static void __cdecl setw_func(ios_base *base, streamsize width) -{ - ios_base_width_set(base, width); -} - -/* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */ -/* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */ -manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width) -{ - TRACE("(%p %ld)\n", ret, width); - - ret->pfunc = setw_func; - ret->arg = width; - return ret; -} - -static void __cdecl resetioflags_func(ios_base *base, int mask) -{ - ios_base_setf_mask(base, 0, mask); -} - -/* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */ -manip_int* __cdecl resetiosflags(manip_int *ret, int mask) -{ - TRACE("(%p %d)\n", ret, mask); - - ret->pfunc = resetioflags_func; - ret->arg = mask; - return ret; -} - -static void __cdecl setiosflags_func(ios_base *base, int mask) -{ - ios_base_setf_mask(base, FMTFLAG_mask, mask); -} - -/* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */ -manip_int* __cdecl setiosflags(manip_int *ret, int mask) -{ - TRACE("(%p %d)\n", ret, mask); - - ret->pfunc = setiosflags_func; - ret->arg = mask; - return ret; -} - -static void __cdecl setbase_func(ios_base *base, int set_base) -{ - if(set_base == 10) - set_base = FMTFLAG_dec; - else if(set_base == 8) - set_base = FMTFLAG_oct; - else if(set_base == 16) - set_base = FMTFLAG_hex; - else - set_base = 0; - - ios_base_setf_mask(base, set_base, FMTFLAG_basefield); -} - -/* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */ -manip_int* __cdecl setbase(manip_int *ret, int base) -{ - TRACE("(%p %d)\n", ret, base); - - ret->pfunc = setbase_func; - ret->arg = base; - return ret; -} - -static basic_filebuf_char filebuf_char_stdin; -/* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */ -struct { - basic_istream_char obj; - basic_ios_char vbase; -} cin = { { 0 } }; -/* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */ -/* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */ -basic_istream_char *_Ptr_cin = &cin.obj; - -static basic_filebuf_wchar filebuf_short_stdin; -/* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */ -struct { - basic_istream_wchar obj; - basic_ios_wchar vbase; -} ucin = { { 0 } }; -/* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */ -/* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */ -basic_istream_wchar *_Ptr_ucin = &ucin.obj; - -static basic_filebuf_wchar filebuf_wchar_stdin; -/* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */ -struct { - basic_istream_wchar obj; - basic_ios_wchar vbase; -} wcin = { { 0 } }; -/* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */ -/* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */ -basic_istream_wchar *_Ptr_wcin = &wcin.obj; - -static basic_filebuf_char filebuf_char_stdout; -/* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */ -struct { - basic_ostream_char obj; - basic_ios_char vbase; -} cout = { { 0 } }; -/* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */ -/* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */ -basic_ostream_char *_Ptr_cout = &cout.obj; - -static basic_filebuf_wchar filebuf_short_stdout; -/* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */ -struct { - basic_ostream_wchar obj; - basic_ios_wchar vbase; -} ucout = { { 0 } }; -/* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */ -/* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */ -basic_ostream_wchar *_Ptr_ucout = &ucout.obj; - -static basic_filebuf_wchar filebuf_wchar_stdout; -/* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */ -struct { - basic_ostream_wchar obj; - basic_ios_wchar vbase; -} wcout = { { 0 } }; -/* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */ -/* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */ -basic_ostream_wchar *_Ptr_wcout = &wcout.obj; - -static basic_filebuf_char filebuf_char_stderr; -/* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */ -struct { - basic_ostream_char obj; - basic_ios_char vbase; -} cerr = { { 0 } }; -/* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */ -/* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */ -basic_ostream_char *_Ptr_cerr = &cerr.obj; - -static basic_filebuf_wchar filebuf_short_stderr; -/* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */ -struct { - basic_ostream_wchar obj; - basic_ios_wchar vbase; -} ucerr = { { 0 } }; -/* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */ -/* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */ -basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj; - -static basic_filebuf_wchar filebuf_wchar_stderr; -/* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */ -struct { - basic_ostream_wchar obj; - basic_ios_wchar vbase; -} wcerr = { { 0 } }; -/* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */ -/* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */ -basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj; - -static basic_filebuf_char filebuf_char_log; -/* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */ -struct { - basic_ostream_char obj; - basic_ios_char vbase; -} clog = { { 0 } }; -/* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */ -/* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */ -basic_ostream_char *_Ptr_clog = &clog.obj; - -static basic_filebuf_wchar filebuf_short_log; -/* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */ -struct { - basic_ostream_wchar obj; - basic_ios_wchar vbase; -} uclog = { { 0 } }; -/* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */ -/* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */ -basic_ostream_wchar *_Ptr_uclog = &uclog.obj; - -static basic_filebuf_wchar filebuf_wchar_log; -/* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */ -struct { - basic_ostream_wchar obj; - basic_ios_wchar vbase; -} wclog = { { 0 } }; -/* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */ -/* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */ -basic_ostream_wchar *_Ptr_wclog = &wclog.obj; - -/* ?_Init_cnt@Init@ios_base@std@@0HA */ -int ios_base_Init__Init_cnt = -1; - -/* ?_Init_cnt_func@Init@ios_base@std@@CAAAHXZ */ -/* ?_Init_cnt_func@Init@ios_base@std@@CAAEAHXZ */ -int* __cdecl ios_base_Init__Init_cnt_func(void) -{ - return &ios_base_Init__Init_cnt; -} - -/* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */ -/* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */ -void __cdecl ios_base_Init__Init_ctor(void *this) -{ - TRACE("(%p)\n", this); - - if(ios_base_Init__Init_cnt < 0) - ios_base_Init__Init_cnt = 1; - else - ios_base_Init__Init_cnt++; -} - -/* ??0Init@ios_base@std@@QAE@XZ */ -/* ??0Init@ios_base@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4) -void* __thiscall ios_base_Init_ctor(void *this) -{ - ios_base_Init__Init_ctor(this); - return this; -} - -/* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */ -/* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */ -void __cdecl ios_base_Init__Init_dtor(void *this) -{ - TRACE("(%p)\n", this); - - ios_base_Init__Init_cnt--; - if(!ios_base_Init__Init_cnt) { - basic_ostream_char_flush(&cout.obj); - basic_ostream_char_flush(&cerr.obj); - basic_ostream_char_flush(&clog.obj); - } -} - -/* ??1Init@ios_base@std@@QAE@XZ */ -/* ??1Init@ios_base@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4) -void __thiscall ios_base_Init_dtor(void *this) -{ - ios_base_Init__Init_dtor(this); -} - -/* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */ -/* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */ -DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8) -void* __thiscall ios_base_Init_op_assign(void *this, void *rhs) -{ - TRACE("(%p %p)\n", this, rhs); - return this; -} - -/* ?_Init_cnt@_Winit@std@@0HA */ -int _Winit__Init_cnt = -1; - -/* ??0_Winit@std@@QAE@XZ */ -/* ??0_Winit@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4) -void* __thiscall _Winit_ctor(void *this) -{ - TRACE("(%p)\n", this); - - if(_Winit__Init_cnt < 0) - _Winit__Init_cnt = 1; - else - _Winit__Init_cnt++; - - return this; -} - -/* ??1_Winit@std@@QAE@XZ */ -/* ??1_Winit@std@@QAE@XZ */ -DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4) -void __thiscall _Winit_dtor(void *this) -{ - TRACE("(%p)\n", this); - - _Winit__Init_cnt--; - if(!_Winit__Init_cnt) { - basic_ostream_wchar_flush(&wcout.obj); - basic_ostream_wchar_flush(&wcerr.obj); - basic_ostream_wchar_flush(&wclog.obj); - } -} - -/* ??4_Winit@std@@QAEAAV01@ABV01@@Z */ -/* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8) -void* __thiscall _Winit_op_assign(void *this, void *rhs) -{ - TRACE("(%p %p)\n", this, rhs); - return this; -} - -void init_io(void *base) -{ -#ifdef __x86_64__ - init_iosb_rtti(base); - init_ios_base_rtti(base); - init_basic_ios_char_rtti(base); - init_basic_ios_wchar_rtti(base); - init_basic_ios_short_rtti(base); - init_basic_streambuf_char_rtti(base); - init_basic_streambuf_wchar_rtti(base); - init_basic_streambuf_short_rtti(base); - init_basic_filebuf_char_rtti(base); - init_basic_filebuf_wchar_rtti(base); - init_basic_filebuf_short_rtti(base); - init_basic_stringbuf_char_rtti(base); - init_basic_stringbuf_wchar_rtti(base); - init_basic_stringbuf_short_rtti(base); - init_basic_ostream_char_rtti(base); - init_basic_ostream_wchar_rtti(base); - init_basic_ostream_short_rtti(base); - init_basic_istream_char_rtti(base); - init_basic_istream_wchar_rtti(base); - init_basic_istream_short_rtti(base); - init_basic_iostream_char_rtti(base); - init_basic_iostream_wchar_rtti(base); - init_basic_iostream_short_rtti(base); - init_basic_ofstream_char_rtti(base); - init_basic_ofstream_wchar_rtti(base); - init_basic_ofstream_short_rtti(base); - init_basic_ifstream_char_rtti(base); - init_basic_ifstream_wchar_rtti(base); - init_basic_ifstream_short_rtti(base); - init_basic_fstream_char_rtti(base); - init_basic_fstream_wchar_rtti(base); - init_basic_fstream_short_rtti(base); - init_basic_ostringstream_char_rtti(base); - init_basic_ostringstream_wchar_rtti(base); - init_basic_ostringstream_short_rtti(base); - init_basic_istringstream_char_rtti(base); - init_basic_istringstream_wchar_rtti(base); - init_basic_istringstream_short_rtti(base); - init_basic_stringstream_char_rtti(base); - init_basic_stringstream_wchar_rtti(base); - init_basic_stringstream_short_rtti(base); - init_strstreambuf_rtti(base); -#endif - - basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin); - basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin); - basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin); - basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout); - basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout); - basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout); - basic_ostream_wchar_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr); - basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr); - basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr); - basic_ostream_wchar_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_char_ctor_file(&filebuf_char_log, stderr); - basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_short_ctor_file(&filebuf_short_log, stderr); - basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE); - - basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr); - basic_ostream_wchar_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE); -} - -void free_io(void) -{ - basic_istream_char_vbase_dtor(&cin.obj); - basic_filebuf_char_dtor(&filebuf_char_stdin); - - basic_istream_wchar_vbase_dtor(&ucin.obj); - basic_filebuf_wchar_dtor(&filebuf_short_stdin); - - basic_istream_wchar_vbase_dtor(&wcin.obj); - basic_filebuf_wchar_dtor(&filebuf_wchar_stdin); - - basic_ostream_char_vbase_dtor(&cout.obj); - basic_filebuf_char_dtor(&filebuf_char_stdout); - - basic_ostream_wchar_vbase_dtor(&ucout.obj); - basic_filebuf_wchar_dtor(&filebuf_short_stdout); - - basic_ostream_wchar_vbase_dtor(&wcout.obj); - basic_filebuf_wchar_dtor(&filebuf_wchar_stdout); - - basic_ostream_char_vbase_dtor(&cerr.obj); - basic_filebuf_char_dtor(&filebuf_char_stderr); - - basic_ostream_wchar_vbase_dtor(&ucerr.obj); - basic_filebuf_wchar_dtor(&filebuf_short_stderr); - - basic_ostream_wchar_vbase_dtor(&wcerr.obj); - basic_filebuf_wchar_dtor(&filebuf_wchar_stderr); - - basic_ostream_char_vbase_dtor(&clog.obj); - basic_filebuf_char_dtor(&filebuf_char_log); - - basic_ostream_wchar_vbase_dtor(&uclog.obj); - basic_filebuf_wchar_dtor(&filebuf_short_log); - - basic_ostream_wchar_vbase_dtor(&wclog.obj); - basic_filebuf_wchar_dtor(&filebuf_wchar_log); -} diff --git a/dlls/msvcp80/locale.c b/dlls/msvcp80/locale.c deleted file mode 100644 index 78d44edb3eb..00000000000 --- a/dlls/msvcp80/locale.c +++ /dev/null @@ -1,9621 +0,0 @@ -/* - * Copyright 2010 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include - -#include "msvcp.h" -#include "locale.h" -#include "errno.h" -#include "limits.h" -#include "math.h" -#include "stdio.h" -#include "wctype.h" -#include "time.h" - -#include "wine/list.h" - -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "wine/unicode.h" -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(msvcp); - -char* __cdecl _Getdays(void); -char* __cdecl _Getmonths(void); -void* __cdecl _Gettnames(void); -unsigned int __cdecl ___lc_codepage_func(void); -LCID* __cdecl ___lc_handle_func(void); -const locale_facet* __thiscall locale__Getfacet(const locale*, MSVCP_size_t); -MSVCP_size_t __cdecl _Strftime(char*, MSVCP_size_t, const char*, - const struct tm*, struct __lc_time_data*); -const locale* __cdecl locale_classic(void); - -typedef int category; - -typedef struct { - MSVCP_size_t id; -} locale_id; - -typedef struct _locale__Locimp { - locale_facet facet; - locale_facet **facetvec; - MSVCP_size_t facet_cnt; - category catmask; - MSVCP_bool transparent; - basic_string_char name; -} locale__Locimp; - -typedef struct { - void *timeptr; -} _Timevec; - -typedef struct { - _Lockit lock; - basic_string_char days; - basic_string_char months; - basic_string_char oldlocname; - basic_string_char newlocname; -} _Locinfo; - -typedef struct { - LCID handle; - unsigned page; -} _Collvec; - -typedef struct { - locale_facet facet; - _Collvec coll; -} collate; - -typedef struct { - locale_facet facet; - const char *grouping; - char dp; - char sep; - const char *false_name; - const char *true_name; -} numpunct_char; - -typedef struct { - locale_facet facet; - const char *grouping; - wchar_t dp; - wchar_t sep; - const wchar_t *false_name; - const wchar_t *true_name; -} numpunct_wchar; - -typedef struct { - locale_facet facet; - _Timevec time; - _Cvtvec cvt; -} time_put; - -/* ?_Id_cnt@id@locale@std@@0HA */ -int locale_id__Id_cnt = 0; - -static locale__Locimp *global_locale; -static locale classic_locale; - -/* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */ -/* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */ -locale__Locimp *locale__Locimp__Clocptr = NULL; - -static char istreambuf_iterator_char_val(istreambuf_iterator_char *this) -{ - if(this->strbuf && !this->got) { - int c = basic_streambuf_char_sgetc(this->strbuf); - if(c == EOF) - this->strbuf = NULL; - else - this->val = c; - } - - this->got = TRUE; - return this->val; -} - -static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar *this) -{ - if(this->strbuf && !this->got) { - unsigned short c = basic_streambuf_wchar_sgetc(this->strbuf); - if(c == WEOF) - this->strbuf = NULL; - else - this->val = c; - } - - this->got = TRUE; - return this->val; -} - -static void istreambuf_iterator_char_inc(istreambuf_iterator_char *this) -{ - if(!this->strbuf || basic_streambuf_char_sbumpc(this->strbuf)==EOF) { - this->strbuf = NULL; - this->got = TRUE; - }else { - this->got = FALSE; - istreambuf_iterator_char_val(this); - } -} - -static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar *this) -{ - if(!this->strbuf || basic_streambuf_wchar_sbumpc(this->strbuf)==WEOF) { - this->strbuf = NULL; - this->got = TRUE; - }else { - this->got = FALSE; - istreambuf_iterator_wchar_val(this); - } -} - -static void ostreambuf_iterator_char_put(ostreambuf_iterator_char *this, char ch) -{ - if(this->failed || basic_streambuf_char_sputc(this->strbuf, ch)==EOF) - this->failed = TRUE; -} - -static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar *this, wchar_t ch) -{ - if(this->failed || basic_streambuf_wchar_sputc(this->strbuf, ch)==WEOF) - this->failed = TRUE; -} - -/* ??1facet@locale@std@@UAE@XZ */ -/* ??1facet@locale@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4) -void __thiscall locale_facet_dtor(locale_facet *this) -{ - TRACE("(%p)\n", this); -} - -DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor, 8) -#define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \ - locale_facet*, (locale_facet*, unsigned int), (this, flags)) -locale_facet* __thiscall locale_facet_vector_dtor(locale_facet *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - locale_facet_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - locale_facet_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -typedef struct -{ - locale_facet *fac; - struct list entry; -} facets_elem; -static struct list lazy_facets = LIST_INIT(lazy_facets); - -/* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */ -/* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */ -void __cdecl locale_facet_register(locale_facet *add) -{ - facets_elem *head = MSVCRT_operator_new(sizeof(*head)); - if(!head) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - - head->fac = add; - list_add_head(&lazy_facets, &head->entry); -} - -/* ?_Register@facet@locale@std@@QAEXXZ */ -/* ?_Register@facet@locale@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(locale_facet__Register, 4) -void __thiscall locale_facet__Register(locale_facet *this) -{ - TRACE("(%p)\n", this); - locale_facet_register(this); -} - -/* ??_7facet@locale@std@@6B@ */ -extern const vtable_ptr MSVCP_locale_facet_vtable; - -/* ??0id@locale@std@@QAE@I@Z */ -/* ??0id@locale@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8) -locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id) -{ - TRACE("(%p %lu)\n", this, id); - - this->id = id; - return this; -} - -/* ??_Fid@locale@std@@QAEXXZ */ -/* ??_Fid@locale@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4) -locale_id* __thiscall locale_id_ctor(locale_id *this) -{ - TRACE("(%p)\n", this); - - this->id = 0; - return this; -} - -/* ??Bid@locale@std@@QAEIXZ */ -/* ??Bid@locale@std@@QEAA_KXZ */ -DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4) -MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this) -{ - _Lockit lock; - - TRACE("(%p)\n", this); - - if(!this->id) { - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - this->id = ++locale_id__Id_cnt; - _Lockit_dtor(&lock); - } - - return this->id; -} - -/* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */ -/* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */ -int* __cdecl locale_id__Id_cnt_func(void) -{ - TRACE("\n"); - return &locale_id__Id_cnt; -} - -/* ??_Ffacet@locale@std@@QAEXXZ */ -/* ??_Ffacet@locale@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4) -locale_facet* __thiscall locale_facet_ctor(locale_facet *this) -{ - TRACE("(%p)\n", this); - this->vtable = &MSVCP_locale_facet_vtable; - this->refs = 0; - return this; -} - -/* ??0facet@locale@std@@IAE@I@Z */ -/* ??0facet@locale@std@@IEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8) -locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs) -{ - TRACE("(%p %lu)\n", this, refs); - this->vtable = &MSVCP_locale_facet_vtable; - this->refs = refs; - return this; -} - -/* ?_Incref@facet@locale@std@@QAEXXZ */ -/* ?_Incref@facet@locale@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4) -void __thiscall locale_facet__Incref(locale_facet *this) -{ - _Lockit lock; - - TRACE("(%p)\n", this); - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - this->refs++; - _Lockit_dtor(&lock); -} - -/* ?_Decref@facet@locale@std@@QAEPAV123@XZ */ -/* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */ -DEFINE_THISCALL_WRAPPER(locale_facet__Decref, 4) -locale_facet* __thiscall locale_facet__Decref(locale_facet *this) -{ - _Lockit lock; - locale_facet *ret; - - TRACE("(%p)\n", this); - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - if(this->refs) - this->refs--; - - ret = this->refs ? NULL : this; - _Lockit_dtor(&lock); - - return ret; -} - -/* ??0_Timevec@std@@QAE@ABV01@@Z */ -/* ??0_Timevec@std@@QEAA@AEBV01@@Z */ -/* This copy constructor modifies copied object */ -DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor, 8) -_Timevec* __thiscall _Timevec_copy_ctor(_Timevec *this, _Timevec *copy) -{ - TRACE("(%p %p)\n", this, copy); - this->timeptr = copy->timeptr; - copy->timeptr = NULL; - return this; -} - -/* ??0_Timevec@std@@QAE@PAX@Z */ -/* ??0_Timevec@std@@QEAA@PEAX@Z */ -DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr, 8) -_Timevec* __thiscall _Timevec_ctor_timeptr(_Timevec *this, void *timeptr) -{ - TRACE("(%p %p)\n", this, timeptr); - this->timeptr = timeptr; - return this; -} - -/* ??_F_Timevec@std@@QAEXXZ */ -/* ??_F_Timevec@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(_Timevec_ctor, 4) -_Timevec* __thiscall _Timevec_ctor(_Timevec *this) -{ - TRACE("(%p)\n", this); - this->timeptr = NULL; - return this; -} - -/* ??1_Timevec@std@@QAE@XZ */ -/* ??1_Timevec@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(_Timevec_dtor, 4) -void __thiscall _Timevec_dtor(_Timevec *this) -{ - TRACE("(%p)\n", this); - free(this->timeptr); -} - -/* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */ -/* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(_Timevec_op_assign, 8) -_Timevec* __thiscall _Timevec_op_assign(_Timevec *this, _Timevec *right) -{ - TRACE("(%p %p)\n", this, right); - this->timeptr = right->timeptr; - right->timeptr = NULL; - return this; -} - -/* ?_Getptr@_Timevec@std@@QBEPAXXZ */ -/* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */ -DEFINE_THISCALL_WRAPPER(_Timevec__Getptr, 4) -void* __thiscall _Timevec__Getptr(_Timevec *this) -{ - TRACE("(%p)\n", this); - return this->timeptr; -} - -/* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */ -/* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */ -_Locinfo* __cdecl _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo *locinfo, int category, const char *locstr) -{ - const char *locale = NULL; - - /* This function is probably modifying more global objects */ - FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr); - - if(!locstr) - throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name"); - - _Lockit_ctor_locktype(&locinfo->lock, _LOCK_LOCALE); - MSVCP_basic_string_char_ctor_cstr(&locinfo->days, ""); - MSVCP_basic_string_char_ctor_cstr(&locinfo->months, ""); - MSVCP_basic_string_char_ctor_cstr(&locinfo->oldlocname, setlocale(LC_ALL, NULL)); - - if(category) - locale = setlocale(LC_ALL, locstr); - else - locale = setlocale(LC_ALL, NULL); - - if(locale) - MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale); - else - MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*"); - - return locinfo; -} - -/* ??0_Locinfo@std@@QAE@HPBD@Z */ -/* ??0_Locinfo@std@@QEAA@HPEBD@Z */ -DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr, 12) -_Locinfo* __thiscall _Locinfo_ctor_cat_cstr(_Locinfo *this, int category, const char *locstr) -{ - return _Locinfo__Locinfo_ctor_cat_cstr(this, category, locstr); -} - -/* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */ -/* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */ -_Locinfo* __cdecl _Locinfo__Locinfo_ctor_cstr(_Locinfo *locinfo, const char *locstr) -{ - return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, locstr); -} - -/* ??0_Locinfo@std@@QAE@PBD@Z */ -/* ??0_Locinfo@std@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr, 8) -_Locinfo* __thiscall _Locinfo_ctor_cstr(_Locinfo *this, const char *locstr) -{ - return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr); -} - -/* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */ -/* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */ -void __cdecl _Locinfo__Locinfo_dtor(_Locinfo *locinfo) -{ - TRACE("(%p)\n", locinfo); - - setlocale(LC_ALL, MSVCP_basic_string_char_c_str(&locinfo->oldlocname)); - MSVCP_basic_string_char_dtor(&locinfo->days); - MSVCP_basic_string_char_dtor(&locinfo->months); - MSVCP_basic_string_char_dtor(&locinfo->oldlocname); - MSVCP_basic_string_char_dtor(&locinfo->newlocname); - _Lockit_dtor(&locinfo->lock); -} - -/* ??_F_Locinfo@std@@QAEXXZ */ -/* ??_F_Locinfo@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo_ctor, 4) -_Locinfo* __thiscall _Locinfo_ctor(_Locinfo *this) -{ - return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C"); -} - -/* ??1_Locinfo@std@@QAE@XZ */ -/* ??1_Locinfo@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo_dtor, 4) -void __thiscall _Locinfo_dtor(_Locinfo *this) -{ - _Locinfo__Locinfo_dtor(this); -} - -/* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */ -/* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */ -_Locinfo* __cdecl _Locinfo__Locinfo_Addcats(_Locinfo *locinfo, int category, const char *locstr) -{ - const char *locale = NULL; - - /* This function is probably modifying more global objects */ - FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr); - if(!locstr) - throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name"); - - MSVCP_basic_string_char_dtor(&locinfo->newlocname); - - if(category) - locale = setlocale(LC_ALL, locstr); - else - locale = setlocale(LC_ALL, NULL); - - if(locale) - MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale); - else - MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*"); - - return locinfo; -} - -/* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */ -/* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats, 12) -_Locinfo* __thiscall _Locinfo__Addcats(_Locinfo *this, int category, const char *locstr) -{ - return _Locinfo__Locinfo_Addcats(this, category, locstr); -} - -/* _Getcoll */ -ULONGLONG __cdecl _Getcoll(void) -{ - union { - _Collvec collvec; - ULONGLONG ull; - } ret; - _locale_t locale = _get_current_locale(); - - TRACE("\n"); - - ret.collvec.page = locale->locinfo->lc_collate_cp; - ret.collvec.handle = locale->locinfo->lc_handle[LC_COLLATE]; - _free_locale(locale); - return ret.ull; -} - -/* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */ -/* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll, 8) -_Collvec* __thiscall _Locinfo__Getcoll(const _Locinfo *this, _Collvec *ret) -{ - ULONGLONG ull = _Getcoll(); - memcpy(ret, &ull, sizeof(ull)); - return ret; -} - -/* _Getctype */ -_Ctypevec* __cdecl _Getctype(_Ctypevec *ret) -{ - _locale_t locale = _get_current_locale(); - short *table; - - TRACE("\n"); - - ret->page = locale->locinfo->lc_codepage; - ret->handle = locale->locinfo->lc_handle[LC_COLLATE]; - ret->delfl = TRUE; - table = malloc(sizeof(short[256])); - if(!table) { - _free_locale(locale); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - memcpy(table, locale->locinfo->pctype, sizeof(short[256])); - ret->table = table; - _free_locale(locale); - return ret; -} - -/* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */ -/* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype, 8) -_Ctypevec* __thiscall _Locinfo__Getctype(const _Locinfo *this, _Ctypevec *ret) -{ - return _Getctype(ret); -} - -/* _Getcvt */ -ULONGLONG __cdecl _Getcvt(void) -{ - _locale_t locale = _get_current_locale(); - union { - _Cvtvec cvtvec; - ULONGLONG ull; - } ret; - - TRACE("\n"); - - ret.cvtvec.page = locale->locinfo->lc_codepage; - ret.cvtvec.handle = locale->locinfo->lc_handle[LC_CTYPE]; - _free_locale(locale); - return ret.ull; -} - -/* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */ -/* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt, 8) -_Cvtvec* __thiscall _Locinfo__Getcvt(const _Locinfo *this, _Cvtvec *ret) -{ - ULONGLONG ull = _Getcvt(); - memcpy(ret, &ull, sizeof(ull)); - return ret; -} - -/* ?_Getdateorder@_Locinfo@std@@QBEHXZ */ -/* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder, 4) -int __thiscall _Locinfo__Getdateorder(const _Locinfo *this) -{ - FIXME("(%p) stub\n", this); - return 0; -} - -/* ?_Getdays@_Locinfo@std@@QBEPBDXZ */ -/* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays, 4) -const char* __thiscall _Locinfo__Getdays(_Locinfo *this) -{ - char *days = _Getdays(); - - TRACE("(%p)\n", this); - - if(days) { - MSVCP_basic_string_char_dtor(&this->days); - MSVCP_basic_string_char_ctor_cstr(&this->days, days); - free(days); - } - - return this->days.size ? MSVCP_basic_string_char_c_str(&this->days) : - ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday"; -} - -/* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */ -/* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths, 4) -const char* __thiscall _Locinfo__Getmonths(_Locinfo *this) -{ - char *months = _Getmonths(); - - TRACE("(%p)\n", this); - - if(months) { - MSVCP_basic_string_char_dtor(&this->months); - MSVCP_basic_string_char_ctor_cstr(&this->months, months); - free(months); - } - - return this->months.size ? MSVCP_basic_string_char_c_str(&this->months) : - ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July" - ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December"; -} - -/* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */ -/* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse, 4) -const char* __thiscall _Locinfo__Getfalse(const _Locinfo *this) -{ - TRACE("(%p)\n", this); - return "false"; -} - -/* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */ -/* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue, 4) -const char* __thiscall _Locinfo__Gettrue(const _Locinfo *this) -{ - TRACE("(%p)\n", this); - return "true"; -} - -/* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */ -/* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv, 4) -const struct lconv* __thiscall _Locinfo__Getlconv(const _Locinfo *this) -{ - TRACE("(%p)\n", this); - return localeconv(); -} - -/* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Getname, 8) -basic_string_char* __thiscall _Locinfo__Getname(const _Locinfo *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - - MSVCP_basic_string_char_copy_ctor(ret, &this->newlocname); - return ret; -} - -/* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */ -/* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */ -DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames, 8) -_Timevec*__thiscall _Locinfo__Gettnames(const _Locinfo *this, _Timevec *ret) -{ - TRACE("(%p)\n", this); - - _Timevec_ctor_timeptr(ret, _Gettnames()); - return ret; -} - -/* ?id@?$collate@D@std@@2V0locale@2@A */ -locale_id collate_char_id = {0}; - -/* ??_7?$collate@D@std@@6B@ */ -extern const vtable_ptr MSVCP_collate_char_vtable; - -/* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(collate_char__Init, 8) -void __thiscall collate_char__Init(collate *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getcoll(locinfo, &this->coll); -} - -/* ??0?$collate@D@std@@IAE@PBDI@Z */ -/* ??0?$collate@D@std@@IEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_ctor_name, 12) -collate* __thiscall collate_char_ctor_name(collate *this, const char *name, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %s %lu)\n", this, name, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_collate_char_vtable; - - _Locinfo_ctor_cstr(&locinfo, name); - collate_char__Init(this, &locinfo); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo, 12) -collate* __thiscall collate_char_ctor_locinfo(collate *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_collate_char_vtable; - collate_char__Init(this, locinfo); - return this; -} - -/* ??0?$collate@D@std@@QAE@I@Z */ -/* ??0?$collate@D@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs, 8) -collate* __thiscall collate_char_ctor_refs(collate *this, MSVCP_size_t refs) -{ - return collate_char_ctor_name(this, "C", refs); -} - -/* ??1?$collate@D@std@@MAE@XZ */ -/* ??1?$collate@D@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(collate_char_dtor, 4) -void __thiscall collate_char_dtor(collate *this) -{ - TRACE("(%p)\n", this); -} - -DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor, 8) -collate* __thiscall collate_char_vector_dtor(collate *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - collate_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - collate_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ??_F?$collate@D@std@@QAEXXZ */ -/* ??_F?$collate@D@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(collate_char_ctor, 4) -collate* __thiscall collate_char_ctor(collate *this) -{ - return collate_char_ctor_name(this, "C", 0); -} - -/* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t collate_char__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(collate)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - collate_char_ctor_name((collate*)*facet, - MSVCP_basic_string_char_c_str(&loc->ptr->name), 0); - } - - return LC_COLLATE; -} - -/* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl collate_char__Getcat_old(const locale_facet **facet) -{ - return collate_char__Getcat(facet, locale_classic()); -} - -static collate* collate_char_use_facet(const locale *loc) -{ - static collate *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&collate_char_id)); - if(fac) { - _Lockit_dtor(&lock); - return (collate*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - collate_char__Getcat(&fac, loc); - obj = (collate*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* _Strcoll */ -int __cdecl _Strcoll(const char *first1, const char *last1, const char *first2, - const char *last2, const _Collvec *coll) -{ - LCID lcid; - - TRACE("(%s %s)\n", debugstr_an(first1, last1-first1), debugstr_an(first2, last2-first2)); - - if(coll) - lcid = coll->handle; - else - lcid = ___lc_handle_func()[LC_COLLATE]; - return CompareStringA(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL; -} - -/* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */ -/* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_do_compare, 20) -#define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \ - (const collate*, const char*, const char*, const char*, const char*), \ - (this, first1, last1, first2, last2)) -int __thiscall collate_char_do_compare(const collate *this, const char *first1, - const char *last1, const char *first2, const char *last2) -{ - TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2); - return _Strcoll(first1, last1, first2, last2, &this->coll); -} - -/* ?compare@?$collate@D@std@@QBEHPBD000@Z */ -/* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_compare, 20) -int __thiscall collate_char_compare(const collate *this, const char *first1, - const char *last1, const char *first2, const char *last2) -{ - TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2); - return call_collate_char_do_compare(this, first1, last1, first2, last2); -} - -/* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */ -/* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_do_hash, 12) -#define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \ - (const collate*, const char*, const char*), (this, first, last)) -LONG __thiscall collate_char_do_hash(const collate *this, - const char *first, const char *last) -{ - ULONG ret = 0; - - TRACE("(%p %p %p)\n", this, first, last); - - for(; first>24) + *first; - return ret; -} - -/* ?hash@?$collate@D@std@@QBEJPBD0@Z */ -/* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_hash, 12) -LONG __thiscall collate_char_hash(const collate *this, - const char *first, const char *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - return call_collate_char_do_hash(this, first, last); -} - -/* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */ -/* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_do_transform, 16) -basic_string_char* __thiscall collate_char_do_transform(const collate *this, - basic_string_char *ret, const char *first, const char *last) -{ - FIXME("(%p %p %p) stub\n", this, first, last); - return ret; -} - -/* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */ -/* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */ -DEFINE_THISCALL_WRAPPER(collate_char_transform, 16) -basic_string_char* __thiscall collate_char_transform(const collate *this, - basic_string_char *ret, const char *first, const char *last) -{ - FIXME("(%p %p %p) stub\n", this, first, last); - return ret; -} - -/* ?id@?$collate@_W@std@@2V0locale@2@A */ -locale_id collate_wchar_id = {0}; -/* ?id@?$collate@G@std@@2V0locale@2@A */ -locale_id collate_short_id = {0}; - -/* ??_7?$collate@_W@std@@6B@ */ -extern const vtable_ptr MSVCP_collate_wchar_vtable; -/* ??_7?$collate@G@std@@6B@ */ -extern const vtable_ptr MSVCP_collate_short_vtable; - -/* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */ -/* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar__Init, 8) -void __thiscall collate_wchar__Init(collate *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getcoll(locinfo, &this->coll); -} - -/* ??0?$collate@_W@std@@IAE@PBDI@Z */ -/* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name, 12) -collate* __thiscall collate_wchar_ctor_name(collate *this, const char *name, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %s %lu)\n", this, name, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_collate_wchar_vtable; - - _Locinfo_ctor_cstr(&locinfo, name); - collate_wchar__Init(this, &locinfo); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$collate@G@std@@IAE@PBDI@Z */ -/* ??0?$collate@G@std@@IEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_short_ctor_name, 12) -collate* __thiscall collate_short_ctor_name(collate *this, const char *name, MSVCP_size_t refs) -{ - collate *ret = collate_wchar_ctor_name(this, name, refs); - ret->facet.vtable = &MSVCP_collate_short_vtable; - return ret; -} - -/* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo, 12) -collate* __thiscall collate_wchar_ctor_locinfo(collate *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_collate_wchar_vtable; - collate_wchar__Init(this, locinfo); - return this; -} - -/* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo, 12) -collate* __thiscall collate_short_ctor_locinfo(collate *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - collate *ret = collate_wchar_ctor_locinfo(this, locinfo, refs); - ret->facet.vtable = &MSVCP_collate_short_vtable; - return ret; -} - -/* ??0?$collate@_W@std@@QAE@I@Z */ -/* ??0?$collate@_W@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs, 8) -collate* __thiscall collate_wchar_ctor_refs(collate *this, MSVCP_size_t refs) -{ - return collate_wchar_ctor_name(this, "C", refs); -} - -/* ??0?$collate@G@std@@QAE@I@Z */ -/* ??0?$collate@G@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs, 8) -collate* __thiscall collate_short_ctor_refs(collate *this, MSVCP_size_t refs) -{ - collate *ret = collate_wchar_ctor_refs(this, refs); - ret->facet.vtable = &MSVCP_collate_short_vtable; - return ret; -} - -/* ??1?$collate@_W@std@@MAE@XZ */ -/* ??1?$collate@_W@std@@MEAA@XZ */ -/* ??1?$collate@G@std@@MAE@XZ */ -/* ??1?$collate@G@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(collate_wchar_dtor, 4) -void __thiscall collate_wchar_dtor(collate *this) -{ - TRACE("(%p)\n", this); -} - -DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor, 8) -collate* __thiscall collate_wchar_vector_dtor(collate *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - collate_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - collate_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ??_F?$collate@_W@std@@QAEXXZ */ -/* ??_F?$collate@_W@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(collate_wchar_ctor, 4) -collate* __thiscall collate_wchar_ctor(collate *this) -{ - return collate_wchar_ctor_name(this, "C", 0); -} - -/* ??_F?$collate@G@std@@QAEXXZ */ -/* ??_F?$collate@G@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(collate_short_ctor, 4) -collate* __thiscall collate_short_ctor(collate *this) -{ - collate *ret = collate_wchar_ctor(this); - ret->facet.vtable = &MSVCP_collate_short_vtable; - return ret; -} - -/* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t collate_wchar__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(collate)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - collate_wchar_ctor_name((collate*)*facet, - MSVCP_basic_string_char_c_str(&loc->ptr->name), 0); - } - - return LC_COLLATE; -} - -/* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl collate_wchar__Getcat_old(const locale_facet **facet) -{ - return collate_wchar__Getcat(facet, locale_classic()); -} - -static collate* collate_wchar_use_facet(const locale *loc) -{ - static collate *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&collate_wchar_id)); - if(fac) { - _Lockit_dtor(&lock); - return (collate*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - collate_wchar__Getcat(&fac, loc); - obj = (collate*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t collate_short__Getcat(const locale_facet **facet, const locale *loc) -{ - if(facet && !*facet) { - collate_wchar__Getcat(facet, loc); - (*(locale_facet**)facet)->vtable = &MSVCP_collate_short_vtable; - } - - return LC_COLLATE; -} - -/* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl collate_short__Getcat_old(const locale_facet **facet) -{ - return collate_short__Getcat(facet, locale_classic()); -} - -static collate* collate_short_use_facet(const locale *loc) -{ - static collate *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&collate_short_id)); - if(fac) { - _Lockit_dtor(&lock); - return (collate*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - collate_short__Getcat(&fac, loc); - obj = (collate*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* _Wcscoll */ -int __cdecl _Wcscoll(const wchar_t *first1, const wchar_t *last1, const wchar_t *first2, - const wchar_t *last2, const _Collvec *coll) -{ - LCID lcid; - - TRACE("(%s %s)\n", debugstr_wn(first1, last1-first1), debugstr_wn(first2, last2-first2)); - - if(coll) - lcid = coll->handle; - else - lcid = ___lc_handle_func()[LC_COLLATE]; - return CompareStringW(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL; -} - -/* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */ -/* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */ -/* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */ -/* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare, 20) -#define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \ - (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \ - (this, first1, last1, first2, last2)) -int __thiscall collate_wchar_do_compare(const collate *this, const wchar_t *first1, - const wchar_t *last1, const wchar_t *first2, const wchar_t *last2) -{ - TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2); - return _Wcscoll(first1, last1, first2, last2, &this->coll); -} - -/* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */ -/* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */ -/* ?compare@?$collate@G@std@@QBEHPBG000@Z */ -/* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_compare, 20) -int __thiscall collate_wchar_compare(const collate *this, const wchar_t *first1, - const wchar_t *last1, const wchar_t *first2, const wchar_t *last2) -{ - TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2); - return call_collate_wchar_do_compare(this, first1, last1, first2, last2); -} - -/* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */ -/* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */ -/* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */ -/* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash, 12) -#define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \ - (const collate*, const wchar_t*, const wchar_t*), (this, first, last)) -LONG __thiscall collate_wchar_do_hash(const collate *this, - const wchar_t *first, const wchar_t *last) -{ - ULONG ret = 0; - - TRACE("(%p %p %p)\n", this, first, last); - - for(; first>24) + *first; - return ret; -} - -/* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */ -/* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */ -/* ?hash@?$collate@G@std@@QBEJPBG0@Z */ -/* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_hash, 12) -LONG __thiscall collate_wchar_hash(const collate *this, - const wchar_t *first, const wchar_t *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - return call_collate_wchar_do_hash(this, first, last); -} - -/* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */ -/* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */ -/* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */ -/* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform, 16) -basic_string_wchar* __thiscall collate_wchar_do_transform(const collate *this, - basic_string_wchar *ret, const wchar_t *first, const wchar_t *last) -{ - FIXME("(%p %p %p) stub\n", this, first, last); - return ret; -} - -/* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */ -/* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */ -/* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */ -/* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */ -DEFINE_THISCALL_WRAPPER(collate_wchar_transform, 16) -basic_string_wchar* __thiscall collate_wchar_transform(const collate *this, - basic_string_wchar *ret, const wchar_t *first, const wchar_t *last) -{ - FIXME("(%p %p %p) stub\n", this, first, last); - return ret; -} - -/* ??_7ctype_base@std@@6B@ */ -extern const vtable_ptr MSVCP_ctype_base_vtable; - -/* ??0ctype_base@std@@QAE@I@Z */ -/* ??0ctype_base@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs, 8) -ctype_base* __thiscall ctype_base_ctor_refs(ctype_base *this, MSVCP_size_t refs) -{ - TRACE("(%p %lu)\n", this, refs); - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_ctype_base_vtable; - return this; -} - -/* ??_Fctype_base@std@@QAEXXZ */ -/* ??_Fctype_base@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(ctype_base_ctor, 4) -ctype_base* __thiscall ctype_base_ctor(ctype_base *this) -{ - TRACE("(%p)\n", this); - locale_facet_ctor_refs(&this->facet, 0); - this->facet.vtable = &MSVCP_ctype_base_vtable; - return this; -} - -/* ??1ctype_base@std@@UAE@XZ */ -/* ??1ctype_base@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(ctype_base_dtor, 4) -void __thiscall ctype_base_dtor(ctype_base *this) -{ - TRACE("(%p)\n", this); -} - -DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor, 8) -ctype_base* __thiscall ctype_base_vector_dtor(ctype_base *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - ctype_base_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - ctype_base_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Xran@ctype_base@std@@KAXXZ */ -void __cdecl ctype_base__Xran(void) -{ - throw_exception(EXCEPTION_OUT_OF_RANGE, "out of range in ctype"); -} - -/* ?id@?$ctype@D@std@@2V0locale@2@A */ -locale_id ctype_char_id = {0}; -/* ?table_size@?$ctype@D@std@@2IB */ -/* ?table_size@?$ctype@D@std@@2_KB */ -MSVCP_size_t ctype_char_table_size = 256; - -/* ??_7?$ctype@D@std@@6B@ */ -extern const vtable_ptr MSVCP_ctype_char_vtable; - -/* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */ -/* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */ -locale_id* __cdecl ctype_char__Id_func(void) -{ - TRACE("()\n"); - return &ctype_char_id; -} - -/* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char__Init, 8) -void __thiscall ctype_char__Init(ctype_char *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getctype(locinfo, &this->ctype); -} - -/* ?_Tidy@?$ctype@D@std@@IAEXXZ */ -/* ?_Tidy@?$ctype@D@std@@IEAAXXZ */ -DEFINE_THISCALL_WRAPPER(ctype_char__Tidy, 4) -void __thiscall ctype_char__Tidy(ctype_char *this) -{ - TRACE("(%p)\n", this); - - if(this->ctype.delfl) - free((short*)this->ctype.table); -} - -/* ?classic_table@?$ctype@D@std@@KAPBFXZ */ -/* ?classic_table@?$ctype@D@std@@KAPEBFXZ */ -const short* __cdecl ctype_char_classic_table(void) -{ - TRACE("()\n"); - return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1]; -} - -/* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo, 12) -ctype_char* __thiscall ctype_char_ctor_locinfo(ctype_char *this, - const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - ctype_base_ctor_refs(&this->base, refs); - this->base.facet.vtable = &MSVCP_ctype_char_vtable; - ctype_char__Init(this, locinfo); - return this; -} - -/* ??0?$ctype@D@std@@QAE@PBF_NI@Z */ -/* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table, 16) -ctype_char* __thiscall ctype_char_ctor_table(ctype_char *this, - const short *table, MSVCP_bool delete, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %p %d %lu)\n", this, table, delete, refs); - - ctype_base_ctor_refs(&this->base, refs); - this->base.facet.vtable = &MSVCP_ctype_char_vtable; - - _Locinfo_ctor(&locinfo); - ctype_char__Init(this, &locinfo); - _Locinfo_dtor(&locinfo); - - if(table) { - ctype_char__Tidy(this); - this->ctype.table = table; - this->ctype.delfl = delete; - } - return this; -} - -/* ??_F?$ctype@D@std@@QAEXXZ */ -/* ??_F?$ctype@D@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(ctype_char_ctor, 4) -ctype_char* __thiscall ctype_char_ctor(ctype_char *this) -{ - return ctype_char_ctor_table(this, NULL, FALSE, 0); -} - -/* ??1?$ctype@D@std@@MAE@XZ */ -/* ??1?$ctype@D@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(ctype_char_dtor, 4) -void __thiscall ctype_char_dtor(ctype_char *this) -{ - TRACE("(%p)\n", this); - ctype_char__Tidy(this); -} - -DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor, 8) -ctype_char* __thiscall ctype_char_vector_dtor(ctype_char *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - ctype_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - ctype_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */ -/* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch, 12) -#define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \ - char, (const ctype_char*, char, char), (this, ch, unused)) -char __thiscall ctype_char_do_narrow_ch(const ctype_char *this, char ch, char unused) -{ - TRACE("(%p %c %c)\n", this, ch, unused); - return ch; -} - -/* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */ -/* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow, 20) -#define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \ - const char*, (const ctype_char*, const char*, const char*, char, char*), \ - (this, first, last, unused, dest)) -const char* __thiscall ctype_char_do_narrow(const ctype_char *this, - const char *first, const char *last, char unused, char *dest) -{ - TRACE("(%p %p %p %p)\n", this, first, last, dest); - memcpy(dest, first, last-first); - return last; -} - -/* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */ -/* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s, 24) -#define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \ - const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \ - (this, first, last, unused, dest, size)) -const char* __thiscall ctype_char__Do_narrow_s(const ctype_char *this, const char *first, - const char *last, char unused, char *dest, MSVCP_size_t size) -{ - TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size); - memcpy_s(dest, size, first, last-first); - return last; -} - -/* ?narrow@?$ctype@D@std@@QBEDDD@Z */ -/* ?narrow@?$ctype@D@std@@QEBADDD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch, 12) -char __thiscall ctype_char_narrow_ch(const ctype_char *this, char ch, char dflt) -{ - TRACE("(%p %c %c)\n", this, ch, dflt); - return call_ctype_char_do_narrow_ch(this, ch, dflt); -} - -/* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */ -/* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_narrow, 20) -const char* __thiscall ctype_char_narrow(const ctype_char *this, - const char *first, const char *last, char dflt, char *dest) -{ - TRACE("(%p %p %p %c %p)\n", this, first, last, dflt, dest); - return call_ctype_char_do_narrow(this, first, last, dflt, dest); -} - -/* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */ -/* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s, 24) -const char* __thiscall ctype_char__Narrow_s(const ctype_char *this, const char *first, - const char *last, char dflt, char *dest, MSVCP_size_t size) -{ - TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size); - return call_ctype_char__Do_narrow_s(this, first, last, dflt, dest, size); -} - -/* ?do_widen@?$ctype@D@std@@MBEDD@Z */ -/* ?do_widen@?$ctype@D@std@@MEBADD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch, 8) -#define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \ - char, (const ctype_char*, char), (this, ch)) -char __thiscall ctype_char_do_widen_ch(const ctype_char *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return ch; -} - -/* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */ -/* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_do_widen, 16) -#define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \ - const char*, (const ctype_char*, const char*, const char*, char*), \ - (this, first, last, dest)) -const char* __thiscall ctype_char_do_widen(const ctype_char *this, - const char *first, const char *last, char *dest) -{ - TRACE("(%p %p %p %p)\n", this, first, last, dest); - memcpy(dest, first, last-first); - return last; -} - -/* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */ -/* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s, 20) -#define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \ - const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \ - (this, first, last, dest, size)) -const char* __thiscall ctype_char__Do_widen_s(const ctype_char *this, - const char *first, const char *last, char *dest, MSVCP_size_t size) -{ - TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size); - memcpy_s(dest, size, first, last-first); - return last; -} - -/* ?widen@?$ctype@D@std@@QBEDD@Z */ -/* ?widen@?$ctype@D@std@@QEBADD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch, 8) -char __thiscall ctype_char_widen_ch(const ctype_char *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return call_ctype_char_do_widen_ch(this, ch); -} - -/* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */ -/* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_widen, 16) -const char* __thiscall ctype_char_widen(const ctype_char *this, - const char *first, const char *last, char *dest) -{ - TRACE("(%p %p %p %p)\n", this, first, last, dest); - return call_ctype_char_do_widen(this, first, last, dest); -} - -/* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */ -/* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s, 20) -const char* __thiscall ctype_char__Widen_s(const ctype_char *this, - const char *first, const char *last, char *dest, MSVCP_size_t size) -{ - TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size); - return call_ctype_char__Do_widen_s(this, first, last, dest, size); -} - -/* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t ctype_char__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(ctype_char)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - ctype_char_ctor_locinfo((ctype_char*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_CTYPE; -} - -/* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl ctype_char__Getcat_old(const locale_facet **facet) -{ - return ctype_char__Getcat(facet, locale_classic()); -} - -ctype_char* ctype_char_use_facet(const locale *loc) -{ - static ctype_char *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&ctype_char_id)); - if(fac) { - _Lockit_dtor(&lock); - return (ctype_char*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - ctype_char__Getcat(&fac, loc); - obj = (ctype_char*)fac; - locale_facet__Incref(&obj->base.facet); - locale_facet_register(&obj->base.facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* _Tolower */ -int __cdecl _Tolower(int ch, const _Ctypevec *ctype) -{ - unsigned int cp; - - TRACE("%d %p\n", ch, ctype); - - if(ctype) - cp = ctype->page; - else - cp = ___lc_codepage_func(); - - /* Don't convert to unicode in case of C locale */ - if(!cp) { - if(ch>='A' && ch<='Z') - ch = ch-'A'+'a'; - return ch; - } else { - WCHAR wide, lower; - char str[2]; - int size; - - if(ch > 255) { - str[0] = (ch>>8) & 255; - str[1] = ch & 255; - size = 2; - } else { - str[0] = ch & 255; - size = 1; - } - - if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1)) - return ch; - - lower = tolowerW(wide); - if(lower == wide) - return ch; - - WideCharToMultiByte(cp, 0, &lower, 1, str, 2, NULL, NULL); - - return str[0] + (str[1]<<8); - } -} - -/* ?do_tolower@?$ctype@D@std@@MBEDD@Z */ -/* ?do_tolower@?$ctype@D@std@@MEBADD@Z */ -#define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \ - char, (const ctype_char*, char), (this, ch)) -DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch, 8) -char __thiscall ctype_char_do_tolower_ch(const ctype_char *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return _Tolower(ch, &this->ctype); -} - -/* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */ -/* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */ -#define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \ - const char*, (const ctype_char*, char*, const char*), (this, first, last)) -DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower, 12) -const char* __thiscall ctype_char_do_tolower(const ctype_char *this, char *first, const char *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - for(; firstctype); - return last; -} - -/* ?tolower@?$ctype@D@std@@QBEDD@Z */ -/* ?tolower@?$ctype@D@std@@QEBADD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch, 8) -char __thiscall ctype_char_tolower_ch(const ctype_char *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return call_ctype_char_do_tolower_ch(this, ch); -} - -/* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */ -/* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_tolower, 12) -const char* __thiscall ctype_char_tolower(const ctype_char *this, char *first, const char *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - return call_ctype_char_do_tolower(this, first, last); -} - -/* _Toupper */ -int __cdecl _Toupper(int ch, const _Ctypevec *ctype) -{ - unsigned int cp; - - TRACE("%d %p\n", ch, ctype); - - if(ctype) - cp = ctype->page; - else - cp = ___lc_codepage_func(); - - /* Don't convert to unicode in case of C locale */ - if(!cp) { - if(ch>='a' && ch<='z') - ch = ch-'a'+'A'; - return ch; - } else { - WCHAR wide, upper; - char str[2]; - int size; - - if(ch > 255) { - str[0] = (ch>>8) & 255; - str[1] = ch & 255; - size = 2; - } else { - str[0] = ch & 255; - size = 1; - } - - if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1)) - return ch; - - upper = toupperW(wide); - if(upper == wide) - return ch; - - WideCharToMultiByte(cp, 0, &upper, 1, str, 2, NULL, NULL); - - return str[0] + (str[1]<<8); - } -} - -/* ?do_toupper@?$ctype@D@std@@MBEDD@Z */ -/* ?do_toupper@?$ctype@D@std@@MEBADD@Z */ -#define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \ - char, (const ctype_char*, char), (this, ch)) -DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch, 8) -char __thiscall ctype_char_do_toupper_ch(const ctype_char *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return _Toupper(ch, &this->ctype); -} - -/* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */ -/* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */ -#define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \ - const char*, (const ctype_char*, char*, const char*), (this, first, last)) -DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper, 12) -const char* __thiscall ctype_char_do_toupper(const ctype_char *this, - char *first, const char *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - for(; firstctype); - return last; -} - -/* ?toupper@?$ctype@D@std@@QBEDD@Z */ -/* ?toupper@?$ctype@D@std@@QEBADD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch, 8) -char __thiscall ctype_char_toupper_ch(const ctype_char *this, char ch) -{ - TRACE("(%p %c)\n", this, ch); - return call_ctype_char_do_toupper_ch(this, ch); -} - -/* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */ -/* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_toupper, 12) -const char* __thiscall ctype_char_toupper(const ctype_char *this, char *first, const char *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - return call_ctype_char_do_toupper(this, first, last); -} - -/* ?is@?$ctype@D@std@@QBE_NFD@Z */ -/* ?is@?$ctype@D@std@@QEBA_NFD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_is_ch, 12) -MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char *this, short mask, char ch) -{ - TRACE("(%p %x %c)\n", this, mask, ch); - return (this->ctype.table[(unsigned char)ch] & mask) != 0; -} - -/* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */ -/* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_is, 16) -const char* __thiscall ctype_char_is(const ctype_char *this, const char *first, const char *last, short *dest) -{ - TRACE("(%p %p %p %p)\n", this, first, last, dest); - for(; firstctype.table[(unsigned char)*first]; - return last; -} - -/* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */ -/* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */ -DEFINE_THISCALL_WRAPPER(ctype_char_scan_is, 16) -const char* __thiscall ctype_char_scan_is(const ctype_char *this, short mask, const char *first, const char *last) -{ - TRACE("(%p %x %p %p)\n", this, mask, first, last); - for(; firstctype.table; -} - -/* ?id@?$ctype@_W@std@@2V0locale@2@A */ -locale_id ctype_wchar_id = {0}; -/* ?id@?$ctype@G@std@@2V0locale@2@A */ -locale_id ctype_short_id = {0}; - -/* ??_7?$ctype@_W@std@@6B@ */ -extern const vtable_ptr MSVCP_ctype_wchar_vtable; -/* ??_7?$ctype@G@std@@6B@ */ -extern const vtable_ptr MSVCP_ctype_short_vtable; - -/* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */ -/* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */ -locale_id* __cdecl ctype_wchar__Id_func(void) -{ - TRACE("()\n"); - return &ctype_wchar_id; -} - -/* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */ -/* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */ -locale_id* __cdecl ctype_short__Id_func(void) -{ - TRACE("()\n"); - return &ctype_short_id; -} - -/* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */ -/* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar__Init, 8) -void __thiscall ctype_wchar__Init(ctype_wchar *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getctype(locinfo, &this->ctype); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo, 12) -ctype_wchar* __thiscall ctype_wchar_ctor_locinfo(ctype_wchar *this, - const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - ctype_base_ctor_refs(&this->base, refs); - this->base.facet.vtable = &MSVCP_ctype_wchar_vtable; - ctype_wchar__Init(this, locinfo); - return this; -} - -/* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo, 12) -ctype_wchar* __thiscall ctype_short_ctor_locinfo(ctype_wchar *this, - const _Locinfo *locinfo, MSVCP_size_t refs) -{ - ctype_wchar *ret = ctype_wchar_ctor_locinfo(this, locinfo, refs); - this->base.facet.vtable = &MSVCP_ctype_short_vtable; - return ret; -} - -/* ??0?$ctype@_W@std@@QAE@I@Z */ -/* ??0?$ctype@_W@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs, 8) -ctype_wchar* __thiscall ctype_wchar_ctor_refs(ctype_wchar *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %lu)\n", this, refs); - - ctype_base_ctor_refs(&this->base, refs); - this->base.facet.vtable = &MSVCP_ctype_wchar_vtable; - - _Locinfo_ctor(&locinfo); - ctype_wchar__Init(this, &locinfo); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$ctype@G@std@@QAE@I@Z */ -/* ??0?$ctype@G@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs, 8) -ctype_wchar* __thiscall ctype_short_ctor_refs(ctype_wchar *this, MSVCP_size_t refs) -{ - ctype_wchar *ret = ctype_wchar_ctor_refs(this, refs); - this->base.facet.vtable = &MSVCP_ctype_short_vtable; - return ret; -} - -/* ??0?$ctype@G@std@@IAE@PBDI@Z */ -/* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name, 12) -ctype_wchar* __thiscall ctype_short_ctor_name(ctype_wchar *this, - const char *name, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %s %lu)\n", this, debugstr_a(name), refs); - - ctype_base_ctor_refs(&this->base, refs); - this->base.facet.vtable = &MSVCP_ctype_short_vtable; - - _Locinfo_ctor_cstr(&locinfo, name); - ctype_wchar__Init(this, &locinfo); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??_F?$ctype@_W@std@@QAEXXZ */ -/* ??_F?$ctype@_W@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor, 4) -ctype_wchar* __thiscall ctype_wchar_ctor(ctype_wchar *this) -{ - TRACE("(%p)\n", this); - return ctype_short_ctor_refs(this, 0); -} - -/* ??_F?$ctype@G@std@@QAEXXZ */ -/* ??_F?$ctype@G@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(ctype_short_ctor, 4) -ctype_wchar* __thiscall ctype_short_ctor(ctype_wchar *this) -{ - ctype_wchar *ret = ctype_wchar_ctor(this); - this->base.facet.vtable = &MSVCP_ctype_short_vtable; - return ret; -} - -/* ??1?$ctype@_W@std@@MAE@XZ */ -/* ??1?$ctype@_W@std@@MEAA@XZ */ -/* ??1?$ctype@G@std@@MAE@XZ */ -/* ??1?$ctype@G@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor, 4) -void __thiscall ctype_wchar_dtor(ctype_wchar *this) -{ - TRACE("(%p)\n", this); - if(this->ctype.delfl) - free((void*)this->ctype.table); -} - -DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor, 8) -ctype_wchar* __thiscall ctype_wchar_vector_dtor(ctype_wchar *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - ctype_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - ctype_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* _Wcrtomb */ -int __cdecl _Wcrtomb(char *s, wchar_t wch, int *state, const _Cvtvec *cvt) -{ - int cp, size; - BOOL def; - - TRACE("%p %d %p %p\n", s, wch, state, cvt); - - if(cvt) - cp = cvt->page; - else - cp = ___lc_codepage_func(); - - if(!cp) { - if(wch > 255) { - *_errno() = EILSEQ; - return -1; - } - - *s = wch & 255; - return 1; - } - - size = WideCharToMultiByte(cp, 0, &wch, 1, s, MB_LEN_MAX, NULL, &def); - if(!size || def) { - *_errno() = EILSEQ; - return -1; - } - - return size; -} - -/* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */ -/* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */ -/* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */ -/* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow, 12) -char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char dflt) -{ - char buf[MB_LEN_MAX]; - - TRACE("(%p %d %d)\n", this, ch, dflt); - - return _Wcrtomb(buf, ch, NULL, &this->cvt)==1 ? buf[0] : dflt; -} - -/* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */ -/* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */ -/* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */ -/* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch, 12) -#define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \ - char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt)) -char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt) -{ - return ctype_wchar__Donarrow(this, ch, dflt); -} - -/* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */ -/* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */ -/* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */ -/* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow, 20) -#define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \ - const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \ - (this, first, last, dflt, dest)) -const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this, - const wchar_t *first, const wchar_t *last, char dflt, char *dest) -{ - TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest); - for(; first size) - ctype_base__Xran(); - return ctype_wchar_do_narrow(this, first, last, dflt, dest); -} - -/* ?narrow@?$ctype@_W@std@@QBED_WD@Z */ -/* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */ -/* ?narrow@?$ctype@G@std@@QBEDGD@Z */ -/* ?narrow@?$ctype@G@std@@QEBADGD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch, 12) -char __thiscall ctype_wchar_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt) -{ - TRACE("(%p %d %d)\n", this, ch, dflt); - return call_ctype_wchar_do_narrow_ch(this, ch, dflt); -} - -/* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */ -/* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */ -/* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */ -/* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow, 20) -const wchar_t* __thiscall ctype_wchar_narrow(const ctype_wchar *this, - const wchar_t *first, const wchar_t *last, char dflt, char *dest) -{ - TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest); - return call_ctype_wchar_do_narrow(this, first, last, dflt, dest); -} - -/* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */ -/* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */ -/* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */ -/* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s, 24) -const wchar_t* __thiscall ctype_wchar__Narrow_s(const ctype_wchar *this, const wchar_t *first, - const wchar_t *last, char dflt, char *dest, MSVCP_size_t size) -{ - TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size); - return call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size); -} - -/* _Mbrtowc */ -int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state, const _Cvtvec *cvt) -{ - int i, cp; - CPINFO cp_info; - BOOL is_lead; - - TRACE("(%p %p %lu %p %p)\n", out, in, len, state, cvt); - - if(!len) - return 0; - - if(cvt) - cp = cvt->page; - else - cp = ___lc_codepage_func(); - - if(!cp) { - if(out) - *out = (unsigned char)*in; - - *state = 0; - return *in ? 1 : 0; - } - - if(*state) { - ((char*)state)[1] = *in; - - if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, (char*)state, 2, out, out ? 1 : 0)) { - *state = 0; - *_errno() = EILSEQ; - return -1; - } - - *state = 0; - return 2; - } - - GetCPInfo(cp, &cp_info); - is_lead = FALSE; - for(i=0; i=cp_info.LeadByte[i] && (unsigned char)*in<=cp_info.LeadByte[i+1]) { - is_lead = TRUE; - break; - } - } - - if(is_lead) { - if(len == 1) { - *state = (unsigned char)*in; - return -2; - } - - if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 2, out, out ? 1 : 0)) { - *_errno() = EILSEQ; - return -1; - } - return 2; - } - - if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 1, out, out ? 1 : 0)) { - *_errno() = EILSEQ; - return -1; - } - return 1; -} - -/* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */ -/* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */ -/* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */ -/* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden, 8) -wchar_t __thiscall ctype_wchar__Dowiden(const ctype_wchar *this, char ch) -{ - wchar_t ret; - int state = 0; - TRACE("(%p %d)\n", this, ch); - return _Mbrtowc(&ret, &ch, 1, &state, &this->cvt)<0 ? WEOF : ret; -} - -/* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */ -/* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */ -/* ?do_widen@?$ctype@G@std@@MBEGD@Z */ -/* ?do_widen@?$ctype@G@std@@MEBAGD@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch, 8) -#define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \ - wchar_t, (const ctype_wchar*, char), (this, ch)) -wchar_t __thiscall ctype_wchar_do_widen_ch(const ctype_wchar *this, char ch) -{ - return ctype_wchar__Dowiden(this, ch); -} - -/* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */ -/* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */ -/* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */ -/* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen, 16) -#define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \ - const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \ - (this, first, last, dest)) -const char* __thiscall ctype_wchar_do_widen(const ctype_wchar *this, - const char *first, const char *last, wchar_t *dest) -{ - TRACE("(%p %p %p %p)\n", this, first, last, dest); - for(; firstptr->name)); - ctype_wchar_ctor_locinfo((ctype_wchar*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_CTYPE; -} - -/* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl ctype_wchar__Getcat_old(const locale_facet **facet) -{ - return ctype_wchar__Getcat(facet, locale_classic()); -} - -/* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t ctype_short__Getcat(const locale_facet **facet, const locale *loc) -{ - if(facet && !*facet) { - ctype_wchar__Getcat(facet, loc); - (*(locale_facet**)facet)->vtable = &MSVCP_ctype_short_vtable; - } - - return LC_CTYPE; -} - -/* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl ctype_short__Getcat_old(const locale_facet **facet) -{ - return ctype_short__Getcat(facet, locale_classic()); -} - -/* _Towlower */ -wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype) -{ - TRACE("(%d %p)\n", ch, ctype); - return tolowerW(ch); -} - -ctype_wchar* ctype_wchar_use_facet(const locale *loc) -{ - static ctype_wchar *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&ctype_wchar_id)); - if(fac) { - _Lockit_dtor(&lock); - return (ctype_wchar*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - ctype_wchar__Getcat(&fac, loc); - obj = (ctype_wchar*)fac; - locale_facet__Incref(&obj->base.facet); - locale_facet_register(&obj->base.facet); - _Lockit_dtor(&lock); - - return obj; -} - -ctype_wchar* ctype_short_use_facet(const locale *loc) -{ - static ctype_wchar *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&ctype_short_id)); - if(fac) { - _Lockit_dtor(&lock); - return (ctype_wchar*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - ctype_short__Getcat(&fac, loc); - obj = (ctype_wchar*)fac; - locale_facet__Incref(&obj->base.facet); - locale_facet_register(&obj->base.facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */ -/* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */ -/* ?do_tolower@?$ctype@G@std@@MBEGG@Z */ -/* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch, 8) -#define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \ - wchar_t, (const ctype_wchar*, wchar_t), (this, ch)) -wchar_t __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch) -{ - return _Towlower(ch, &this->ctype); -} - -/* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */ -/* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */ -/* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */ -/* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower, 12) -#define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \ - const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \ - (this, first, last)) -const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this, - wchar_t *first, const wchar_t *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - for(; firstctype); - return last; -} - -/* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */ -/* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */ -/* ?tolower@?$ctype@G@std@@QBEGG@Z */ -/* ?tolower@?$ctype@G@std@@QEBAGG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch, 8) -wchar_t __thiscall ctype_wchar_tolower_ch(const ctype_wchar *this, wchar_t ch) -{ - TRACE("(%p %d)\n", this, ch); - return call_ctype_wchar_do_tolower_ch(this, ch); -} - -/* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */ -/* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */ -/* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */ -/* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower, 12) -const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this, - wchar_t *first, const wchar_t *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - return call_ctype_wchar_do_tolower(this, first, last); -} - -/* _Towupper */ -wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype) -{ - TRACE("(%d %p)\n", ch, ctype); - return toupperW(ch); -} - -/* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */ -/* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */ -/* ?do_toupper@?$ctype@G@std@@MBEGG@Z */ -/* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch, 8) -#define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \ - wchar_t, (const ctype_wchar*, wchar_t), (this, ch)) -wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch) -{ - return _Towupper(ch, &this->ctype); -} - -/* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */ -/* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */ -/* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */ -/* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper, 12) -#define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \ - const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \ - (this, first, last)) -const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this, - wchar_t *first, const wchar_t *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - for(; firstctype); - return last; -} - -/* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */ -/* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */ -/* ?toupper@?$ctype@G@std@@QBEGG@Z */ -/* ?toupper@?$ctype@G@std@@QEBAGG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch, 8) -wchar_t __thiscall ctype_wchar_toupper_ch(const ctype_wchar *this, wchar_t ch) -{ - TRACE("(%p %d)\n", this, ch); - return call_ctype_wchar_do_toupper_ch(this, ch); -} - -/* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */ -/* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */ -/* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */ -/* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper, 12) -const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this, - wchar_t *first, const wchar_t *last) -{ - TRACE("(%p %p %p)\n", this, first, last); - return call_ctype_wchar_do_toupper(this, first, last); -} - -/* _Getwctypes */ -const wchar_t* __cdecl _Getwctypes(const wchar_t *first, const wchar_t *last, - short *mask, const _Ctypevec *ctype) -{ - TRACE("(%p %p %p %p)\n", first, last, mask, ctype); - GetStringTypeW(CT_CTYPE1, first, last-first, (WORD*)mask); - return last; -} - -/* _Getwctype */ -short __cdecl _Getwctype(wchar_t ch, const _Ctypevec *ctype) -{ - short mask = 0; - _Getwctypes(&ch, &ch+1, &mask, ctype); - return mask; -} - -/* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */ -/* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */ -/* ?do_is@?$ctype@G@std@@MBE_NFG@Z */ -/* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch, 12) -#define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \ - MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch)) -MSVCP_bool __thiscall ctype_wchar_do_is_ch(const ctype_wchar *this, short mask, wchar_t ch) -{ - TRACE("(%p %x %d)\n", this, mask, ch); - return (_Getwctype(ch, &this->ctype) & mask) != 0; -} - -/* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */ -/* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */ -/* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */ -/* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is, 16) -#define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \ - const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \ - (this, first, last, dest)) -const wchar_t* __thiscall ctype_wchar_do_is(const ctype_wchar *this, - const wchar_t *first, const wchar_t *last, short *dest) -{ - TRACE("(%p %p %p %p)\n", this, first, last, dest); - return _Getwctypes(first, last, dest, &this->ctype); -} - -/* ?is@?$ctype@_W@std@@QBE_NF_W@Z */ -/* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */ -/* ?is@?$ctype@G@std@@QBE_NFG@Z */ -/* ?is@?$ctype@G@std@@QEBA_NFG@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch, 12) -MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar *this, short mask, wchar_t ch) -{ - TRACE("(%p %x %d)\n", this, mask, ch); - return call_ctype_wchar_do_is_ch(this, mask, ch); -} - -/* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */ -/* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */ -/* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */ -/* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_is, 16) -const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this, - const wchar_t *first, const wchar_t *last, short *dest) -{ - TRACE("(%p %p %p %p)\n", this, first, last, dest); - return call_ctype_wchar_do_is(this, first, last, dest); -} - -/* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */ -/* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */ -/* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */ -/* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */ -DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is, 16) -#define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \ - const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \ - (this, mask, first, last)) -const wchar_t* __thiscall ctype_wchar_do_scan_is(const ctype_wchar *this, - short mask, const wchar_t *first, const wchar_t *last) -{ - TRACE("(%p %d %p %p)\n", this, mask, first, last); - for(; firstfacet, refs); - this->facet.vtable = &MSVCP_codecvt_base_vtable; - return this; -} - -/* ??_Fcodecvt_base@std@@QAEXXZ */ -/* ??_Fcodecvt_base@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_base_ctor, 4) -codecvt_base* __thiscall codecvt_base_ctor(codecvt_base *this) -{ - return codecvt_base_ctor_refs(this, 0); -} - -/* ??1codecvt_base@std@@UAE@XZ */ -/* ??1codecvt_base@std@@UEAA@XZ */ -DEFINE_THISCALL_WRAPPER(codecvt_base_dtor, 4) -void __thiscall codecvt_base_dtor(codecvt_base *this) -{ - TRACE("(%p)\n", this); - locale_facet_dtor(&this->facet); -} - -DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor, 8) -codecvt_base* __thiscall codecvt_base_vector_dtor(codecvt_base *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - codecvt_base_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - codecvt_base_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */ -/* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */ -#define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \ - MSVCP_bool, (const codecvt_base*), (this)) -DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv, 4) -MSVCP_bool __thiscall codecvt_base_do_always_noconv(const codecvt_base *this) -{ - TRACE("(%p)\n", this); - return TRUE; -} - -/* ?always_noconv@codecvt_base@std@@QBE_NXZ */ -/* ?always_noconv@codecvt_base@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv, 4) -MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base *this) -{ - TRACE("(%p)\n", this); - return call_codecvt_base_do_always_noconv(this); -} - -/* ?do_max_length@codecvt_base@std@@MBEHXZ */ -/* ?do_max_length@codecvt_base@std@@MEBAHXZ */ -#define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \ - int, (const codecvt_base*), (this)) -DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length, 4) -int __thiscall codecvt_base_do_max_length(const codecvt_base *this) -{ - TRACE("(%p)\n", this); - return 1; -} - -/* ?max_length@codecvt_base@std@@QBEHXZ */ -/* ?max_length@codecvt_base@std@@QEBAHXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_base_max_length, 4) -int __thiscall codecvt_base_max_length(const codecvt_base *this) -{ - TRACE("(%p)\n", this); - return call_codecvt_base_do_max_length(this); -} - -/* ?do_encoding@codecvt_base@std@@MBEHXZ */ -/* ?do_encoding@codecvt_base@std@@MEBAHXZ */ -#define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \ - int, (const codecvt_base*), (this)) -DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding, 4) -int __thiscall codecvt_base_do_encoding(const codecvt_base *this) -{ - TRACE("(%p)\n", this); - return 1; -} - -/* ?encoding@codecvt_base@std@@QBEHXZ */ -/* ?encoding@codecvt_base@std@@QEBAHXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_base_encoding, 4) -int __thiscall codecvt_base_encoding(const codecvt_base *this) -{ - TRACE("(%p)\n", this); - return call_codecvt_base_do_encoding(this); -} - -/* ?id@?$codecvt@DDH@std@@2V0locale@2@A */ -locale_id codecvt_char_id = {0}; - -/* ??_7?$codecvt@DDH@std@@6B@ */ -extern const vtable_ptr MSVCP_codecvt_char_vtable; - -/* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_char__Init, 8) -void __thiscall codecvt_char__Init(codecvt_char *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); -} - -/* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo, 12) -codecvt_char* __thiscall codecvt_char_ctor_locinfo(codecvt_char *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - codecvt_base_ctor_refs(&this->base, refs); - this->base.facet.vtable = &MSVCP_codecvt_char_vtable; - return this; -} - -/* ??0?$codecvt@DDH@std@@QAE@I@Z */ -/* ??0?$codecvt@DDH@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs, 8) -codecvt_char* __thiscall codecvt_char_ctor_refs(codecvt_char *this, MSVCP_size_t refs) -{ - return codecvt_char_ctor_locinfo(this, NULL, refs); -} - -/* ??_F?$codecvt@DDH@std@@QAEXXZ */ -/* ??_F?$codecvt@DDH@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_char_ctor, 4) -codecvt_char* __thiscall codecvt_char_ctor(codecvt_char *this) -{ - return codecvt_char_ctor_locinfo(this, NULL, 0); -} - -/* ??1?$codecvt@DDH@std@@MAE@XZ */ -/* ??1?$codecvt@DDH@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(codecvt_char_dtor, 4) -void __thiscall codecvt_char_dtor(codecvt_char *this) -{ - TRACE("(%p)\n", this); - codecvt_base_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor, 8) -codecvt_char* __thiscall codecvt_char_vector_dtor(codecvt_char *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - codecvt_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - codecvt_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t codecvt_char__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(codecvt_char)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - codecvt_char_ctor((codecvt_char*)*facet); - } - - return LC_CTYPE; -} - -/* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl codecvt_char__Getcat_old(const locale_facet **facet) -{ - return codecvt_char__Getcat(facet, locale_classic()); -} - -codecvt_char* codecvt_char_use_facet(const locale *loc) -{ - static codecvt_char *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&codecvt_char_id)); - if(fac) { - _Lockit_dtor(&lock); - return (codecvt_char*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - codecvt_char__Getcat(&fac, loc); - obj = (codecvt_char*)fac; - locale_facet__Incref(&obj->base.facet); - locale_facet_register(&obj->base.facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */ -/* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */ -#define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \ - CALL_VTBL_FUNC(this, 16, int, \ - (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \ - (this, state, from, from_end, from_next, to, to_end, to_next)) -DEFINE_THISCALL_WRAPPER(codecvt_char_do_in, 32) -int __thiscall codecvt_char_do_in(const codecvt_char *this, int *state, - const char *from, const char *from_end, const char **from_next, - char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end, - from_next, to, to_end, to_next); - *from_next = from; - *to_next = to; - return CODECVT_noconv; -} - -/* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */ -/* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_char_in, 32) -int __thiscall codecvt_char_in(const codecvt_char *this, int *state, - const char *from, const char *from_end, const char **from_next, - char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end, - from_next, to, to_end, to_next); - return call_codecvt_char_do_in(this, state, from, from_end, from_next, - to, to_end, to_next); -} - -/* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */ -/* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */ -#define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \ - CALL_VTBL_FUNC(this, 20, int, \ - (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \ - (this, state, from, from_end, from_next, to, to_end, to_next)) -DEFINE_THISCALL_WRAPPER(codecvt_char_do_out, 32) -int __thiscall codecvt_char_do_out(const codecvt_char *this, int *state, - const char *from, const char *from_end, const char **from_next, - char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, - from_end, from_next, to, to_end, to_next); - *from_next = from; - *to_next = to; - return CODECVT_noconv; -} - -/* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */ -/* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_char_out, 32) -int __thiscall codecvt_char_out(const codecvt_char *this, int *state, - const char *from, const char *from_end, const char **from_next, - char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end, - from_next, to, to_end, to_next); - return call_codecvt_char_do_out(this, state, from, from_end, from_next, - to, to_end, to_next); -} - -/* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */ -/* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */ -#define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \ - int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next)) -DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift, 20) -int __thiscall codecvt_char_do_unshift(const codecvt_char *this, - int *state, char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next); - *to_next = to; - return CODECVT_noconv; -} - -/* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */ -/* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_char_unshift, 20) -int __thiscall codecvt_char_unshift(const codecvt_char *this, - int *state, char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next); - return call_codecvt_char_do_unshift(this, state, to, to_end, to_next); -} - -/* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */ -/* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */ -#define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \ - int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \ - (this, state, from, from_end, max)) -DEFINE_THISCALL_WRAPPER(codecvt_char_do_length, 20) -int __thiscall codecvt_char_do_length(const codecvt_char *this, const int *state, - const char *from, const char *from_end, MSVCP_size_t max) -{ - TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max); - return (from_end-from > max ? max : from_end-from); -} - -/* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */ -/* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_char_length, 20) -int __thiscall codecvt_char_length(const codecvt_char *this, const int *state, - const char *from, const char *from_end, MSVCP_size_t max) -{ - TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max); - return call_codecvt_char_do_length(this, state, from, from_end, max); -} - -/* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */ -locale_id codecvt_wchar_id = {0}; -/* ?id@?$codecvt@GDH@std@@2V0locale@2@A */ -locale_id codecvt_short_id = {0}; - -/* ??_7?$codecvt@_WDH@std@@6B@ */ -extern const vtable_ptr MSVCP_codecvt_wchar_vtable; -/* ??_7?$codecvt@GDH@std@@6B@ */ -extern const vtable_ptr MSVCP_codecvt_short_vtable; - -/* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */ -/* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init, 8) -void __thiscall codecvt_wchar__Init(codecvt_wchar *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo, 12) -codecvt_wchar* __thiscall codecvt_wchar_ctor_locinfo(codecvt_wchar *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %ld)\n", this, locinfo, refs); - - codecvt_base_ctor_refs(&this->base, refs); - this->base.facet.vtable = &MSVCP_codecvt_wchar_vtable; - - codecvt_wchar__Init(this, locinfo); - return this; -} - -/* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo, 12) -codecvt_wchar* __thiscall codecvt_short_ctor_locinfo(codecvt_wchar *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %ld)\n", this, locinfo, refs); - - codecvt_wchar_ctor_locinfo(this, locinfo, refs); - this->base.facet.vtable = &MSVCP_codecvt_short_vtable; - return this; -} - -/* ??0?$codecvt@_WDH@std@@QAE@I@Z */ -/* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs, 8) -codecvt_wchar* __thiscall codecvt_wchar_ctor_refs(codecvt_wchar *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %ld)\n", this, refs); - - _Locinfo_ctor(&locinfo); - codecvt_wchar_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$codecvt@GDH@std@@QAE@I@Z */ -/* ??0?$codecvt@GDH@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs, 8) -codecvt_wchar* __thiscall codecvt_short_ctor_refs(codecvt_wchar *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %ld)\n", this, refs); - - _Locinfo_ctor(&locinfo); - codecvt_short_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */ -/* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name, 12) -codecvt_wchar* __thiscall codecvt_short_ctor_name(codecvt_wchar *this, const char *name, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %s %ld)\n", this, name, refs); - - _Locinfo_ctor_cstr(&locinfo, name); - codecvt_short_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??_F?$codecvt@_WDH@std@@QAEXXZ */ -/* ??_F?$codecvt@_WDH@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor, 4) -codecvt_wchar* __thiscall codecvt_wchar_ctor(codecvt_wchar *this) -{ - return codecvt_wchar_ctor_refs(this, 0); -} - -/* ??_F?$codecvt@GDH@std@@QAEXXZ */ -/* ??_F?$codecvt@GDH@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_short_ctor, 4) -codecvt_wchar* __thiscall codecvt_short_ctor(codecvt_wchar *this) -{ - return codecvt_short_ctor_refs(this, 0); -} - -/* ??1?$codecvt@GDH@std@@MAE@XZ */ -/* ??1?$codecvt@GDH@std@@MEAA@XZ */ -/* ??1?$codecvt@_WDH@std@@MAE@XZ */ -/* ??1?$codecvt@_WDH@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor, 4) -void __thiscall codecvt_wchar_dtor(codecvt_wchar *this) -{ - TRACE("(%p)\n", this); - codecvt_base_dtor(&this->base); -} - -DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor, 8) -codecvt_wchar* __thiscall codecvt_wchar_vector_dtor(codecvt_wchar *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - codecvt_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - codecvt_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t codecvt_wchar__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(codecvt_wchar)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - codecvt_wchar_ctor_locinfo((codecvt_wchar*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_CTYPE; -} - -/* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl codecvt_wchar__Getcat_old(const locale_facet **facet) -{ - return codecvt_wchar__Getcat(facet, locale_classic()); -} - -codecvt_wchar* codecvt_wchar_use_facet(const locale *loc) -{ - static codecvt_wchar *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&codecvt_wchar_id)); - if(fac) { - _Lockit_dtor(&lock); - return (codecvt_wchar*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - codecvt_wchar__Getcat(&fac, loc); - obj = (codecvt_wchar*)fac; - locale_facet__Incref(&obj->base.facet); - locale_facet_register(&obj->base.facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t codecvt_short__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(codecvt_wchar)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - codecvt_short_ctor((codecvt_wchar*)*facet); - _Locinfo_dtor(&locinfo); - } - - return LC_CTYPE; -} - -/* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl codecvt_short__Getcat_old(const locale_facet **facet) -{ - return codecvt_short__Getcat(facet, locale_classic()); -} - -codecvt_wchar* codecvt_short_use_facet(const locale *loc) -{ - static codecvt_wchar *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&codecvt_short_id)); - if(fac) { - _Lockit_dtor(&lock); - return (codecvt_wchar*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - codecvt_short__Getcat(&fac, loc); - obj = (codecvt_wchar*)fac; - locale_facet__Incref(&obj->base.facet); - locale_facet_register(&obj->base.facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */ -/* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */ -locale_id* __cdecl codecvt_wchar__Id_func(void) -{ - TRACE("()\n"); - return &codecvt_wchar_id; -} - -/* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */ -/* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */ -locale_id* __cdecl codecvt_short__Id_func(void) -{ - TRACE("()\n"); - return &codecvt_short_id; -} - -/* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */ -/* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */ -/* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */ -/* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv, 4) -MSVCP_bool __thiscall codecvt_wchar_do_always_noconv(const codecvt_wchar *this) -{ - TRACE("(%p)\n", this); - return FALSE; -} - -/* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */ -/* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */ -/* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */ -/* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length, 4) -int __thiscall codecvt_wchar_do_max_length(const codecvt_wchar *this) -{ - TRACE("(%p)\n", this); - return MB_LEN_MAX; -} - -/* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */ -/* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */ -/* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */ -/* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */ -#define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \ - CALL_VTBL_FUNC(this, 16, int, \ - (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \ - (this, state, from, from_end, from_next, to, to_end, to_next)) -DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in, 32) -int __thiscall codecvt_wchar_do_in(const codecvt_wchar *this, int *state, - const char *from, const char *from_end, const char **from_next, - wchar_t *to, wchar_t *to_end, wchar_t **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, - from_end, from_next, to, to_end, to_next); - - *from_next = from; - *to_next = to; - - while(*from_next!=from_end && *to_next!=to_end) { - switch(_Mbrtowc(*to_next, *from_next, from_end-*from_next, state, &this->cvt)) { - case -2: - *from_next = from_end; - return CODECVT_partial; - case -1: - return CODECVT_error; - case 2: - (*from_next)++; - /* fall through */ - case 0: - case 1: - (*from_next)++; - (*to_next)++; - } - } - - return CODECVT_ok; -} - -/* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */ -/* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */ -/* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */ -/* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_in, 32) -int __thiscall codecvt_wchar_in(const codecvt_wchar *this, int *state, - const char *from, const char *from_end, const char **from_next, - wchar_t *to, wchar_t *to_end, wchar_t **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, - from_end, from_next, to, to_end, to_next); - return call_codecvt_wchar_do_in(this, state, from, - from_end, from_next, to, to_end, to_next); -} - -/* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */ -/* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */ -/* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */ -/* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */ -#define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \ - CALL_VTBL_FUNC(this, 20, int, \ - (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \ - (this, state, from, from_end, from_next, to, to_end, to_next)) -DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out, 32) -int __thiscall codecvt_wchar_do_out(const codecvt_wchar *this, int *state, - const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next, - char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, - from_end, from_next, to, to_end, to_next); - - *from_next = from; - *to_next = to; - - while(*from_next!=from_end && *to_next!=to_end) { - int old_state = *state, size; - char buf[MB_LEN_MAX]; - - switch((size = _Wcrtomb(buf, **from_next, state, &this->cvt))) { - case -1: - return CODECVT_error; - default: - if(size > from_end-*from_next) { - *state = old_state; - return CODECVT_partial; - } - - (*from_next)++; - memcpy_s(*to_next, to_end-*to_next, buf, size); - (*to_next) += size; - } - } - - return CODECVT_ok; -} - -/* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */ -/* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */ -/* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */ -/* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_out, 32) -int __thiscall codecvt_wchar_out(const codecvt_wchar *this, int *state, - const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next, - char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, - from_end, from_next, to, to_end, to_next); - return call_codecvt_wchar_do_out(this, state, from, - from_end, from_next, to, to_end, to_next); -} - -/* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */ -/* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */ -/* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */ -/* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */ -#define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \ - int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next)) -DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift, 20) -int __thiscall codecvt_wchar_do_unshift(const codecvt_wchar *this, - int *state, char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next); - if(*state) - WARN("unexpected state: %x\n", *state); - - *to_next = to; - return CODECVT_ok; -} - -/* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */ -/* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */ -/* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */ -/* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift, 20) -int __thiscall codecvt_wchar_unshift(const codecvt_wchar *this, - int *state, char *to, char *to_end, char **to_next) -{ - TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next); - return call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next); -} - -/* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */ -/* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */ -/* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */ -/* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */ -#define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \ - int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \ - (this, state, from, from_end, max)) -DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length, 20) -int __thiscall codecvt_wchar_do_length(const codecvt_wchar *this, const int *state, - const char *from, const char *from_end, MSVCP_size_t max) -{ - int tmp_state = *state, ret=0; - - TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max); - - while(retcvt)) { - case -2: - case -1: - return ret; - case 2: - from++; - /* fall through */ - case 0: - case 1: - from++; - ret++; - } - } - - return ret; -} - -/* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */ -/* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */ -/* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */ -/* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */ -DEFINE_THISCALL_WRAPPER(codecvt_wchar_length, 20) -int __thiscall codecvt_wchar_length(const codecvt_wchar *this, const int *state, - const char *from, const char *from_end, MSVCP_size_t max) -{ - TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max); - return call_codecvt_wchar_do_length(this, state, from, from_end, max); -} - -/* ?id@?$numpunct@D@std@@2V0locale@2@A */ -locale_id numpunct_char_id = {0}; - -/* ??_7?$numpunct@D@std@@6B@ */ -extern const vtable_ptr MSVCP_numpunct_char_vtable; - -/* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */ -/* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */ -static void numpunct_char__Init(numpunct_char *this, const _Locinfo *locinfo, MSVCP_bool isdef) -{ - int len; - - TRACE("(%p %p %d)\n", this, locinfo, isdef); - - len = strlen(_Locinfo__Getfalse(locinfo))+1; - this->false_name = MSVCRT_operator_new(len); - if(this->false_name) - memcpy((char*)this->false_name, _Locinfo__Getfalse(locinfo), len); - - len = strlen(_Locinfo__Gettrue(locinfo))+1; - this->true_name = MSVCRT_operator_new(len); - if(this->true_name) - memcpy((char*)this->true_name, _Locinfo__Gettrue(locinfo), len); - - if(isdef) { - this->grouping = MSVCRT_operator_new(1); - if(this->grouping) - *(char*)this->grouping = 0; - - this->dp = '.'; - this->sep = ','; - } else { - const struct lconv *lc = _Locinfo__Getlconv(locinfo); - - len = strlen(lc->grouping)+1; - this->grouping = MSVCRT_operator_new(len); - if(this->grouping) - memcpy((char*)this->grouping, lc->grouping, len); - - this->dp = lc->decimal_point[0]; - this->sep = lc->thousands_sep[0]; - } - - if(!this->false_name || !this->true_name || !this->grouping) { - MSVCRT_operator_delete((char*)this->grouping); - MSVCRT_operator_delete((char*)this->false_name); - MSVCRT_operator_delete((char*)this->true_name); - - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } -} - -/* ?_Tidy@?$numpunct@D@std@@AAEXXZ */ -/* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy, 4) -void __thiscall numpunct_char__Tidy(numpunct_char *this) -{ - TRACE("(%p)\n", this); - - MSVCRT_operator_delete((char*)this->grouping); - MSVCRT_operator_delete((char*)this->false_name); - MSVCRT_operator_delete((char*)this->true_name); -} - -/* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */ -/* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */ -static numpunct_char* numpunct_char_ctor_locinfo(numpunct_char *this, - const _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef) -{ - TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef); - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_numpunct_char_vtable; - numpunct_char__Init(this, locinfo, usedef); - return this; -} - -/* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */ -/* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */ -static numpunct_char* numpunct_char_ctor_name(numpunct_char *this, - const char *name, MSVCP_size_t refs, MSVCP_bool usedef) -{ - _Locinfo locinfo; - - TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef); - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_numpunct_char_vtable; - - _Locinfo_ctor_cstr(&locinfo, name); - numpunct_char__Init(this, &locinfo, usedef); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$numpunct@D@std@@QAE@I@Z */ -/* ??0?$numpunct@D@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs, 8) -numpunct_char* __thiscall numpunct_char_ctor_refs(numpunct_char *this, MSVCP_size_t refs) -{ - TRACE("(%p %lu)\n", this, refs); - return numpunct_char_ctor_name(this, "C", refs, FALSE); -} - -/* ??_F?$numpunct@D@std@@QAEXXZ */ -/* ??_F?$numpunct@D@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_ctor, 4) -numpunct_char* __thiscall numpunct_char_ctor(numpunct_char *this) -{ - return numpunct_char_ctor_refs(this, 0); -} - -/* ??1?$numpunct@D@std@@MAE@XZ */ -/* ??1?$numpunct@D@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_dtor, 4) -void __thiscall numpunct_char_dtor(numpunct_char *this) -{ - TRACE("(%p)\n", this); - numpunct_char__Tidy(this); -} - -DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor, 8) -numpunct_char* __thiscall numpunct_char_vector_dtor(numpunct_char *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - numpunct_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - numpunct_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t numpunct_char__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(numpunct_char)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - numpunct_char_ctor_name((numpunct_char*)*facet, - MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl numpunct_char__Getcat_old(const locale_facet **facet) -{ - return numpunct_char__Getcat(facet, locale_classic()); -} - -static numpunct_char* numpunct_char_use_facet(const locale *loc) -{ - static numpunct_char *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&numpunct_char_id)); - if(fac) { - _Lockit_dtor(&lock); - return (numpunct_char*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - numpunct_char__Getcat(&fac, loc); - obj = (numpunct_char*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */ -/* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point, 4) -#define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \ - char, (const numpunct_char *this), (this)) -char __thiscall numpunct_char_do_decimal_point(const numpunct_char *this) -{ - TRACE("(%p)\n", this); - return this->dp; -} - -/* ?decimal_point@?$numpunct@D@std@@QBEDXZ */ -/* ?decimal_point@?$numpunct@D@std@@QEBADXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point, 4) -char __thiscall numpunct_char_decimal_point(const numpunct_char *this) -{ - TRACE("(%p)\n", this); - return call_numpunct_char_do_decimal_point(this); -} - -/* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */ -/* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep, 4) -#define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \ - char, (const numpunct_char*), (this)) -char __thiscall numpunct_char_do_thousands_sep(const numpunct_char *this) -{ - TRACE("(%p)\n", this); - return this->sep; -} - -/* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */ -/* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep, 4) -char __thiscall numpunct_char_thousands_sep(const numpunct_char *this) -{ - TRACE("(%p)\n", this); - return call_numpunct_char_do_thousands_sep(this); -} - -/* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping, 8) -#define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \ - basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret)) -basic_string_char* __thiscall numpunct_char_do_grouping( - const numpunct_char *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping); -} - -/* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_grouping, 8) -basic_string_char* __thiscall numpunct_char_grouping(const numpunct_char *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return call_numpunct_char_do_grouping(this, ret); -} - -/* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename, 8) -#define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \ - basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret)) -basic_string_char* __thiscall numpunct_char_do_falsename( - const numpunct_char *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return MSVCP_basic_string_char_ctor_cstr(ret, this->false_name); -} - -/* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_falsename, 8) -basic_string_char* __thiscall numpunct_char_falsename(const numpunct_char *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return call_numpunct_char_do_falsename(this, ret); -} - -/* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename, 8) -#define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \ - basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret)) -basic_string_char* __thiscall numpunct_char_do_truename( - const numpunct_char *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return MSVCP_basic_string_char_ctor_cstr(ret, this->true_name); -} - -/* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_char_truename, 8) -basic_string_char* __thiscall numpunct_char_truename(const numpunct_char *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return call_numpunct_char_do_truename(this, ret); -} - -/* ?id@?$numpunct@_W@std@@2V0locale@2@A */ -locale_id numpunct_wchar_id = {0}; -/* ?id@?$numpunct@G@std@@2V0locale@2@A */ -locale_id numpunct_short_id = {0}; - -/* ??_7?$numpunct@_W@std@@6B@ */ -extern const vtable_ptr MSVCP_numpunct_wchar_vtable; -/* ??_7?$numpunct@G@std@@6B@ */ -extern const vtable_ptr MSVCP_numpunct_short_vtable; - -/* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */ -/* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */ -/* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */ -/* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */ -static void numpunct_wchar__Init(numpunct_wchar *this, - const _Locinfo *locinfo, MSVCP_bool isdef) -{ - const char *to_convert; - _Cvtvec cvt; - int len; - - TRACE("(%p %p %d)\n", this, locinfo, isdef); - - _Locinfo__Getcvt(locinfo, &cvt); - - to_convert = _Locinfo__Getfalse(locinfo); - len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0); - this->false_name = MSVCRT_operator_new(len*sizeof(WCHAR)); - if(this->false_name) - MultiByteToWideChar(cvt.page, 0, to_convert, -1, - (wchar_t*)this->false_name, len); - - to_convert = _Locinfo__Gettrue(locinfo); - len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0); - this->true_name = MSVCRT_operator_new(len*sizeof(WCHAR)); - if(this->true_name) - MultiByteToWideChar(cvt.page, 0, to_convert, -1, - (wchar_t*)this->true_name, len); - - if(isdef) { - this->grouping = MSVCRT_operator_new(1); - if(this->grouping) - *(char*)this->grouping = 0; - - this->dp = '.'; - this->sep = ','; - } else { - const struct lconv *lc = _Locinfo__Getlconv(locinfo); - - len = strlen(lc->grouping)+1; - this->grouping = MSVCRT_operator_new(len); - if(this->grouping) - memcpy((char*)this->grouping, lc->grouping, len); - - this->dp = lc->decimal_point[0]; - this->sep = lc->thousands_sep[0]; - } - - if(!this->false_name || !this->true_name || !this->grouping) { - MSVCRT_operator_delete((char*)this->grouping); - MSVCRT_operator_delete((wchar_t*)this->false_name); - MSVCRT_operator_delete((wchar_t*)this->true_name); - - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } -} - -/* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */ -/* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */ -/* ?_Tidy@?$numpunct@G@std@@AAEXXZ */ -/* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy, 4) -void __thiscall numpunct_wchar__Tidy(numpunct_wchar *this) -{ - TRACE("(%p)\n", this); - - MSVCRT_operator_delete((char*)this->grouping); - MSVCRT_operator_delete((wchar_t*)this->false_name); - MSVCRT_operator_delete((wchar_t*)this->true_name); -} - -/* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */ -/* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */ -static numpunct_wchar* numpunct_wchar_ctor_locinfo(numpunct_wchar *this, - const _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef) -{ - TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef); - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_numpunct_wchar_vtable; - numpunct_wchar__Init(this, locinfo, usedef); - return this; -} - -/* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */ -/* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */ -static numpunct_wchar* numpunct_short_ctor_locinfo(numpunct_wchar *this, - const _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef) -{ - numpunct_wchar_ctor_locinfo(this, locinfo, refs, usedef); - this->facet.vtable = &MSVCP_numpunct_short_vtable; - return this; -} - -/* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */ -/* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */ -static numpunct_wchar* numpunct_wchar_ctor_name(numpunct_wchar *this, - const char *name, MSVCP_size_t refs, MSVCP_bool usedef) -{ - _Locinfo locinfo; - - TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef); - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_numpunct_wchar_vtable; - - _Locinfo_ctor_cstr(&locinfo, name); - numpunct_wchar__Init(this, &locinfo, usedef); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */ -/* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */ -static numpunct_wchar* numpunct_short_ctor_name(numpunct_wchar *this, - const char *name, MSVCP_size_t refs, MSVCP_bool usedef) -{ - numpunct_wchar_ctor_name(this, name, refs, usedef); - this->facet.vtable = &MSVCP_numpunct_short_vtable; - return this; -} - -/* ??0?$numpunct@_W@std@@QAE@I@Z */ -/* ??0?$numpunct@_W@std@@QEAA@_K@Z */ - DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs, 8) -numpunct_wchar* __thiscall numpunct_wchar_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs) -{ - TRACE("(%p %lu)\n", this, refs); - return numpunct_wchar_ctor_name(this, "C", refs, FALSE); -} - -/* ??0?$numpunct@G@std@@QAE@I@Z */ -/* ??0?$numpunct@G@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs, 8) -numpunct_wchar* __thiscall numpunct_short_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs) -{ - numpunct_wchar_ctor_refs(this, refs); - this->facet.vtable = &MSVCP_numpunct_short_vtable; - return this; -} - -/* ??_F?$numpunct@_W@std@@QAEXXZ */ -/* ??_F?$numpunct@_W@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor, 4) -numpunct_wchar* __thiscall numpunct_wchar_ctor(numpunct_wchar *this) -{ - return numpunct_wchar_ctor_refs(this, 0); -} - -/* ??_F?$numpunct@G@std@@QAEXXZ */ -/* ??_F?$numpunct@G@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_short_ctor, 4) -numpunct_wchar* __thiscall numpunct_short_ctor(numpunct_wchar *this) -{ - return numpunct_short_ctor_refs(this, 0); -} - -/* ??1?$numpunct@_W@std@@MAE@XZ */ -/* ??1?$numpunct@_W@std@@MEAA@XZ */ -/* ??1?$numpunct@G@std@@MAE@XZ */ -/* ??1?$numpunct@G@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor, 4) -void __thiscall numpunct_wchar_dtor(numpunct_wchar *this) -{ - TRACE("(%p)\n", this); - numpunct_wchar__Tidy(this); -} - -DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor, 8) -numpunct_wchar* __thiscall numpunct_wchar_vector_dtor(numpunct_wchar *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - numpunct_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - numpunct_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t numpunct_wchar__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(numpunct_wchar)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - numpunct_wchar_ctor_name((numpunct_wchar*)*facet, - MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl numpunct_wchar__Getcat_old(const locale_facet **facet) -{ - return numpunct_wchar__Getcat(facet, locale_classic()); -} - -static numpunct_wchar* numpunct_wchar_use_facet(const locale *loc) -{ - static numpunct_wchar *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&numpunct_wchar_id)); - if(fac) { - _Lockit_dtor(&lock); - return (numpunct_wchar*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - numpunct_wchar__Getcat(&fac, loc); - obj = (numpunct_wchar*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t numpunct_short__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(numpunct_wchar)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - numpunct_short_ctor_name((numpunct_wchar*)*facet, - MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl numpunct_short__Getcat_old(const locale_facet **facet) -{ - return numpunct_short__Getcat(facet, locale_classic()); -} - -static numpunct_wchar* numpunct_short_use_facet(const locale *loc) -{ - static numpunct_wchar *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&numpunct_short_id)); - if(fac) { - _Lockit_dtor(&lock); - return (numpunct_wchar*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - numpunct_short__Getcat(&fac, loc); - obj = (numpunct_wchar*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */ -/* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */ -/* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */ -/* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point, 4) -#define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \ - wchar_t, (const numpunct_wchar *this), (this)) -wchar_t __thiscall numpunct_wchar_do_decimal_point(const numpunct_wchar *this) -{ - TRACE("(%p)\n", this); - return this->dp; -} - -/* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */ -/* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */ -/* ?decimal_point@?$numpunct@G@std@@QBEGXZ */ -/* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point, 4) -wchar_t __thiscall numpunct_wchar_decimal_point(const numpunct_wchar *this) -{ - TRACE("(%p)\n", this); - return call_numpunct_wchar_do_decimal_point(this); -} - -/* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */ -/* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */ -/* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */ -/* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep, 4) -#define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \ - wchar_t, (const numpunct_wchar *this), (this)) -wchar_t __thiscall numpunct_wchar_do_thousands_sep(const numpunct_wchar *this) -{ - TRACE("(%p)\n", this); - return this->sep; -} - -/* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */ -/* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */ -/* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */ -/* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep, 4) -wchar_t __thiscall numpunct_wchar_thousands_sep(const numpunct_wchar *this) -{ - TRACE("(%p)\n", this); - return call_numpunct_wchar_do_thousands_sep(this); -} - -/* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping, 8) -#define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \ - basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret)) -basic_string_char* __thiscall numpunct_wchar_do_grouping(const numpunct_wchar *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping); -} - -/* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping, 8) -basic_string_char* __thiscall numpunct_wchar_grouping(const numpunct_wchar *this, basic_string_char *ret) -{ - TRACE("(%p)\n", this); - return call_numpunct_wchar_do_grouping(this, ret); -} - -/* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename, 8) -#define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \ - basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret)) -basic_string_wchar* __thiscall numpunct_wchar_do_falsename(const numpunct_wchar *this, basic_string_wchar *ret) -{ - TRACE("(%p)\n", this); - return MSVCP_basic_string_wchar_ctor_cstr(ret, this->false_name); -} - -/* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename, 8) -basic_string_wchar* __thiscall numpunct_wchar_falsename(const numpunct_wchar *this, basic_string_wchar *ret) -{ - TRACE("(%p)\n", this); - return call_numpunct_wchar_do_falsename(this, ret); -} - -/* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename, 8) -#define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \ - basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret)) -basic_string_wchar* __thiscall numpunct_wchar_do_truename(const numpunct_wchar *this, basic_string_wchar *ret) -{ - TRACE("(%p)\n", this); - return MSVCP_basic_string_wchar_ctor_cstr(ret, this->true_name); -} - -/* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename, 8) -basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *this, basic_string_wchar *ret) -{ - TRACE("(%p)\n", this); - return call_numpunct_wchar_do_truename(this, ret); -} - -double __cdecl _Stod(const char *buf, char **buf_end, LONG exp) -{ - double ret = strtod(buf, buf_end); - - if(exp) - ret *= pow(10, exp); - return ret; -} - -double __cdecl _Stodx(const char *buf, char **buf_end, LONG exp, int *err) -{ - double ret; - - *err = *_errno(); - *_errno() = 0; - ret = _Stod(buf, buf_end, exp); - if(*_errno()) { - *err = *_errno(); - }else { - *_errno() = *err; - *err = 0; - } - return ret; -} - -float __cdecl _Stof(const char *buf, char **buf_end, LONG exp) -{ - return _Stod(buf, buf_end, exp); -} - -float __cdecl _Stofx(const char *buf, char **buf_end, LONG exp, int *err) -{ - return _Stodx(buf, buf_end, exp, err); -} - -static __int64 _Stollx(const char *buf, char **buf_end, int base, int *err) -{ - __int64 ret; - - *err = *_errno(); - *_errno() = 0; - ret = _strtoi64(buf, buf_end, base); - if(*_errno()) { - *err = *_errno(); - }else { - *_errno() = *err; - *err = 0; - } - return ret; -} - -LONG __cdecl _Stolx(const char *buf, char **buf_end, int base, int *err) -{ - __int64 i = _Stollx(buf, buf_end, base, err); - if(!*err && i!=(__int64)((LONG)i)) - *err = ERANGE; - return i; -} - -static unsigned __int64 _Stoullx(const char *buf, char **buf_end, int base, int *err) -{ - unsigned __int64 ret; - - *err = *_errno(); - *_errno() = 0; - ret = _strtoui64(buf, buf_end, base); - if(*_errno()) { - *err = *_errno(); - }else { - *_errno() = *err; - *err = 0; - } - return ret; -} - -ULONG __cdecl _Stoul(const char *buf, char **buf_end, int base) -{ - int err; - unsigned __int64 i = _Stoullx(buf[0]=='-' ? buf+1 : buf, buf_end, base, &err); - if(!err && i!=(unsigned __int64)((ULONG)i)) - *_errno() = ERANGE; - return buf[0]=='-' ? -i : i; -} - -ULONG __cdecl _Stoulx(const char *buf, char **buf_end, int base, int *err) -{ - unsigned __int64 i = _Stoullx(buf[0]=='-' ? buf+1 : buf, buf_end, base, err); - if(!*err && i!=(unsigned __int64)((ULONG)i)) - *err = ERANGE; - return buf[0]=='-' ? -i : i; -} - -/* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */ -locale_id num_get_wchar_id = {0}; -/* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */ -locale_id num_get_short_id = {0}; - -/* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_num_get_wchar_vtable; -/* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_num_get_short_vtable; - -/* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */ -/* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(num_get_wchar__Init, 8) -void __thiscall num_get_wchar__Init(num_get *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo, 12) -num_get* __thiscall num_get_wchar_ctor_locinfo(num_get *this, - const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_num_get_wchar_vtable; - - num_get_wchar__Init(this, locinfo); - return this; -} - -/* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo, 12) -num_get* __thiscall num_get_short_ctor_locinfo(num_get *this, - const _Locinfo *locinfo, MSVCP_size_t refs) -{ - num_get_wchar_ctor_locinfo(this, locinfo, refs); - this->facet.vtable = &MSVCP_num_get_short_vtable; - return this; -} - -/* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs, 8) -num_get* __thiscall num_get_wchar_ctor_refs(num_get *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %lu)\n", this, refs); - - _Locinfo_ctor(&locinfo); - num_get_wchar_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs, 8) -num_get* __thiscall num_get_short_ctor_refs(num_get *this, MSVCP_size_t refs) -{ - num_get_wchar_ctor_refs(this, refs); - this->facet.vtable = &MSVCP_num_get_short_vtable; - return this; -} - -/* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor, 4) -num_get* __thiscall num_get_wchar_ctor(num_get *this) -{ - return num_get_wchar_ctor_refs(this, 0); -} - -/* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(num_get_short_ctor, 4) -num_get* __thiscall num_get_short_ctor(num_get *this) -{ - return num_get_short_ctor_refs(this, 0); -} - -/* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */ -/* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */ -/* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */ -/* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor, 4) -void __thiscall num_get_wchar_dtor(num_get *this) -{ - TRACE("(%p)\n", this); - locale_facet_dtor(&this->facet); -} - -DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor, 8) -num_get* __thiscall num_get_wchar_vector_dtor(num_get *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - num_get_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - num_get_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t num_get_wchar__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(num_get)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - num_get_wchar_ctor_locinfo((num_get*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl num_get_wchar__Getcat_old(const locale_facet **facet) -{ - return num_get_wchar__Getcat(facet, locale_classic()); -} - -num_get* num_get_wchar_use_facet(const locale *loc) -{ - static num_get *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&num_get_wchar_id)); - if(fac) { - _Lockit_dtor(&lock); - return (num_get*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - num_get_wchar__Getcat(&fac, loc); - obj = (num_get*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t num_get_short__Getcat(const locale_facet **facet, const locale *loc) -{ - if(facet && !*facet) { - num_get_wchar__Getcat(facet, loc); - (*(locale_facet**)facet)->vtable = &MSVCP_num_get_short_vtable; - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl num_get_short__Getcat_old(const locale_facet **facet) -{ - return num_get_short__Getcat(facet, locale_classic()); -} - -num_get* num_get_short_use_facet(const locale *loc) -{ - static num_get *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&num_get_short_id)); - if(fac) { - _Lockit_dtor(&lock); - return (num_get*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - num_get_short__Getcat(&fac, loc); - obj = (num_get*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -static inline wchar_t mb_to_wc(char ch, const _Cvtvec *cvt) -{ - int state = 0; - wchar_t ret; - - return _Mbrtowc(&ret, &ch, 1, &state, cvt) == 1 ? ret : 0; -} - -static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator_wchar *first, - istreambuf_iterator_wchar *last, const locale *loc, numpunct_wchar *numpunct) -{ - basic_string_char grouping_bstr; - basic_string_char groups_found; - int i, groups_no = 0, cur_group = 0, exp = 0; - char *dest_beg = dest, *num_end = dest+25, *exp_end = dest+31; - wchar_t sep, digits[11], *digits_pos; - const char *grouping, *groups; - BOOL error = FALSE, got_digit = FALSE, got_nonzero = FALSE; - - TRACE("(%p %p %p %p)\n", dest, first, last, loc); - - for(i=0; i<10; i++) - digits[i] = mb_to_wc('0'+i, &this->cvt); - digits[10] = 0; - - numpunct_wchar_grouping(numpunct, &grouping_bstr); - grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); - sep = grouping[0] ? numpunct_wchar_thousands_sep(numpunct) : 0; - - if(sep) - MSVCP_basic_string_char_ctor(&groups_found); - - istreambuf_iterator_wchar_val(first); - /* get sign */ - if(first->strbuf && first->val==mb_to_wc('-', &this->cvt)) { - *dest++ = '-'; - istreambuf_iterator_wchar_inc(first); - }else if(first->strbuf && first->val==mb_to_wc('+', &this->cvt)) { - *dest++ = '+'; - istreambuf_iterator_wchar_inc(first); - } - - /* read possibly grouped numbers before decimal */ - for(; first->strbuf; istreambuf_iterator_wchar_inc(first)) { - if(!(digits_pos = wcschr(digits, first->val))) { - if(sep && first->val==sep) { - if(!groups_no) break; /* empty group - stop parsing */ - MSVCP_basic_string_char_append_ch(&groups_found, groups_no); - groups_no = 0; - ++cur_group; - }else { - break; - } - }else { - got_digit = TRUE; /* found a digit, zero or non-zero */ - /* write digit to dest if not a leading zero (to not waste dest buffer) */ - if(!got_nonzero && first->val == digits[0]) - { - ++groups_no; - continue; - } - got_nonzero = TRUE; - if(dest < num_end) - *dest++ = '0'+digits_pos-digits; - else - exp++; /* too many digits, just multiply by 10 */ - if(sep && groups_nostrbuf && first->val==numpunct_wchar_decimal_point(numpunct)) { - if(dest < num_end) - *dest++ = *localeconv()->decimal_point; - istreambuf_iterator_wchar_inc(first); - } - - /* read non-grouped after decimal */ - for(; first->strbuf; istreambuf_iterator_wchar_inc(first)) { - if(!(digits_pos = wcschr(digits, first->val))) - break; - else if(deststrbuf && (first->val==mb_to_wc('e', &this->cvt) || first->val==mb_to_wc('E', &this->cvt))) { - *dest++ = 'e'; - istreambuf_iterator_wchar_inc(first); - - if(first->strbuf && first->val==mb_to_wc('-', &this->cvt)) { - *dest++ = '-'; - istreambuf_iterator_wchar_inc(first); - }else if(first->strbuf && first->val==mb_to_wc('+', &this->cvt)) { - *dest++ = '+'; - istreambuf_iterator_wchar_inc(first); - } - - got_digit = got_nonzero = FALSE; - error = TRUE; - /* skip any leading zeroes */ - for(; first->strbuf && first->val==digits[0]; istreambuf_iterator_wchar_inc(first)) - error = FALSE; - - for(; first->strbuf && (digits_pos = wcschr(digits, first->val)); istreambuf_iterator_wchar_inc(first)) { - got_digit = got_nonzero = TRUE; /* leading zeroes would have been skipped, so first digit is non-zero */ - error = FALSE; - if(dest=0 && !error; cur_group--) { - if(*grouping == CHAR_MAX) { - if(cur_group) - error = TRUE; - break; - }else if((cur_group && *grouping!=groups[cur_group]) - || (!cur_group && *groupingcvt); - for(i=0; i<6; i++) { - digits[10+i] = mb_to_wc('a'+i, &this->cvt); - digits[16+i] = mb_to_wc('A'+i, &this->cvt); - } - - numpunct_wchar_grouping(numpunct, &grouping_bstr); - grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); - sep = grouping[0] ? numpunct_wchar_thousands_sep(numpunct) : '\0'; - - basefield = fmtflags & FMTFLAG_basefield; - if(basefield == FMTFLAG_oct) - base = 8; - else if(basefield == FMTFLAG_hex) - base = 22; /* equal to the size of digits buffer */ - else if(!basefield) - base = 0; - else - base = 10; - - istreambuf_iterator_wchar_val(first); - if(first->strbuf && first->val==mb_to_wc('-', &this->cvt)) { - *dest++ = '-'; - istreambuf_iterator_wchar_inc(first); - }else if(first->strbuf && first->val==mb_to_wc('+', &this->cvt)) { - *dest++ = '+'; - istreambuf_iterator_wchar_inc(first); - } - - if(first->strbuf && first->val==digits[0]) { - found_zero = TRUE; - istreambuf_iterator_wchar_inc(first); - if(first->strbuf && (first->val==mb_to_wc('x', &this->cvt) || first->val==mb_to_wc('X', &this->cvt))) { - if(!base || base == 22) { - found_zero = FALSE; - istreambuf_iterator_wchar_inc(first); - base = 22; - }else { - base = 10; - } - }else { - error = FALSE; - if(!base) base = 8; - } - }else { - if(!base) base = 10; - } - digits[base] = 0; - - if(sep) { - MSVCP_basic_string_char_ctor(&groups_found); - if(found_zero) ++groups_no; - } - - for(; first->strbuf; istreambuf_iterator_wchar_inc(first)) { - if(!(digits_pos = wcschr(digits, first->val))) { - if(sep && first->val==sep) { - if(!groups_no) break; /* empty group - stop parsing */ - MSVCP_basic_string_char_append_ch(&groups_found, groups_no); - groups_no = 0; - ++cur_group; - }else { - break; - } - }else { - error = FALSE; - if(dest_empty && first->val == digits[0]) { - found_zero = TRUE; - ++groups_no; - continue; - } - dest_empty = FALSE; - /* skip digits that can't be copied to dest buffer, other - * functions are responsible for detecting overflows */ - if(dest < dest_end) - *dest++ = (digits_pos-digits<10 ? '0'+digits_pos-digits : - (digits_pos-digits<16 ? 'a'+digits_pos-digits-10 : - 'A'+digits_pos-digits-16)); - if(sep && groups_no=0 && !error; cur_group--) { - if(*grouping == CHAR_MAX) { - if(cur_group) - error = TRUE; - break; - }else if((cur_group && *grouping!=groups[cur_group]) - || (!cur_group && *groupingloc, numpunct), &err); - if(v!=(unsigned __int64)((INT_PTR)v)) - *state |= IOSTATE_failbit; - else if(end!=tmp && !err) - *pval = (void*)((INT_PTR)v); - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval) -{ - return num_get_do_get_void(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_void(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval) -{ - return num_get_do_get_void(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval); -} - -static istreambuf_iterator_wchar* num_get_do_get_double(const num_get *this, - istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first, - istreambuf_iterator_wchar last, ios_base *base, int *state, - double *pval, numpunct_wchar *numpunct) -{ - double v; - char tmp[32], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stodx(tmp, &end, num_get__Getffld(this, tmp, &first, &last, base->loc, numpunct), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \ - (this, ret, first, last, base, state, pval)) -#define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval) -{ - return num_get_do_get_double(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_double(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval) -{ - return num_get_do_get_double(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval); -} - -static istreambuf_iterator_wchar* num_get_do_get_float(const num_get *this, - istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first, - istreambuf_iterator_wchar last, ios_base *base, int *state, - float *pval, numpunct_wchar *numpunct) -{ - float v; - char tmp[32], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stofx(tmp, &end, num_get__Getffld(this, tmp, &first, - &last, base->loc, numpunct), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval) -{ - return num_get_do_get_float(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_float(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval) -{ - return num_get_do_get_float(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_float(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval); -} - -static istreambuf_iterator_wchar* num_get_do_get_uint64(const num_get *this, - istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first, - istreambuf_iterator_wchar last, ios_base *base, int *state, - ULONGLONG *pval, numpunct_wchar *numpunct) -{ - unsigned __int64 v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stoullx(tmp, &end, num_get__Getifld(this, tmp, &first, - &last, base->fmtfl, base->loc, numpunct), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval) -{ - return num_get_do_get_uint64(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval) -{ - return num_get_do_get_uint64(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval); -} - -static istreambuf_iterator_wchar* num_get_do_get_int64(const num_get *this, - istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first, - istreambuf_iterator_wchar last, ios_base *base, int *state, - LONGLONG *pval, numpunct_wchar *numpunct) -{ - __int64 v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stollx(tmp, &end, num_get__Getifld(this, tmp, &first, - &last, base->fmtfl, base->loc, numpunct), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval) -{ - return num_get_do_get_int64(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_int64(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval) -{ - return num_get_do_get_int64(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval); -} - -static istreambuf_iterator_wchar* num_get_do_get_ulong(const num_get *this, - istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first, - istreambuf_iterator_wchar last, ios_base *base, int *state, - ULONG *pval, numpunct_wchar *numpunct) -{ - ULONG v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stoulx(tmp, &end, num_get__Getifld(this, tmp, &first, - &last, base->fmtfl, base->loc, numpunct), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval) -{ - return num_get_do_get_ulong(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval) -{ - return num_get_do_get_ulong(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval); -} - -static istreambuf_iterator_wchar* num_get_do_get_long(const num_get *this, - istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first, - istreambuf_iterator_wchar last, ios_base *base, int *state, - LONG *pval, numpunct_wchar *numpunct) -{ - LONG v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stolx(tmp, &end, num_get__Getifld(this, tmp, &first, - &last, base->fmtfl, base->loc, numpunct), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval) -{ - return num_get_do_get_long(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_long(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval) -{ - return num_get_do_get_long(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_long(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_uint(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return num_get_short_do_get_ulong(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned short *pval) -{ - ULONG v; - char tmp[25], *beg, *end; - int err, b; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - b = num_get_wchar__Getifld(this, tmp, - &first, &last, base->fmtfl, base->loc); - beg = tmp + (tmp[0]=='-' ? 1 : 0); - v = _Stoulx(beg, &end, b, &err); - - if(v != (ULONG)((unsigned short)v)) - *state |= IOSTATE_failbit; - else if(end!=beg && !err) - *pval = (tmp[0]=='-' ? -((unsigned short)v) : v); - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned short *pval) -{ - FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval); - return ret; -} - -/* ?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 */ -/* ?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 */ -/* ?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@ */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned short *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval); -} - -static istreambuf_iterator_wchar* num_get_do_get_bool(const num_get *this, - istreambuf_iterator_wchar *ret, istreambuf_iterator_wchar first, - istreambuf_iterator_wchar last, ios_base *base, int *state, - MSVCP_bool *pval, numpunct_wchar *numpunct) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - if(base->fmtfl & FMTFLAG_boolalpha) { - basic_string_wchar false_bstr, true_bstr; - const wchar_t *pfalse, *ptrue; - - numpunct_wchar_falsename(numpunct, &false_bstr); - numpunct_wchar_truename(numpunct, &true_bstr); - pfalse = MSVCP_basic_string_wchar_c_str(&false_bstr); - ptrue = MSVCP_basic_string_wchar_c_str(&true_bstr); - - for(istreambuf_iterator_wchar_val(&first); first.strbuf; - istreambuf_iterator_wchar_inc(&first)) { - if(pfalse && *pfalse && first.val!=*pfalse) - pfalse = NULL; - if(ptrue && *ptrue && first.val!=*ptrue) - ptrue = NULL; - - if(pfalse && *pfalse && ptrue && !*ptrue) - ptrue = NULL; - if(ptrue && *ptrue && pfalse && !*pfalse) - pfalse = NULL; - - if(pfalse) - pfalse++; - if(ptrue) - ptrue++; - - if((!pfalse || !*pfalse) && (!ptrue || !*ptrue)) - break; - } - - if(ptrue) - *pval = TRUE; - else if(pfalse) - *pval = FALSE; - else - *state |= IOSTATE_failbit; - - MSVCP_basic_string_wchar_dtor(&false_bstr); - MSVCP_basic_string_wchar_dtor(&true_bstr); - }else { - char tmp[25], *end; - int err; - LONG v = _Stolx(tmp, &end, num_get__Getifld(this, tmp, &first, - &last, base->fmtfl, base->loc, numpunct), &err); - - if(end!=tmp && err==0 && (v==0 || v==1)) - *pval = v; - else - *state |= IOSTATE_failbit; - } - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - memcpy(ret, &first, sizeof(first)); - return ret; -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \ - (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval) -{ - return num_get_do_get_bool(this, ret, first, last, base, - state, pval, numpunct_wchar_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool,36) -istreambuf_iterator_wchar *__thiscall num_get_short_do_get_bool(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval) -{ - return num_get_do_get_bool(this, ret, first, last, base, - state, pval, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool,36) -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get *this, istreambuf_iterator_wchar *ret, - istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval); -} - -/* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */ -locale_id num_get_char_id = {0}; - -/* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_num_get_char_vtable; - -/* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(num_get_char__Init, 8) -void __thiscall num_get_char__Init(num_get *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo, 12) -num_get* __thiscall num_get_char_ctor_locinfo(num_get *this, - const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_num_get_char_vtable; - - num_get_char__Init(this, locinfo); - return this; -} - -/* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs, 8) -num_get* __thiscall num_get_char_ctor_refs(num_get *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %lu)\n", this, refs); - - _Locinfo_ctor(&locinfo); - num_get_char_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(num_get_char_ctor, 4) -num_get* __thiscall num_get_char_ctor(num_get *this) -{ - return num_get_char_ctor_refs(this, 0); -} - -/* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */ -/* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(num_get_char_dtor, 4) -void __thiscall num_get_char_dtor(num_get *this) -{ - TRACE("(%p)\n", this); - locale_facet_dtor(&this->facet); -} - -DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor, 8) -num_get* __thiscall num_get_char_vector_dtor(num_get *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - num_get_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - num_get_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t num_get_char__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(num_get)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - num_get_char_ctor_locinfo((num_get*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl num_get_char__Getcat_old(const locale_facet **facet) -{ - return num_get_char__Getcat(facet, locale_classic()); -} - -num_get* num_get_char_use_facet(const locale *loc) -{ - static num_get *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&num_get_char_id)); - if(fac) { - _Lockit_dtor(&lock); - return (num_get*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - num_get_char__Getcat(&fac, loc); - obj = (num_get*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_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 */ -/* ?_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 */ -/* Copies number to dest buffer, validates grouping and skips separators. - * Updates first so it points past the number, all digits are skipped. - * Returns how exponent needs to changed. - * Size of dest buffer is not specified, assuming it's not smaller than 32: - * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte) - */ -int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_iterator_char *first, - istreambuf_iterator_char *last, const locale *loc) -{ - numpunct_char *numpunct = numpunct_char_use_facet(loc); - basic_string_char grouping_bstr; - basic_string_char groups_found; - int groups_no = 0, cur_group = 0, exp = 0; - char *dest_beg = dest, *num_end = dest+25, *exp_end = dest+31, sep; - const char *grouping, *groups; - BOOL error = FALSE, got_digit = FALSE, got_nonzero = FALSE; - - TRACE("(%p %p %p %p)\n", dest, first, last, loc); - - numpunct_char_grouping(numpunct, &grouping_bstr); - grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); - sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0'; - - if(sep) - MSVCP_basic_string_char_ctor(&groups_found); - - istreambuf_iterator_char_val(first); - /* get sign */ - if(first->strbuf && (first->val=='-' || first->val=='+')) { - *dest++ = first->val; - istreambuf_iterator_char_inc(first); - } - - /* read possibly grouped numbers before decimal */ - for(; first->strbuf; istreambuf_iterator_char_inc(first)) { - if(first->val<'0' || first->val>'9') { - if(sep && first->val==sep) { - if(!groups_no) break; /* empty group - stop parsing */ - MSVCP_basic_string_char_append_ch(&groups_found, groups_no); - groups_no = 0; - ++cur_group; - }else { - break; - } - }else { - got_digit = TRUE; /* found a digit, zero or non-zero */ - /* write digit to dest if not a leading zero (to not waste dest buffer) */ - if(!got_nonzero && first->val == '0') - { - ++groups_no; - continue; - } - got_nonzero = TRUE; - if(dest < num_end) - *dest++ = first->val; - else - exp++; /* too many digits, just multiply by 10 */ - if(sep && groups_nostrbuf && first->val==numpunct_char_decimal_point(numpunct)) { - if(dest < num_end) - *dest++ = *localeconv()->decimal_point; - istreambuf_iterator_char_inc(first); - } - - /* read non-grouped after decimal */ - for(; first->strbuf; istreambuf_iterator_char_inc(first)) { - if(first->val<'0' || first->val>'9') - break; - else if(destval; - } - } - - /* read exponent, if any */ - if(first->strbuf && (first->val=='e' || first->val=='E')) { - *dest++ = first->val; - istreambuf_iterator_char_inc(first); - - if(first->strbuf && (first->val=='-' || first->val=='+')) { - *dest++ = first->val; - istreambuf_iterator_char_inc(first); - } - - got_digit = got_nonzero = FALSE; - error = TRUE; - /* skip any leading zeroes */ - for(; first->strbuf && first->val=='0'; istreambuf_iterator_char_inc(first)) - got_digit = TRUE; - - for(; first->strbuf && first->val>='0' && first->val<='9'; istreambuf_iterator_char_inc(first)) { - got_digit = got_nonzero = TRUE; /* leading zeroes would have been skipped, so first digit is non-zero */ - error = FALSE; - if(destval; - } - - /* if just found zeroes for exponent, use that */ - if(got_digit && !got_nonzero) - { - error = FALSE; - if(dest=0 && !error; cur_group--) { - if(*grouping == CHAR_MAX) { - if(cur_group) - error = TRUE; - break; - }else if((cur_group && *grouping!=groups[cur_group]) - || (!cur_group && *grouping2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25 - */ -int __cdecl num_get_char__Getifld(const num_get *this, char *dest, istreambuf_iterator_char *first, - istreambuf_iterator_char *last, int fmtflags, const locale *loc) -{ - static const char digits[] = "0123456789abcdefABCDEF"; - - numpunct_char *numpunct = numpunct_char_use_facet(loc); - basic_string_char grouping_bstr; - basic_string_char groups_found; - int basefield, base, groups_no = 0, cur_group = 0; - char *dest_beg = dest, *dest_end = dest+24, sep; - const char *grouping, *groups; - BOOL error = TRUE, dest_empty = TRUE, found_zero = FALSE; - - TRACE("(%p %p %p %04x %p)\n", dest, first, last, fmtflags, loc); - - numpunct_char_grouping(numpunct, &grouping_bstr); - grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); - sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0'; - - basefield = fmtflags & FMTFLAG_basefield; - if(basefield == FMTFLAG_oct) - base = 8; - else if(basefield == FMTFLAG_hex) - base = 22; /* equal to the size of digits buffer */ - else if(!basefield) - base = 0; - else - base = 10; - - istreambuf_iterator_char_val(first); - if(first->strbuf && (first->val=='-' || first->val=='+')) { - *dest++ = first->val; - istreambuf_iterator_char_inc(first); - } - - if(first->strbuf && first->val=='0') { - found_zero = TRUE; - istreambuf_iterator_char_inc(first); - if(first->strbuf && (first->val=='x' || first->val=='X')) { - if(!base || base == 22) { - found_zero = FALSE; - istreambuf_iterator_char_inc(first); - base = 22; - }else { - base = 10; - } - }else { - error = FALSE; - if(!base) base = 8; - } - }else { - if (!base) base = 10; - } - - if(sep) - { - MSVCP_basic_string_char_ctor(&groups_found); - if(found_zero) ++groups_no; - } - - for(; first->strbuf; istreambuf_iterator_char_inc(first)) { - if(!memchr(digits, first->val, base)) { - if(sep && first->val==sep) { - if(!groups_no) break; /* empty group - stop parsing */ - MSVCP_basic_string_char_append_ch(&groups_found, groups_no); - groups_no = 0; - ++cur_group; - }else { - break; - } - }else { - error = FALSE; - if(dest_empty && first->val == '0') - { - found_zero = TRUE; - ++groups_no; - continue; - } - dest_empty = FALSE; - /* skip digits that can't be copied to dest buffer, other - * functions are responsible for detecting overflows */ - if(dest < dest_end) - *dest++ = first->val; - if(sep && groups_no=0 && !error; cur_group--) { - if(*grouping == CHAR_MAX) { - if(cur_group) - error = TRUE; - break; - }else if((cur_group && *grouping!=groups[cur_group]) - || (!cur_group && *groupingloc), &err); - if(v!=(unsigned __int64)((INT_PTR)v)) - *state |= IOSTATE_failbit; - else if(end!=tmp && !err) - *pval = (void*)((INT_PTR)v); - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_void,36) -istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, void **pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_void(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \ - (this, ret, first, last, base, state, pval)) -#define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_double(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, double *pval) -{ - double v; - char tmp[32], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stodx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, base->loc), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble,36) -istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, double *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_double,36) -istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, double *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_double(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_float(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, float *pval) -{ - float v; - char tmp[32], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stofx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, base->loc), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_float,36) -istreambuf_iterator_char *__thiscall num_get_char_get_float(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, float *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_float(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_uint64(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONGLONG *pval) -{ - unsigned __int64 v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stoullx(tmp, &end, num_get_char__Getifld(this, tmp, - &first, &last, base->fmtfl, base->loc), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64,36) -istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONGLONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_int64(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONGLONG *pval) -{ - __int64 v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stollx(tmp, &end, num_get_char__Getifld(this, tmp, - &first, &last, base->fmtfl, base->loc), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_int64,36) -istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONGLONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_ulong(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONG *pval) -{ - ULONG v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stoulx(tmp, &end, num_get_char__Getifld(this, tmp, - &first, &last, base->fmtfl, base->loc), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong,36) -istreambuf_iterator_char *__thiscall num_get_char_get_ulong(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_long(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONG *pval) -{ - LONG v; - char tmp[25], *end; - int err; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp, - &first, &last, base->fmtfl, base->loc), &err); - if(end!=tmp && !err) - *pval = v; - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_long,36) -istreambuf_iterator_char *__thiscall num_get_char_get_long(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONG *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_long(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_uint(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned int *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return num_get_char_do_get_ulong(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_uint,36) -istreambuf_iterator_char *__thiscall num_get_char_get_uint(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned int *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_ushort(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned short *pval) -{ - ULONG v; - char tmp[25], *beg, *end; - int err, b; - - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - b = num_get_char__Getifld(this, tmp, - &first, &last, base->fmtfl, base->loc); - beg = tmp + (tmp[0]=='-' ? 1 : 0); - v = _Stoulx(beg, &end, b, &err); - - if(v != (ULONG)((unsigned short)v)) - *state |= IOSTATE_failbit; - else if(end!=beg && !err) - *pval = (tmp[0]=='-' ? -((unsigned short)v) : v); - else - *state |= IOSTATE_failbit; - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - - *ret = first; - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort,36) -istreambuf_iterator_char *__thiscall num_get_char_get_ushort(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned short *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval); -} - -/* ?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 */ -/* ?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 */ -#define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \ - (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \ - (this, ret, first, last, base, state, pval)) -DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool,36) -istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, MSVCP_bool *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - - if(base->fmtfl & FMTFLAG_boolalpha) { - numpunct_char *numpunct = numpunct_char_use_facet(base->loc); - basic_string_char false_bstr, true_bstr; - const char *pfalse, *ptrue; - - numpunct_char_falsename(numpunct, &false_bstr); - numpunct_char_truename(numpunct, &true_bstr); - pfalse = MSVCP_basic_string_char_c_str(&false_bstr); - ptrue = MSVCP_basic_string_char_c_str(&true_bstr); - - for(istreambuf_iterator_char_val(&first); first.strbuf; - istreambuf_iterator_char_inc(&first)) { - if(pfalse && *pfalse && first.val!=*pfalse) - pfalse = NULL; - if(ptrue && *ptrue && first.val!=*ptrue) - ptrue = NULL; - - if(pfalse && *pfalse && ptrue && !*ptrue) - ptrue = NULL; - if(ptrue && *ptrue && pfalse && !*pfalse) - pfalse = NULL; - - if(pfalse) - pfalse++; - if(ptrue) - ptrue++; - - if((!pfalse || !*pfalse) && (!ptrue || !*ptrue)) - break; - } - - if(ptrue) - *pval = TRUE; - else if(pfalse) - *pval = FALSE; - else - *state |= IOSTATE_failbit; - - MSVCP_basic_string_char_dtor(&false_bstr); - MSVCP_basic_string_char_dtor(&true_bstr); - }else { - char tmp[25], *end; - int err; - LONG v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp, - &first, &last, base->fmtfl, base->loc), &err); - - if(end!=tmp && err==0 && (v==0 || v==1)) - *pval = v; - else - *state |= IOSTATE_failbit; - } - - if(!first.strbuf) - *state |= IOSTATE_eofbit; - memcpy(ret, &first, sizeof(first)); - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_get_char_get_bool,36) -istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get *this, istreambuf_iterator_char *ret, - istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, MSVCP_bool *pval) -{ - TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval); -} - -/* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */ -locale_id num_put_char_id = {0}; - -/* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_num_put_char_vtable; - -/* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(num_put_char__Init, 8) -void __thiscall num_put_char__Init(num_put *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo, 12) -num_put* __thiscall num_put_char_ctor_locinfo(num_put *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %ld)\n", this, locinfo, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_num_put_char_vtable; - - num_put_char__Init(this, locinfo); - return this; -} - -/* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs, 8) -num_put* __thiscall num_put_char_ctor_refs(num_put *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %lu)\n", this, refs); - - _Locinfo_ctor(&locinfo); - num_put_char_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(num_put_char_ctor, 4) -num_put* __thiscall num_put_char_ctor(num_put *this) -{ - return num_put_char_ctor_refs(this, 0); -} - -/* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */ -/* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(num_put_char_dtor, 4) -void __thiscall num_put_char_dtor(num_put *this) -{ - TRACE("(%p)\n", this); - locale_facet_dtor(&this->facet); -} - -DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor, 8) -num_put* __thiscall num_put_char_vector_dtor(num_put *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - num_put_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - num_put_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t num_put_char__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(num_put)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - num_put_char_ctor_locinfo((num_put*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl num_put_char__Getcat_old(const locale_facet **facet) -{ - return num_put_char__Getcat(facet, locale_classic()); -} - -num_put* num_put_char_use_facet(const locale *loc) -{ - static num_put *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&num_put_char_id)); - if(fac) { - _Lockit_dtor(&lock); - return (num_put*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - num_put_char__Getcat(&fac, loc); - obj = (num_put*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_char* __cdecl num_put_char__Put(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, const char *ptr, MSVCP_size_t count) -{ - TRACE("(%p %p %p %ld)\n", this, ret, ptr, count); - - for(; count>0; count--) - ostreambuf_iterator_char_put(&dest, *ptr++); - - *ret = dest; - return ret; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_char* __cdecl num_put_char__Putc(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, const char *ptr, MSVCP_size_t count) -{ - TRACE("(%p %p %p %ld)\n", this, ret, ptr, count); - - for(; count>0; count--) - ostreambuf_iterator_char_put(&dest, *ptr++); - - *ret = dest; - return ret; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_char* __cdecl num_put_char__Putgrouped(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, const char *ptr, MSVCP_size_t count, char delim) -{ - FIXME("(%p %p %p %ld %d) stub\n", this, ret, ptr, count, delim); - return NULL; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_char* __cdecl num_put_char__Rep(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, char c, MSVCP_size_t count) -{ - TRACE("(%p %p %d %ld)\n", this, ret, c, count); - - for(; count>0; count--) - ostreambuf_iterator_char_put(&dest, c); - - *ret = dest; - return ret; -} - -/* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */ -/* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */ -char* __cdecl num_put_char__Ffmt(const num_put *this, char *fmt, char spec, int fmtfl) -{ - int type = fmtfl & FMTFLAG_floatfield; - char *p = fmt; - - TRACE("(%p %p %d %d)\n", this, fmt, spec, fmtfl); - - *p++ = '%'; - if(fmtfl & FMTFLAG_showpos) - *p++ = '+'; - if(fmtfl & FMTFLAG_showbase) - *p++ = '#'; - *p++ = '.'; - *p++ = '*'; - if(spec) - *p++ = spec; - - if(type == FMTFLAG_fixed) - *p++ = 'f'; - else if(type == FMTFLAG_scientific) - *p++ = (fmtfl & FMTFLAG_uppercase) ? 'E' : 'e'; - else if(type == (FMTFLAG_fixed|FMTFLAG_scientific)) - *p++ = (fmtfl & FMTFLAG_uppercase) ? 'A' : 'a'; - else - *p++ = (fmtfl & FMTFLAG_uppercase) ? 'G' : 'g'; - - *p++ = '\0'; - return fmt; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_char* __cdecl num_put_char__Fput(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, const char *buf, MSVCP_size_t bef_point, - MSVCP_size_t aft_point, MSVCP_size_t trailing, MSVCP_size_t count) -{ - FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret, base, - fill, buf, bef_point, aft_point, trailing, count); - return NULL; -} - -/* TODO: This function should be removed when num_put_char__Fput is implemented */ -static ostreambuf_iterator_char* num_put_char_fput(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count) -{ - numpunct_char *numpunct = numpunct_char_use_facet(base->loc); - basic_string_char grouping_bstr; - const char *grouping; - char *p, sep = *localeconv()->decimal_point; - int cur_group = 0, group_size = 0; - int adjustfield = base->fmtfl & FMTFLAG_adjustfield; - MSVCP_size_t pad; - - TRACE("(%p %p %p %d %s %ld)\n", this, ret, base, fill, buf, count); - - /* Change decimal point */ - for(p=buf; pbuf && sep && grouping[cur_group]!=CHAR_MAX; p--) { - group_size++; - if(group_size == grouping[cur_group]) { - group_size = 0; - if(grouping[cur_group+1]) - cur_group++; - - memmove(p+1, p, buf+count-p); - *p = sep; - count++; - } - } - MSVCP_basic_string_char_dtor(&grouping_bstr); - - /* Display number with padding */ - if(count >= base->wide) - pad = 0; - else - pad = base->wide-count; - base->wide = 0; - - if((adjustfield & FMTFLAG_internal) && (buf[0]=='-' || buf[0]=='+')) { - num_put_char__Putc(this, &dest, dest, buf, 1); - buf++; - } - if(adjustfield != FMTFLAG_left) { - num_put_char__Rep(this, ret, dest, fill, pad); - pad = 0; - } - num_put_char__Putc(this, &dest, dest, buf, count); - return num_put_char__Rep(this, ret, dest, fill, pad); -} - -/* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */ -/* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */ -char* __cdecl num_put_char__Ifmt(const num_put *this, char *fmt, const char *spec, int fmtfl) -{ - int base = fmtfl & FMTFLAG_basefield; - char *p = fmt; - - TRACE("(%p %p %p %d)\n", this, fmt, spec, fmtfl); - - *p++ = '%'; - if(fmtfl & FMTFLAG_showpos) - *p++ = '+'; - if(fmtfl & FMTFLAG_showbase) - *p++ = '#'; - - *p++ = *spec++; - if(*spec == 'l') - *p++ = *spec++; - - if(base == FMTFLAG_oct) - *p++ = 'o'; - else if(base == FMTFLAG_hex) - *p++ = (fmtfl & FMTFLAG_uppercase) ? 'X' : 'x'; - else - *p++ = *spec; - - *p++ = '\0'; - return fmt; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_char* __cdecl num_put_char__Iput(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count) -{ - numpunct_char *numpunct = numpunct_char_use_facet(base->loc); - basic_string_char grouping_bstr; - const char *grouping; - char *p, sep; - int cur_group = 0, group_size = 0; - int adjustfield = base->fmtfl & FMTFLAG_adjustfield; - MSVCP_size_t pad; - - TRACE("(%p %p %p %d %s %ld)\n", this, ret, base, fill, buf, count); - - /* Add separators to number */ - numpunct_char_grouping(numpunct, &grouping_bstr); - grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); - sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0'; - - for(p=buf+count-1; p>buf && sep && grouping[cur_group]!=CHAR_MAX; p--) { - group_size++; - if(group_size == grouping[cur_group]) { - group_size = 0; - if(grouping[cur_group+1]) - cur_group++; - - memmove(p+1, p, buf+count-p); - *p = sep; - count++; - } - } - MSVCP_basic_string_char_dtor(&grouping_bstr); - - /* Display number with padding */ - if(count >= base->wide) - pad = 0; - else - pad = base->wide-count; - base->wide = 0; - - if((adjustfield & FMTFLAG_internal) && (buf[0]=='-' || buf[0]=='+')) { - num_put_char__Putc(this, &dest, dest, buf, 1); - buf++; - }else if((adjustfield & FMTFLAG_internal) && (buf[1]=='x' || buf[1]=='X')) { - num_put_char__Putc(this, &dest, dest, buf, 2); - buf += 2; - } - if(adjustfield != FMTFLAG_left) { - num_put_char__Rep(this, ret, dest, fill, pad); - pad = 0; - } - num_put_char__Putc(this, &dest, dest, buf, count); - return num_put_char__Rep(this, ret, dest, fill, pad); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long, 28) -ostreambuf_iterator_char* __thiscall num_put_char_do_put_long(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, LONG v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - return num_put_char__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_char__Ifmt(this, fmt, "ld", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_long, 28) -ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, LONG v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - return call_num_put_char_do_put_long(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong, 28) -ostreambuf_iterator_char* __thiscall num_put_char_do_put_ulong(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, ULONG v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - return num_put_char__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_char__Ifmt(this, fmt, "lu", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong, 28) -ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, ULONG v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - return call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v); -} - -static inline streamsize get_precision(const ios_base *base) -{ - return base->prec <= 0 && !(base->fmtfl & FMTFLAG_fixed) ? 6 : base->prec; -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -#define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \ - (this, ret, dest, base, fill, v)) -#define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double, 32) -ostreambuf_iterator_char* __thiscall num_put_char_do_put_double(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, double v) -{ - char *tmp; - char fmt[8]; /* strlen("%+#.*lg")+1 */ - int size; - streamsize prec; - - TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); - - num_put_char__Ffmt(this, fmt, '\0', base->fmtfl); - prec = get_precision(base); - size = _scprintf(fmt, prec, v); - - /* TODO: don't use dynamic allocation */ - tmp = MSVCRT_operator_new(size*2); - if(!tmp) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_put_char_fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, prec, v)); - MSVCRT_operator_delete(tmp); - return ret; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_double, 32) -ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, double v) -{ - TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); - return call_num_put_char_do_put_double(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble, 32) -ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, double v) -{ - TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); - return call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr, 28) -ostreambuf_iterator_char* __thiscall num_put_char_do_put_ptr(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, const void *v) -{ - char tmp[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */ - - TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v); - - return num_put_char__Iput(this, ret, dest, base, fill, tmp, sprintf(tmp, "%p", v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr, 28) -ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, const void *v) -{ - TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v); - return call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64, 32) -ostreambuf_iterator_char* __thiscall num_put_char_do_put_int64(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, __int64 v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - - return num_put_char__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_char__Ifmt(this, fmt, "lld", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_int64, 32) -ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, __int64 v) -{ - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - return call_num_put_char_do_put_int64(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64, 32) -ostreambuf_iterator_char* __thiscall num_put_char_do_put_uint64(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, unsigned __int64 v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - - return num_put_char__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_char__Ifmt(this, fmt, "llu", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64, 32) -ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, unsigned __int64 v) -{ - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - return call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \ - (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool, 28) -ostreambuf_iterator_char* __thiscall num_put_char_do_put_bool(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, MSVCP_bool v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - if(base->fmtfl & FMTFLAG_boolalpha) { - numpunct_char *numpunct = numpunct_char_use_facet(base->loc); - basic_string_char str; - MSVCP_size_t pad, len; - - if(v) - numpunct_char_truename(numpunct, &str); - else - numpunct_char_falsename(numpunct, &str); - - len = MSVCP_basic_string_char_length(&str); - pad = (len>base->wide ? 0 : base->wide-len); - base->wide = 0; - - if((base->fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - num_put_char__Rep(this, &dest, dest, fill, pad); - pad = 0; - } - num_put_char__Putc(this, &dest, dest, MSVCP_basic_string_char_c_str(&str), len); - MSVCP_basic_string_char_dtor(&str); - return num_put_char__Rep(this, ret, dest, fill, pad); - } - - return num_put_char_put_long(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_char_put_bool, 28) -ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, MSVCP_bool v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - return call_num_put_char_do_put_bool(this, ret, dest, base, fill, v); -} - -/* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */ -locale_id num_put_wchar_id = {0}; -/* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */ -locale_id num_put_short_id = {0}; - -/* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_num_put_wchar_vtable; -/* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_num_put_short_vtable; - -/* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(num_put_wchar__Init, 8) -void __thiscall num_put_wchar__Init(num_put *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo, 12) -num_put* __thiscall num_put_wchar_ctor_locinfo(num_put *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %ld)\n", this, locinfo, refs); - - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_num_put_wchar_vtable; - - num_put_wchar__Init(this, locinfo); - return this; -} - -/* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo, 12) -num_put* __thiscall num_put_short_ctor_locinfo(num_put *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - num_put_wchar_ctor_locinfo(this, locinfo, refs); - this->facet.vtable = &MSVCP_num_put_short_vtable; - return this; -} - -/* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs, 8) -num_put* __thiscall num_put_wchar_ctor_refs(num_put *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %lu)\n", this, refs); - - _Locinfo_ctor(&locinfo); - num_put_wchar_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs, 8) -num_put* __thiscall num_put_short_ctor_refs(num_put *this, MSVCP_size_t refs) -{ - num_put_wchar_ctor_refs(this, refs); - this->facet.vtable = &MSVCP_num_put_short_vtable; - return this; -} - -/* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor, 4) -num_put* __thiscall num_put_wchar_ctor(num_put *this) -{ - return num_put_wchar_ctor_refs(this, 0); -} - -/* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(num_put_short_ctor, 4) -num_put* __thiscall num_put_short_ctor(num_put *this) -{ - return num_put_short_ctor_refs(this, 0); -} - -/* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */ -/* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */ -/* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */ -/* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor, 4) -void __thiscall num_put_wchar_dtor(num_put *this) -{ - TRACE("(%p)\n", this); - locale_facet_dtor(&this->facet); -} - -DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor, 8) -num_put* __thiscall num_put_wchar_vector_dtor(num_put *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - num_put_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - num_put_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t num_put_wchar__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(num_put)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - num_put_wchar_ctor_locinfo((num_put*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl num_put_wchar__Getcat_old(const locale_facet **facet) -{ - return num_put_wchar__Getcat(facet, locale_classic()); -} - -/* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t num_put_short__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(num_put)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - num_put_short_ctor_locinfo((num_put*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_NUMERIC; -} - -/* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl num_put_short__Getcat_old(const locale_facet **facet) -{ - return num_put_short__Getcat(facet, locale_classic()); -} - -num_put* num_put_wchar_use_facet(const locale *loc) -{ - static num_put *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&num_put_wchar_id)); - if(fac) { - _Lockit_dtor(&lock); - return (num_put*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - num_put_wchar__Getcat(&fac, loc); - obj = (num_put*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -num_put* num_put_short_use_facet(const locale *loc) -{ - static num_put *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&num_put_short_id)); - if(fac) { - _Lockit_dtor(&lock); - return (num_put*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - num_put_short__Getcat(&fac, loc); - obj = (num_put*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_wchar* __cdecl num_put_wchar__Put(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, const wchar_t *ptr, MSVCP_size_t count) -{ - TRACE("(%p %p %s %ld)\n", this, ret, debugstr_wn(ptr, count), count); - - for(; count>0; count--) - ostreambuf_iterator_wchar_put(&dest, *ptr++); - - *ret = dest; - return ret; -} - -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_wchar* __cdecl num_put_wchar__Putc(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, const char *ptr, MSVCP_size_t count) -{ - int state = 0; - wchar_t ch; - - TRACE("(%p %p %s %ld)\n", this, ret, debugstr_an(ptr, count), count); - - for(; count>0; count--) { - if(_Mbrtowc(&ch, ptr++, 1, &state, &this->cvt) == 1) - ostreambuf_iterator_wchar_put(&dest, ch); - } - - *ret = dest; - return ret; -} - -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_wchar* __cdecl num_put_wchar__Putgrouped(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, const char *ptr, MSVCP_size_t count, wchar_t delim) -{ - FIXME("(%p %p %p %ld %d) stub\n", this, ret, ptr, count, delim); - return NULL; -} - -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_wchar* __cdecl num_put_wchar__Rep(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, wchar_t c, MSVCP_size_t count) -{ - TRACE("(%p %p %d %ld)\n", this, ret, c, count); - - for(; count>0; count--) - ostreambuf_iterator_wchar_put(&dest, c); - - *ret = dest; - return ret; -} - -/* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */ -/* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */ -/* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */ -/* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */ -char* __cdecl num_put_wchar__Ffmt(const num_put *this, char *fmt, char spec, int fmtfl) -{ - int type = fmtfl & FMTFLAG_floatfield; - char *p = fmt; - - TRACE("(%p %p %d %d)\n", this, fmt, spec, fmtfl); - - *p++ = '%'; - if(fmtfl & FMTFLAG_showpos) - *p++ = '+'; - if(fmtfl & FMTFLAG_showbase) - *p++ = '#'; - *p++ = '.'; - *p++ = '*'; - if(spec) - *p++ = spec; - - if(type == FMTFLAG_fixed) - *p++ = 'f'; - else if(type == FMTFLAG_scientific) - *p++ = (fmtfl & FMTFLAG_uppercase) ? 'E' : 'e'; - else if(type == (FMTFLAG_fixed|FMTFLAG_scientific)) - *p++ = (fmtfl & FMTFLAG_uppercase) ? 'A' : 'a'; - else - *p++ = (fmtfl & FMTFLAG_uppercase) ? 'G' : 'g'; - - *p++ = '\0'; - return fmt; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_wchar* __cdecl num_put_wchar__Fput(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, const char *buf, MSVCP_size_t bef_point, - MSVCP_size_t aft_point, MSVCP_size_t trailing, MSVCP_size_t count) -{ - FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret, base, - fill, buf, bef_point, aft_point, trailing, count); - return NULL; -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_wchar* __cdecl num_put_short__Fput(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, const char *buf, MSVCP_size_t bef_point, - MSVCP_size_t aft_point, MSVCP_size_t trailing, MSVCP_size_t count) -{ - FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret, base, - fill, buf, bef_point, aft_point, trailing, count); - return NULL; -} - -/* TODO: This function should be removed when num_put_wchar__Fput is implemented */ -static ostreambuf_iterator_wchar* num_put__fput(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf, - MSVCP_size_t count, numpunct_wchar *numpunct) -{ - basic_string_char grouping_bstr; - const char *grouping; - char *p, dec_point = *localeconv()->decimal_point; - wchar_t sep; - int cur_group = 0, group_size = 0; - int adjustfield = base->fmtfl & FMTFLAG_adjustfield; - MSVCP_size_t i, pad; - - TRACE("(%p %p %p %d %s %ld)\n", this, ret, base, fill, buf, count); - - for(p=buf; pbuf && sep && grouping[cur_group]!=CHAR_MAX; p--) { - group_size++; - if(group_size == grouping[cur_group]) { - group_size = 0; - if(grouping[cur_group+1]) - cur_group++; - - memmove(p+1, p, buf+count-p); - *p = '\0'; /* mark thousands separator positions */ - count++; - } - } - MSVCP_basic_string_char_dtor(&grouping_bstr); - - /* Display number with padding */ - if(count >= base->wide) - pad = 0; - else - pad = base->wide-count; - base->wide = 0; - - if((adjustfield & FMTFLAG_internal) && (buf[0]=='-' || buf[0]=='+')) { - num_put_wchar__Putc(this, &dest, dest, buf, 1); - buf++; - } - if(adjustfield != FMTFLAG_left) { - num_put_wchar__Rep(this, ret, dest, fill, pad); - pad = 0; - } - - for(i=0; ifmtfl & FMTFLAG_adjustfield; - MSVCP_size_t i, pad; - - TRACE("(%p %p %p %d %s %ld)\n", this, ret, base, fill, buf, count); - - /* Add separators to number */ - numpunct_wchar_grouping(numpunct, &grouping_bstr); - grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); - sep = grouping[0] ? numpunct_wchar_thousands_sep(numpunct) : '\0'; - - for(p=buf+count-1; p>buf && sep && grouping[cur_group]!=CHAR_MAX; p--) { - group_size++; - if(group_size == grouping[cur_group]) { - group_size = 0; - if(grouping[cur_group+1]) - cur_group++; - - memmove(p+1, p, buf+count-p); - *p = '\0'; /* mark thousands separator positions */ - count++; - } - } - MSVCP_basic_string_char_dtor(&grouping_bstr); - - /* Display number with padding */ - if(count >= base->wide) - pad = 0; - else - pad = base->wide-count; - base->wide = 0; - - if((adjustfield & FMTFLAG_internal) && (buf[0]=='-' || buf[0]=='+')) { - num_put_wchar__Putc(this, &dest, dest, buf, 1); - buf++; - }else if((adjustfield & FMTFLAG_internal) && (buf[1]=='x' || buf[1]=='X')) { - num_put_wchar__Putc(this, &dest, dest, buf, 2); - buf += 2; - } - if(adjustfield != FMTFLAG_left) { - num_put_wchar__Rep(this, ret, dest, fill, pad); - pad = 0; - } - - for(i=0; iloc)); -} - -/* ?_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 */ -/* ?_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 */ -ostreambuf_iterator_wchar* __cdecl num_put_short__Iput(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, char *buf, MSVCP_size_t count) -{ - return num_put__Iput(this, ret, dest, base, fill, buf, count, numpunct_short_use_facet(base->loc)); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_long(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, LONG v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - return num_put_wchar__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "ld", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long, 28) -ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_long(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, LONG v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - return num_put_short__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "ld", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, LONG v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - return call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_ulong(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, ULONG v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - return num_put_wchar__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "lu", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong, 28) -ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_ulong(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, ULONG v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - return num_put_short__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "lu", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, ULONG v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - return call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -#define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \ - (this, ret, dest, base, fill, v)) -#define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double, 32) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_double(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, double v) -{ - char *tmp; - char fmt[8]; /* strlen("%+#.*lg")+1 */ - int size; - streamsize prec; - - TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); - - num_put_wchar__Ffmt(this, fmt, '\0', base->fmtfl); - prec = get_precision(base); - size = _scprintf(fmt, prec, v); - - /* TODO: don't use dynamic allocation */ - tmp = MSVCRT_operator_new(size*2); - if(!tmp) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_put__fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, prec, v), - numpunct_wchar_use_facet(base->loc)); - MSVCRT_operator_delete(tmp); - return ret; -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double, 32) -ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_double(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, double v) -{ - char *tmp; - char fmt[8]; /* strlen("%+#.*lg")+1 */ - int size; - streamsize prec; - - TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); - - num_put_wchar__Ffmt(this, fmt, '\0', base->fmtfl); - prec = get_precision(base); - size = _scprintf(fmt, prec, v); - - /* TODO: don't use dynamic allocation */ - tmp = MSVCRT_operator_new(size*2); - if(!tmp) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_put__fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, prec, v), - numpunct_short_use_facet(base->loc)); - MSVCRT_operator_delete(tmp); - return ret; -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double, 32) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, double v) -{ - TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); - return call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble, 32) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, double v) -{ - TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); - return call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_ptr(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, const void *v) -{ - char tmp[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */ - - TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v); - - return num_put_wchar__Iput(this, ret, dest, base, fill, tmp, sprintf(tmp, "%p", v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr, 28) -ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_ptr(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, const void *v) -{ - char tmp[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */ - - TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v); - - return num_put_short__Iput(this, ret, dest, base, fill, tmp, sprintf(tmp, "%p", v)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, const void *v) -{ - TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v); - return call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64, 32) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_int64(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, __int64 v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - - return num_put_wchar__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "lld", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64, 32) -ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_int64(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, __int64 v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - - return num_put_short__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "lld", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64, 32) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, __int64 v) -{ - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - return call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64, 32) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_uint64(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, unsigned __int64 v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - - return num_put_wchar__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "llu", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64, 32) -ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_uint64(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, unsigned __int64 v) -{ - char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ - char fmt[7]; /* strlen("%+#lld")+1 */ - - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - - return num_put_short__Iput(this, ret, dest, base, fill, tmp, - sprintf(tmp, num_put_wchar__Ifmt(this, fmt, "llu", base->fmtfl), v)); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64, 32) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, unsigned __int64 v) -{ - TRACE("(%p %p %p %d)\n", this, ret, base, fill); - return call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -#define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \ - (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \ - (this, ret, dest, base, fill, v)) -DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_do_put_bool(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, MSVCP_bool v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - if(base->fmtfl & FMTFLAG_boolalpha) { - numpunct_wchar *numpunct = numpunct_wchar_use_facet(base->loc); - basic_string_wchar str; - MSVCP_size_t pad, len; - - if(v) - numpunct_wchar_truename(numpunct, &str); - else - numpunct_wchar_falsename(numpunct, &str); - - len = MSVCP_basic_string_wchar_length(&str); - pad = (len>base->wide ? 0 : base->wide-len); - base->wide = 0; - - if((base->fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - num_put_wchar__Rep(this, &dest, dest, fill, pad); - pad = 0; - } - num_put_wchar__Put(this, &dest, dest, MSVCP_basic_string_wchar_c_str(&str), len); - MSVCP_basic_string_wchar_dtor(&str); - return num_put_wchar__Rep(this, ret, dest, fill, pad); - } - - return num_put_wchar_put_long(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool, 28) -ostreambuf_iterator_wchar* __thiscall num_put_short_do_put_bool(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, MSVCP_bool v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - - if(base->fmtfl & FMTFLAG_boolalpha) { - numpunct_wchar *numpunct = numpunct_short_use_facet(base->loc); - basic_string_wchar str; - MSVCP_size_t pad, len; - - if(v) - numpunct_wchar_truename(numpunct, &str); - else - numpunct_wchar_falsename(numpunct, &str); - - len = MSVCP_basic_string_wchar_length(&str); - pad = (len>base->wide ? 0 : base->wide-len); - base->wide = 0; - - if((base->fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { - num_put_wchar__Rep(this, &dest, dest, fill, pad); - pad = 0; - } - num_put_wchar__Put(this, &dest, dest, MSVCP_basic_string_wchar_c_str(&str), len); - MSVCP_basic_string_wchar_dtor(&str); - return num_put_wchar__Rep(this, ret, dest, fill, pad); - } - - return num_put_wchar_put_long(this, ret, dest, base, fill, v); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool, 28) -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put *this, ostreambuf_iterator_wchar *ret, - ostreambuf_iterator_wchar dest, ios_base *base, wchar_t fill, MSVCP_bool v) -{ - TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); - return call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v); -} - -/* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */ -locale_id time_put_char_id = {0}; - -/* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */ -extern const vtable_ptr MSVCP_time_put_char_vtable; - -/* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */ -/* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */ -DEFINE_THISCALL_WRAPPER(time_put_char__Init, 8) -void __thiscall time_put_char__Init(time_put *this, const _Locinfo *locinfo) -{ - TRACE("(%p %p)\n", this, locinfo); - _Locinfo__Gettnames(locinfo, &this->time); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo, 12) -time_put* __thiscall time_put_char_ctor_locinfo(time_put *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_time_put_char_vtable; - time_put_char__Init(this, locinfo); - return this; -} - -/* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs, 8) -time_put* __thiscall time_put_char_ctor_refs(time_put *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %lu)\n", this, refs); - - _Locinfo_ctor(&locinfo); - time_put_char_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(time_put_char_ctor, 4) -time_put* __thiscall time_put_char_ctor(time_put *this) -{ - return time_put_char_ctor_refs(this, 0); -} - -/* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */ -/* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(time_put_char_dtor, 4) -void __thiscall time_put_char_dtor(time_put *this) -{ - TRACE("(%p)\n", this); - _Timevec_dtor(&this->time); -} - -DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor, 8) -time_put* __thiscall time_put_char_vector_dtor(time_put *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - time_put_char_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - time_put_char_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t time_put_char__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - _Locinfo locinfo; - - *facet = MSVCRT_operator_new(sizeof(time_put)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - - _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - time_put_char_ctor_locinfo((time_put*)*facet, &locinfo, 0); - _Locinfo_dtor(&locinfo); - } - - return LC_TIME; -} - -/* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl time_put_char__Getcat_old(const locale_facet **facet) -{ - return time_put_char__Getcat(facet, locale_classic()); -} - -static time_put* time_put_char_use_facet(const locale *loc) -{ - static time_put *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&time_put_char_id)); - if(fac) { - _Lockit_dtor(&lock); - return (time_put*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - time_put_char__Getcat(&fac, loc); - obj = (time_put*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(time_put_char_do_put, 36) -#define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \ - (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \ - (this, ret, dest, base, fill, t, spec, mod)) -ostreambuf_iterator_char* __thiscall time_put_char_do_put(const time_put *this, ostreambuf_iterator_char *ret, - ostreambuf_iterator_char dest, ios_base *base, char fill, const struct tm *t, char spec, char mod) -{ - char buf[64], fmt[4], *p = fmt; - MSVCP_size_t i, len; - - TRACE("(%p %p %p %c %p %c %c)\n", this, ret, base, fill, t, spec, mod); - - *p++ = '%'; - if(mod) - *p++ = mod; - *p++ = spec; - *p++ = 0; - - len = _Strftime(buf, sizeof(buf), fmt, t, this->time.timeptr); - for(i=0; itime); - _Locinfo__Getcvt(locinfo, &this->cvt); -} - -/* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo, 12) -time_put* __thiscall time_put_wchar_ctor_locinfo(time_put *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - TRACE("(%p %p %lu)\n", this, locinfo, refs); - locale_facet_ctor_refs(&this->facet, refs); - this->facet.vtable = &MSVCP_time_put_wchar_vtable; - time_put_wchar__Init(this, locinfo); - return this; -} - -/* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */ -/* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo, 12) -time_put* __thiscall time_put_short_ctor_locinfo(time_put *this, const _Locinfo *locinfo, MSVCP_size_t refs) -{ - time_put_wchar_ctor_locinfo(this, locinfo, refs); - this->facet.vtable = &MSVCP_time_put_short_vtable; - return this; -} - -/* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */ -/* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name, 12) -time_put* __thiscall time_put_wchar_ctor_name(time_put *this, const char *name, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %s %lu)\n", this, debugstr_a(name), refs); - - _Locinfo_ctor_cstr(&locinfo, name); - time_put_wchar_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */ -/* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name, 12) -time_put* __thiscall time_put_short_ctor_name(time_put *this, const char *name, MSVCP_size_t refs) -{ - time_put_wchar_ctor_name(this, name, refs); - this->facet.vtable = &MSVCP_time_put_short_vtable; - return this; -} - -/* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs, 8) -time_put* __thiscall time_put_wchar_ctor_refs(time_put *this, MSVCP_size_t refs) -{ - _Locinfo locinfo; - - TRACE("(%p %lu)\n", this, refs); - - _Locinfo_ctor(&locinfo); - time_put_wchar_ctor_locinfo(this, &locinfo, refs); - _Locinfo_dtor(&locinfo); - return this; -} - -/* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */ -/* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */ -DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs, 8) -time_put* __thiscall time_put_short_ctor_refs(time_put *this, MSVCP_size_t refs) -{ - time_put_wchar_ctor_refs(this, refs); - this->facet.vtable = &MSVCP_time_put_short_vtable; - return this; -} - -/* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor, 4) -time_put* __thiscall time_put_wchar_ctor(time_put *this) -{ - return time_put_wchar_ctor_refs(this, 0); -} - -/* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */ -/* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(time_put_short_ctor, 4) -time_put* __thiscall time_put_short_ctor(time_put *this) -{ - time_put_wchar_ctor(this); - this->facet.vtable = &MSVCP_time_put_short_vtable; - return this; -} - -/* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */ -/* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */ -/* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */ -/* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor, 4) -void __thiscall time_put_wchar_dtor(time_put *this) -{ - TRACE("(%p)\n", this); - _Timevec_dtor(&this->time); -} - -DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor, 8) -time_put* __thiscall time_put_wchar_vector_dtor(time_put *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - time_put_wchar_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - time_put_wchar_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t time_put_wchar__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(time_put)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - time_put_wchar_ctor_name((time_put*)*facet, - MSVCP_basic_string_char_c_str(&loc->ptr->name), 0); - } - - return LC_TIME; -} - -/* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl time_put_wchar__Getcat_old(const locale_facet **facet) -{ - return time_put_wchar__Getcat(facet, locale_classic()); -} - -static time_put* time_put_wchar_use_facet(const locale *loc) -{ - static time_put *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&time_put_wchar_id)); - if(fac) { - _Lockit_dtor(&lock); - return (time_put*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - time_put_wchar__Getcat(&fac, loc); - obj = (time_put*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ -/* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ -static MSVCP_size_t time_put_short__Getcat(const locale_facet **facet, const locale *loc) -{ - TRACE("(%p %p)\n", facet, loc); - - if(facet && !*facet) { - *facet = MSVCRT_operator_new(sizeof(time_put)); - if(!*facet) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return 0; - } - time_put_short_ctor_name((time_put*)*facet, - MSVCP_basic_string_char_c_str(&loc->ptr->name), 0); - } - - return LC_TIME; -} - -/* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ -/* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ -MSVCP_size_t __cdecl time_put_short__Getcat_old(const locale_facet **facet) -{ - return time_put_short__Getcat(facet, locale_classic()); -} - -static time_put* time_put_short_use_facet(const locale *loc) -{ - static time_put *obj = NULL; - - _Lockit lock; - const locale_facet *fac; - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - fac = locale__Getfacet(loc, locale_id_operator_size_t(&time_put_short_id)); - if(fac) { - _Lockit_dtor(&lock); - return (time_put*)fac; - } - - if(obj) { - _Lockit_dtor(&lock); - return obj; - } - - time_put_short__Getcat(&fac, loc); - obj = (time_put*)fac; - locale_facet__Incref(&obj->facet); - locale_facet_register(&obj->facet); - _Lockit_dtor(&lock); - - return obj; -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put, 36) -#define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \ - (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \ - (this, ret, dest, base, fill, t, spec, mod)) -ostreambuf_iterator_wchar* __thiscall time_put_wchar_do_put(const time_put *this, - ostreambuf_iterator_wchar *ret, ostreambuf_iterator_wchar dest, ios_base *base, - wchar_t fill, const struct tm *t, char spec, char mod) -{ - char buf[64], fmt[4], *p = fmt; - MSVCP_size_t i, len; - wchar_t c; - - TRACE("(%p %p %p %c %p %c %c)\n", this, ret, base, fill, t, spec, mod); - - *p++ = '%'; - if(mod) - *p++ = mod; - *p++ = spec; - *p++ = 0; - - len = _Strftime(buf, sizeof(buf), fmt, t, this->time.timeptr); - for(i=0; icvt); - ostreambuf_iterator_wchar_put(&dest, c); - } - - *ret = dest; - return ret; -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_put, 36) -ostreambuf_iterator_wchar* __thiscall time_put_wchar_put(const time_put *this, - ostreambuf_iterator_wchar *ret, ostreambuf_iterator_wchar dest, ios_base *base, - wchar_t fill, const struct tm *t, char spec, char mod) -{ - TRACE("(%p %p %p %c %p %c %c)\n", this, ret, base, fill, t, spec, mod); - return call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod); -} - -/* ?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 */ -/* ?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 */ -/* ?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 */ -/* ?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 */ -DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format, 36) -ostreambuf_iterator_wchar* __thiscall time_put_wchar_put_format(const time_put *this, - ostreambuf_iterator_wchar *ret, ostreambuf_iterator_wchar dest, ios_base *base, - wchar_t fill, const struct tm *t, const wchar_t *pat, const wchar_t *pat_end) -{ - wchar_t percent = mb_to_wc('%', &this->cvt); - char c[MB_LEN_MAX]; - - TRACE("(%p %p %p %c %p %s)\n", this, ret, base, fill, t, debugstr_wn(pat, pat_end-pat)); - - while(pat < pat_end) { - if(*pat != percent) { - ostreambuf_iterator_wchar_put(&dest, *pat++); - }else if(++pat == pat_end) { - ostreambuf_iterator_wchar_put(&dest, percent); - }else if(!_Wcrtomb(c, *pat, NULL, &this->cvt) || (*c=='#' && pat+1==pat_end)) { - ostreambuf_iterator_wchar_put(&dest, percent); - ostreambuf_iterator_wchar_put(&dest, *pat++); - }else { - if(*c == '#') { - if(!_Wcrtomb(c, *pat++, NULL, &this->cvt)) { - ostreambuf_iterator_wchar_put(&dest, percent); - ostreambuf_iterator_wchar_put(&dest, *(pat-1)); - ostreambuf_iterator_wchar_put(&dest, *pat); - }else { - time_put_wchar_put(this, &dest, dest, base, fill, t, *c, '#'); - } - }else { - time_put_wchar_put(this, &dest, dest, base, fill, t, *c, 0); - } - } - } - - *ret = dest; - return ret; -} - -/* ??0_Locimp@locale@std@@AAE@_N@Z */ -/* ??0_Locimp@locale@std@@AEAA@_N@Z */ -DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8) -locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, MSVCP_bool transparent) -{ - TRACE("(%p %d)\n", this, transparent); - - memset(this, 0, sizeof(locale__Locimp)); - locale_facet_ctor_refs(&this->facet, 1); - this->transparent = transparent; - MSVCP_basic_string_char_ctor_cstr(&this->name, "*"); - return this; -} - -/* ??_F_Locimp@locale@std@@QAEXXZ */ -/* ??_F_Locimp@locale@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4) -locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this) -{ - return locale__Locimp_ctor_transparent(this, FALSE); -} - -/* ??0_Locimp@locale@std@@AAE@ABV012@@Z */ -/* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */ -DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor, 8) -locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const locale__Locimp *copy) -{ - _Lockit lock; - MSVCP_size_t i; - - TRACE("(%p %p)\n", this, copy); - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - memcpy(this, copy, sizeof(locale__Locimp)); - locale_facet_ctor_refs(&this->facet, 1); - if(copy->facetvec) { - this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*)); - if(!this->facetvec) { - _Lockit_dtor(&lock); - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return NULL; - } - for(i=0; ifacet_cnt; i++) - { - this->facetvec[i] = copy->facetvec[i]; - if(this->facetvec[i]) - locale_facet__Incref(this->facetvec[i]); - } - } - MSVCP_basic_string_char_copy_ctor(&this->name, ©->name); - _Lockit_dtor(&lock); - return this; -} - -/* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */ -/* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */ -locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const locale__Locimp *copy) -{ - return locale__Locimp_copy_ctor(this, copy); -} - -/* ??1_Locimp@locale@std@@MAE@XZ */ -/* ??1_Locimp@locale@std@@MEAA@XZ */ -DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor, 4) -void __thiscall locale__Locimp_dtor(locale__Locimp *this) -{ - MSVCP_size_t i; - - TRACE("(%p)\n", this); - - locale_facet_dtor(&this->facet); - for(i=0; ifacet_cnt; i++) - if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i])) - call_locale_facet_vector_dtor(this->facetvec[i], 1); - - MSVCRT_operator_delete(this->facetvec); - MSVCP_basic_string_char_dtor(&this->name); -} - -/* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */ -/* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */ -void __cdecl locale__Locimp__Locimp_dtor(locale__Locimp *this) -{ - locale__Locimp_dtor(this); -} - -DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor, 8) -locale__Locimp* __thiscall locale__Locimp_vector_dtor(locale__Locimp *this, unsigned int flags) -{ - TRACE("(%p %x)\n", this, flags); - if(flags & 2) { - /* we have an array, with the number of elements stored before the first object */ - INT_PTR i, *ptr = (INT_PTR *)this-1; - - for(i=*ptr-1; i>=0; i--) - locale__Locimp_dtor(this+i); - MSVCRT_operator_delete(ptr); - } else { - locale__Locimp_dtor(this); - if(flags & 1) - MSVCRT_operator_delete(this); - } - - return this; -} - -/* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */ -/* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */ -void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet *facet, MSVCP_size_t id) -{ - _Lockit lock; - - TRACE("(%p %p %lu)\n", locimp, facet, id); - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - if(id >= locimp->facet_cnt) { - MSVCP_size_t new_size = id+1; - locale_facet **new_facetvec; - - if(new_size < locale_id__Id_cnt+1) - new_size = locale_id__Id_cnt+1; - - new_facetvec = MSVCRT_operator_new(sizeof(locale_facet*)*new_size); - if(!new_facetvec) { - _Lockit_dtor(&lock); - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return; - } - - memset(new_facetvec, 0, sizeof(locale_facet*)*new_size); - memcpy(new_facetvec, locimp->facetvec, sizeof(locale_facet*)*locimp->facet_cnt); - MSVCRT_operator_delete(locimp->facetvec); - locimp->facetvec = new_facetvec; - locimp->facet_cnt = new_size; - } - - if(locimp->facetvec[id] && locale_facet__Decref(locimp->facetvec[id])) - call_locale_facet_vector_dtor(locimp->facetvec[id], 1); - - locimp->facetvec[id] = facet; - if(facet) - locale_facet__Incref(facet); - _Lockit_dtor(&lock); -} - -/* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */ -/* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */ -DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac, 12) -void __thiscall locale__Locimp__Addfac(locale__Locimp *this, locale_facet *facet, MSVCP_size_t id) -{ - locale__Locimp__Locimp_Addfac(this, facet, id); -} - -/* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */ -/* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */ -locale__Locimp** __cdecl locale__Locimp__Clocptr_func(void) -{ - FIXME("stub\n"); - return NULL; -} - -/* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */ -/* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */ -/* List of missing facets: - * messages, money_get, money_put, moneypunct, moneypunct, time_get - */ -void __cdecl locale__Locimp__Makeushloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc) -{ - FIXME("(%p %d %p %p) semi-stub\n", locinfo, cat, locimp, loc); - - if(cat & (1<<(ctype_short__Getcat(NULL, NULL)-1))) { - ctype_wchar *ctype; - - if(loc) { - ctype = ctype_short_use_facet(loc); - }else { - ctype = MSVCRT_operator_new(sizeof(ctype_wchar)); - if(!ctype) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - ctype_short_ctor_locinfo(ctype, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &ctype->base.facet, locale_id_operator_size_t(&ctype_short_id)); - } - - if(cat & (1<<(num_get_short__Getcat(NULL, NULL)-1))) { - num_get *numget; - - if(loc) { - numget = num_get_short_use_facet(loc); - }else { - numget = MSVCRT_operator_new(sizeof(num_get)); - if(!numget) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_get_short_ctor_locinfo(numget, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &numget->facet, locale_id_operator_size_t(&num_get_short_id)); - } - - if(cat & (1<<(num_put_short__Getcat(NULL, NULL)-1))) { - num_put *numput; - - if(loc) { - numput = num_put_short_use_facet(loc); - }else { - numput = MSVCRT_operator_new(sizeof(num_put)); - if(!numput) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_put_short_ctor_locinfo(numput, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &numput->facet, locale_id_operator_size_t(&num_put_short_id)); - } - - if(cat & (1<<(numpunct_short__Getcat(NULL, NULL)-1))) { - numpunct_wchar *numpunct; - - if(loc) { - numpunct = numpunct_short_use_facet(loc); - }else { - numpunct = MSVCRT_operator_new(sizeof(numpunct_wchar)); - if(!numpunct) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - numpunct_short_ctor_locinfo(numpunct, locinfo, 0, FALSE); - } - locale__Locimp__Addfac(locimp, &numpunct->facet, locale_id_operator_size_t(&numpunct_short_id)); - } - - if(cat & (1<<(collate_short__Getcat(NULL, NULL)-1))) { - collate *c; - - if(loc) { - c = collate_short_use_facet(loc); - }else { - c = MSVCRT_operator_new(sizeof(collate)); - if(!c) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - collate_short_ctor_locinfo(c, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &c->facet, locale_id_operator_size_t(&collate_short_id)); - } - - if(cat & (1<<(time_put_short__Getcat(NULL, NULL)-1))) { - time_put *t; - - if(loc) { - t = time_put_short_use_facet(loc); - }else { - t = MSVCRT_operator_new(sizeof(time_put)); - if(!t) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - time_put_short_ctor_locinfo(t, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &t->facet, locale_id_operator_size_t(&time_put_short_id)); - } - - if(cat & (1<<(codecvt_short__Getcat(NULL, NULL)-1))) { - codecvt_wchar *codecvt; - - if(loc) { - codecvt = codecvt_short_use_facet(loc); - }else { - codecvt = MSVCRT_operator_new(sizeof(codecvt_wchar)); - if(!codecvt) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - codecvt_short_ctor_locinfo(codecvt, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &codecvt->base.facet, locale_id_operator_size_t(&codecvt_short_id)); - } -} - -/* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */ -/* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */ -/* List of missing facets: - * messages, money_get, money_put, moneypunct, moneypunct, time_get - */ -void __cdecl locale__Locimp__Makewloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc) -{ - FIXME("(%p %d %p %p) semi-stub\n", locinfo, cat, locimp, loc); - - if(cat & (1<<(ctype_wchar__Getcat(NULL, NULL)-1))) { - ctype_wchar *ctype; - - if(loc) { - ctype = ctype_wchar_use_facet(loc); - }else { - ctype = MSVCRT_operator_new(sizeof(ctype_wchar)); - if(!ctype) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - ctype_wchar_ctor_locinfo(ctype, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &ctype->base.facet, locale_id_operator_size_t(&ctype_wchar_id)); - } - - if(cat & (1<<(num_get_wchar__Getcat(NULL, NULL)-1))) { - num_get *numget; - - if(loc) { - numget = num_get_wchar_use_facet(loc); - }else { - numget = MSVCRT_operator_new(sizeof(num_get)); - if(!numget) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_get_wchar_ctor_locinfo(numget, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &numget->facet, locale_id_operator_size_t(&num_get_wchar_id)); - } - - if(cat & (1<<(num_put_wchar__Getcat(NULL, NULL)-1))) { - num_put *numput; - - if(loc) { - numput = num_put_wchar_use_facet(loc); - }else { - numput = MSVCRT_operator_new(sizeof(num_put)); - if(!numput) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_put_wchar_ctor_locinfo(numput, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &numput->facet, locale_id_operator_size_t(&num_put_wchar_id)); - } - - if(cat & (1<<(numpunct_wchar__Getcat(NULL, NULL)-1))) { - numpunct_wchar *numpunct; - - if(loc) { - numpunct = numpunct_wchar_use_facet(loc); - }else { - numpunct = MSVCRT_operator_new(sizeof(numpunct_wchar)); - if(!numpunct) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - numpunct_wchar_ctor_locinfo(numpunct, locinfo, 0, FALSE); - } - locale__Locimp__Addfac(locimp, &numpunct->facet, locale_id_operator_size_t(&numpunct_wchar_id)); - } - - if(cat & (1<<(collate_wchar__Getcat(NULL, NULL)-1))) { - collate *c; - - if(loc) { - c = collate_wchar_use_facet(loc); - }else { - c = MSVCRT_operator_new(sizeof(collate)); - if(!c) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - collate_wchar_ctor_locinfo(c, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &c->facet, locale_id_operator_size_t(&collate_wchar_id)); - } - - if(cat & (1<<(time_put_wchar__Getcat(NULL, NULL)-1))) { - time_put *t; - - if(loc) { - t = time_put_wchar_use_facet(loc); - }else { - t = MSVCRT_operator_new(sizeof(time_put)); - if(!t) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - time_put_wchar_ctor_locinfo(t, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &t->facet, locale_id_operator_size_t(&time_put_wchar_id)); - } - - if(cat & (1<<(codecvt_wchar__Getcat(NULL, NULL)-1))) { - codecvt_wchar *codecvt; - - if(loc) { - codecvt = codecvt_wchar_use_facet(loc); - }else { - codecvt = MSVCRT_operator_new(sizeof(codecvt_wchar)); - if(!codecvt) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - codecvt_wchar_ctor_locinfo(codecvt, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &codecvt->base.facet, locale_id_operator_size_t(&codecvt_wchar_id)); - } -} - -/* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */ -/* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */ -/* List of missing facets: - * messages, money_get, money_put, moneypunct, moneypunct, time_get - */ -void __cdecl locale__Locimp__Makexloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc) -{ - FIXME("(%p %d %p %p) semi-stub\n", locinfo, cat, locimp, loc); - - if(cat & (1<<(ctype_char__Getcat(NULL, NULL)-1))) { - ctype_char *ctype; - - if(loc) { - ctype = ctype_char_use_facet(loc); - }else { - ctype = MSVCRT_operator_new(sizeof(ctype_char)); - if(!ctype) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - ctype_char_ctor_locinfo(ctype, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &ctype->base.facet, locale_id_operator_size_t(&ctype_char_id)); - } - - if(cat & (1<<(num_get_char__Getcat(NULL, NULL)-1))) { - num_get *numget; - - if(loc) { - numget = num_get_char_use_facet(loc); - }else { - numget = MSVCRT_operator_new(sizeof(num_get)); - if(!numget) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_get_char_ctor_locinfo(numget, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &numget->facet, locale_id_operator_size_t(&num_get_char_id)); - } - - if(cat & (1<<(num_put_char__Getcat(NULL, NULL)-1))) { - num_put *numput; - - if(loc) { - numput = num_put_char_use_facet(loc); - }else { - numput = MSVCRT_operator_new(sizeof(num_put)); - if(!numput) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - num_put_char_ctor_locinfo(numput, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &numput->facet, locale_id_operator_size_t(&num_put_char_id)); - } - - if(cat & (1<<(numpunct_char__Getcat(NULL, NULL)-1))) { - numpunct_char *numpunct; - - if(loc) { - numpunct = numpunct_char_use_facet(loc); - }else { - numpunct = MSVCRT_operator_new(sizeof(numpunct_char)); - if(!numpunct) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - numpunct_char_ctor_locinfo(numpunct, locinfo, 0, FALSE); - } - locale__Locimp__Addfac(locimp, &numpunct->facet, locale_id_operator_size_t(&numpunct_char_id)); - } - - if(cat & (1<<(collate_char__Getcat(NULL, NULL)-1))) { - collate *c; - - if(loc) { - c = collate_char_use_facet(loc); - }else { - c = MSVCRT_operator_new(sizeof(collate)); - if(!c) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - collate_char_ctor_locinfo(c, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &c->facet, locale_id_operator_size_t(&collate_char_id)); - } - - if(cat & (1<<(time_put_char__Getcat(NULL, NULL)-1))) { - time_put *t; - - if(loc) { - t = time_put_char_use_facet(loc); - }else { - t = MSVCRT_operator_new(sizeof(time_put)); - if(!t) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - time_put_char_ctor_locinfo(t, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &t->facet, locale_id_operator_size_t(&time_put_char_id)); - } - - if(cat & (1<<(codecvt_char__Getcat(NULL, NULL)-1))) { - codecvt_char *codecvt; - - if(loc) { - codecvt = codecvt_char_use_facet(loc); - }else { - codecvt = MSVCRT_operator_new(sizeof(codecvt_char)); - if(!codecvt) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - codecvt_char_ctor_locinfo(codecvt, locinfo, 0); - } - locale__Locimp__Addfac(locimp, &codecvt->base.facet, locale_id_operator_size_t(&codecvt_char_id)); - } -} - -/* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */ -/* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */ -locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc) -{ - TRACE("(%p %d %p %p)\n", locinfo, cat, locimp, loc); - - locale__Locimp__Makexloc(locinfo, cat, locimp, loc); - locale__Locimp__Makewloc(locinfo, cat, locimp, loc); - locale__Locimp__Makeushloc(locinfo, cat, locimp, loc); - - locimp->catmask |= cat; - MSVCP_basic_string_char_assign(&locimp->name, &locinfo->newlocname); - return locimp; -} - -/* ??_7_Locimp@locale@std@@6B@ */ -const vtable_ptr MSVCP_locale__Locimp_vtable[] = { - (vtable_ptr)THISCALL_NAME(locale__Locimp_vector_dtor) -}; - -/* ??0locale@std@@AAE@PAV_Locimp@01@@Z */ -/* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */ -DEFINE_THISCALL_WRAPPER(locale_ctor_locimp, 8) -locale* __thiscall locale_ctor_locimp(locale *this, locale__Locimp *locimp) -{ - TRACE("(%p %p)\n", this, locimp); - /* Don't change locimp reference counter */ - this->ptr = locimp; - return this; -} - -/* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */ -/* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */ -locale__Locimp* __cdecl locale__Init(void) -{ - _Lockit lock; - - TRACE("\n"); - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - if(global_locale) { - _Lockit_dtor(&lock); - return global_locale; - } - - global_locale = MSVCRT_operator_new(sizeof(locale__Locimp)); - if(!global_locale) { - _Lockit_dtor(&lock); - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return NULL; - } - - locale__Locimp_ctor(global_locale); - global_locale->catmask = (1<<(LC_MAX+1))-1; - MSVCP_basic_string_char_dtor(&global_locale->name); - MSVCP_basic_string_char_ctor_cstr(&global_locale->name, "C"); - - locale__Locimp__Clocptr = global_locale; - global_locale->facet.refs++; - locale_ctor_locimp(&classic_locale, locale__Locimp__Clocptr); - _Lockit_dtor(&lock); - - return global_locale; -} - -/* ??0locale@std@@QAE@ABV01@0H@Z */ -/* ??0locale@std@@QEAA@AEBV01@0H@Z */ -DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16) -locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat) -{ - _Locinfo locinfo; - - TRACE("(%p %p %p %d)\n", this, loc, other, cat); - - this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); - if(!this->ptr) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - locale__Locimp_copy_ctor(this->ptr, loc->ptr); - - _Locinfo_ctor_cat_cstr(&locinfo, loc->ptr->catmask, MSVCP_basic_string_char_c_str(&loc->ptr->name)); - _Locinfo__Addcats(&locinfo, cat & other->ptr->catmask, MSVCP_basic_string_char_c_str(&other->ptr->name)); - locale__Locimp__Makeloc(&locinfo, cat, this->ptr, other); - _Locinfo_dtor(&locinfo); - - return this; -} - -/* ??0locale@std@@QAE@ABV01@@Z */ -/* ??0locale@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(locale_copy_ctor, 8) -locale* __thiscall locale_copy_ctor(locale *this, const locale *copy) -{ - TRACE("(%p %p)\n", this, copy); - this->ptr = copy->ptr; - locale_facet__Incref(&this->ptr->facet); - return this; -} - -/* ??0locale@std@@QAE@ABV01@PBDH@Z */ -/* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */ -DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr, 16) -locale* __thiscall locale_ctor_locale_cstr(locale *this, const locale *loc, const char *locname, category cat) -{ - FIXME("(%p %p %s %d) stub\n", this, loc, locname, cat); - return NULL; -} - -/* ??0locale@std@@QAE@PBDH@Z */ -/* ??0locale@std@@QEAA@PEBDH@Z */ -DEFINE_THISCALL_WRAPPER(locale_ctor_cstr, 12) -locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category cat) -{ - _Locinfo locinfo; - - TRACE("(%p %s %d)\n", this, locname, cat); - - this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); - if(!this->ptr) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - locale__Locimp_ctor(this->ptr); - - locale__Init(); - - _Locinfo_ctor_cat_cstr(&locinfo, cat, locname); - if(!memcmp(MSVCP_basic_string_char_c_str(&locinfo.newlocname), "*", 2)) { - _Locinfo_dtor(&locinfo); - MSVCRT_operator_delete(this->ptr); - throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name"); - } - - locale__Locimp__Makeloc(&locinfo, cat, this->ptr, NULL); - _Locinfo_dtor(&locinfo); - - return this; -} - -/* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */ -/* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */ -DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized, 8) -locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized) -{ - TRACE("(%p)\n", this); - this->ptr = NULL; - return this; -} - -/* ??0locale@std@@QAE@XZ */ -/* ??0locale@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(locale_ctor, 4) -locale* __thiscall locale_ctor(locale *this) -{ - TRACE("(%p)\n", this); - this->ptr = locale__Init(); - locale_facet__Incref(&this->ptr->facet); - return this; -} - -/* ??1locale@std@@QAE@XZ */ -/* ??1locale@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(locale_dtor, 4) -void __thiscall locale_dtor(locale *this) -{ - TRACE("(%p)\n", this); - if(this->ptr && locale_facet__Decref(&this->ptr->facet)) - { - locale__Locimp_dtor(this->ptr); - MSVCRT_operator_delete(this->ptr); - } -} - -/* ??4locale@std@@QAEAAV01@ABV01@@Z */ -/* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(locale_operator_assign, 8) -locale* __thiscall locale_operator_assign(locale *this, const locale *loc) -{ - FIXME("(%p %p) stub\n", this, loc); - return NULL; -} - -/* ??8locale@std@@QBE_NABV01@@Z */ -/* ??8locale@std@@QEBA_NAEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(locale_operator_equal, 8) -MSVCP_bool __thiscall locale_operator_equal(const locale *this, const locale *loc) -{ - FIXME("(%p %p) stub\n", this, loc); - return 0; -} - -/* ??9locale@std@@QBE_NABV01@@Z */ -/* ??9locale@std@@QEBA_NAEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(locale_operator_not_equal, 8) -MSVCP_bool __thiscall locale_operator_not_equal(const locale *this, locale const *loc) -{ - FIXME("(%p %p) stub\n", this, loc); - return 0; -} - -/* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */ -/* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */ -DEFINE_THISCALL_WRAPPER(locale__Addfac, 16) -locale* __thiscall locale__Addfac(locale *this, locale_facet *facet, MSVCP_size_t id, MSVCP_size_t catmask) -{ - TRACE("(%p %p %lu %lu)\n", this, facet, id, catmask); - - if(this->ptr->facet.refs > 1) { - locale__Locimp *new_ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); - if(!new_ptr) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return NULL; - } - locale__Locimp_copy_ctor(new_ptr, this->ptr); - locale_facet__Decref(&this->ptr->facet); - this->ptr = new_ptr; - } - - locale__Locimp__Addfac(this->ptr, facet, id); - - if(catmask) { - MSVCP_basic_string_char_dtor(&this->ptr->name); - MSVCP_basic_string_char_ctor_cstr(&this->ptr->name, "*"); - } - return this; -} - -/* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */ -/* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */ -DEFINE_THISCALL_WRAPPER(locale__Getfacet, 8) -const locale_facet* __thiscall locale__Getfacet(const locale *this, MSVCP_size_t id) -{ - locale_facet *fac; - - TRACE("(%p %lu)\n", this, id); - - fac = id < this->ptr->facet_cnt ? this->ptr->facetvec[id] : NULL; - if(fac || !this->ptr->transparent) - return fac; - - return id < global_locale->facet_cnt ? global_locale->facetvec[id] : NULL; -} - -/* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */ -/* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */ -locale__Locimp* __cdecl locale__Getgloballocale(void) -{ - TRACE("\n"); - return global_locale; -} - -/* ?_Setgloballocale@locale@std@@CAXPAX@Z */ -/* ?_Setgloballocale@locale@std@@CAXPEAX@Z */ -void __cdecl locale__Setgloballocale(void *locimp) -{ - TRACE("(%p)\n", locimp); - global_locale = locimp; -} - -/* ?classic@locale@std@@SAABV12@XZ */ -/* ?classic@locale@std@@SAAEBV12@XZ */ -const locale* __cdecl locale_classic(void) -{ - TRACE("\n"); - locale__Init(); - return &classic_locale; -} - -/* ?empty@locale@std@@SA?AV12@XZ */ -locale* __cdecl locale_empty(locale *ret) -{ - TRACE("\n"); - - locale__Init(); - - ret->ptr = MSVCRT_operator_new(sizeof(locale__Locimp)); - if(!ret->ptr) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - locale__Locimp_ctor_transparent(ret->ptr, TRUE); - return ret; -} - -/* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(locale_name, 8) -basic_string_char* __thiscall locale_name(const locale *this, basic_string_char *ret) -{ - TRACE( "(%p)\n", this); - MSVCP_basic_string_char_copy_ctor(ret, &this->ptr->name); - return ret; -} - -/* ?global@locale@std@@SA?AV12@ABV12@@Z */ -/* ?global@locale@std@@SA?AV12@AEBV12@@Z */ -locale* __cdecl locale_global(locale *ret, const locale *loc) -{ - _Lockit lock; - int i; - - TRACE("(%p %p)\n", loc, ret); - - _Lockit_ctor_locktype(&lock, _LOCK_LOCALE); - locale_ctor(ret); - - if(loc->ptr != global_locale) { - locale_facet__Decref(&global_locale->facet); - global_locale = loc->ptr; - locale_facet__Incref(&global_locale->facet); - - for(i=LC_ALL+1; i<=LC_MAX; i++) { - if((global_locale->catmask & (1<<(i-1))) == 0) - continue; - setlocale(i, MSVCP_basic_string_char_c_str(&global_locale->name)); - } - } - _Lockit_dtor(&lock); - return ret; -} - -/* wctrans */ -wctrans_t __cdecl wctrans(const char *property) -{ - static const char str_tolower[] = "tolower"; - static const char str_toupper[] = "toupper"; - - if(!strcmp(property, str_tolower)) - return 2; - if(!strcmp(property, str_toupper)) - return 1; - return 0; -} - -/* towctrans */ -wint_t __cdecl towctrans(wint_t c, wctrans_t category) -{ - if(category == 1) - return towupper(c); - return towlower(c); -} - -DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@") -DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@") -DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@") -DEFINE_RTTI_DATA1(collate_short, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@G@std@@") -DEFINE_RTTI_DATA1(ctype_base, 0, &locale_facet_rtti_base_descriptor, ".?AUctype_base@std@@") -DEFINE_RTTI_DATA2(ctype_char, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@D@std@@") -DEFINE_RTTI_DATA2(ctype_wchar, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@_W@std@@") -DEFINE_RTTI_DATA2(ctype_short, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@G@std@@") -DEFINE_RTTI_DATA1(codecvt_base, 0, &locale_facet_rtti_base_descriptor, ".?AVcodecvt_base@std@@") -DEFINE_RTTI_DATA2(codecvt_char, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@DDH@std@@") -DEFINE_RTTI_DATA2(codecvt_wchar, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@_WDH@std@@") -DEFINE_RTTI_DATA2(codecvt_short, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@GDH@std@@") -DEFINE_RTTI_DATA1(numpunct_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@D@std@@") -DEFINE_RTTI_DATA1(numpunct_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@_W@std@@") -DEFINE_RTTI_DATA1(numpunct_short, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@G@std@@") -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@@") -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@@") -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@@") -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@@") -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@@") -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@@") -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@@") -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@@") -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@@") - -#ifndef __GNUC__ -void __asm_dummy_vtables(void) { -#endif - __ASM_VTABLE(locale_facet, - VTABLE_ADD_FUNC(locale_facet_vector_dtor)); - __ASM_VTABLE(collate_char, - VTABLE_ADD_FUNC(collate_char_vector_dtor) - VTABLE_ADD_FUNC(collate_char_do_compare) - VTABLE_ADD_FUNC(collate_char_do_transform) - VTABLE_ADD_FUNC(collate_char_do_hash)); - __ASM_VTABLE(collate_wchar, - VTABLE_ADD_FUNC(collate_wchar_vector_dtor) - VTABLE_ADD_FUNC(collate_wchar_do_compare) - VTABLE_ADD_FUNC(collate_wchar_do_transform) - VTABLE_ADD_FUNC(collate_wchar_do_hash)); - __ASM_VTABLE(collate_short, - VTABLE_ADD_FUNC(collate_wchar_vector_dtor) - VTABLE_ADD_FUNC(collate_wchar_do_compare) - VTABLE_ADD_FUNC(collate_wchar_do_transform) - VTABLE_ADD_FUNC(collate_wchar_do_hash)); - __ASM_VTABLE(ctype_base, - VTABLE_ADD_FUNC(ctype_base_vector_dtor)); - __ASM_VTABLE(ctype_char, - VTABLE_ADD_FUNC(ctype_char_vector_dtor) - VTABLE_ADD_FUNC(ctype_char_do_tolower) - VTABLE_ADD_FUNC(ctype_char_do_tolower_ch) - VTABLE_ADD_FUNC(ctype_char_do_toupper) - VTABLE_ADD_FUNC(ctype_char_do_toupper_ch) - VTABLE_ADD_FUNC(ctype_char_do_widen) - VTABLE_ADD_FUNC(ctype_char_do_widen_ch) - VTABLE_ADD_FUNC(ctype_char__Do_widen_s) - VTABLE_ADD_FUNC(ctype_char_do_narrow) - VTABLE_ADD_FUNC(ctype_char_do_narrow_ch) - VTABLE_ADD_FUNC(ctype_char__Do_narrow_s)); - __ASM_VTABLE(ctype_wchar, - VTABLE_ADD_FUNC(ctype_wchar_vector_dtor) - VTABLE_ADD_FUNC(ctype_wchar_do_is) - VTABLE_ADD_FUNC(ctype_wchar_do_is_ch) - VTABLE_ADD_FUNC(ctype_wchar_do_scan_is) - VTABLE_ADD_FUNC(ctype_wchar_do_scan_not) - VTABLE_ADD_FUNC(ctype_wchar_do_tolower) - VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch) - VTABLE_ADD_FUNC(ctype_wchar_do_toupper) - VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch) - VTABLE_ADD_FUNC(ctype_wchar_do_widen) - VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s) - VTABLE_ADD_FUNC(ctype_wchar_do_narrow) - VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s)); - __ASM_VTABLE(ctype_short, - VTABLE_ADD_FUNC(ctype_wchar_vector_dtor) - VTABLE_ADD_FUNC(ctype_wchar_do_is) - VTABLE_ADD_FUNC(ctype_wchar_do_is_ch) - VTABLE_ADD_FUNC(ctype_wchar_do_scan_is) - VTABLE_ADD_FUNC(ctype_wchar_do_scan_not) - VTABLE_ADD_FUNC(ctype_wchar_do_tolower) - VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch) - VTABLE_ADD_FUNC(ctype_wchar_do_toupper) - VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch) - VTABLE_ADD_FUNC(ctype_wchar_do_widen) - VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s) - VTABLE_ADD_FUNC(ctype_wchar_do_narrow) - VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch) - VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s)); - __ASM_VTABLE(codecvt_base, - VTABLE_ADD_FUNC(codecvt_base_vector_dtor) - VTABLE_ADD_FUNC(codecvt_base_do_always_noconv) - VTABLE_ADD_FUNC(codecvt_base_do_max_length) - VTABLE_ADD_FUNC(codecvt_base_do_encoding)); - __ASM_VTABLE(codecvt_char, - VTABLE_ADD_FUNC(codecvt_char_vector_dtor) - VTABLE_ADD_FUNC(codecvt_base_do_always_noconv) - VTABLE_ADD_FUNC(codecvt_base_do_max_length) - VTABLE_ADD_FUNC(codecvt_base_do_encoding) - VTABLE_ADD_FUNC(codecvt_char_do_in) - VTABLE_ADD_FUNC(codecvt_char_do_out) - VTABLE_ADD_FUNC(codecvt_char_do_unshift) - VTABLE_ADD_FUNC(codecvt_char_do_length)); - __ASM_VTABLE(codecvt_wchar, - VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor) - VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv) - VTABLE_ADD_FUNC(codecvt_wchar_do_max_length) - VTABLE_ADD_FUNC(codecvt_base_do_encoding) - VTABLE_ADD_FUNC(codecvt_wchar_do_in) - VTABLE_ADD_FUNC(codecvt_wchar_do_out) - VTABLE_ADD_FUNC(codecvt_wchar_do_unshift) - VTABLE_ADD_FUNC(codecvt_wchar_do_length)); - __ASM_VTABLE(codecvt_short, - VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor) - VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv) - VTABLE_ADD_FUNC(codecvt_wchar_do_max_length) - VTABLE_ADD_FUNC(codecvt_base_do_encoding) - VTABLE_ADD_FUNC(codecvt_wchar_do_in) - VTABLE_ADD_FUNC(codecvt_wchar_do_out) - VTABLE_ADD_FUNC(codecvt_wchar_do_unshift) - VTABLE_ADD_FUNC(codecvt_wchar_do_length)); - __ASM_VTABLE(numpunct_char, - VTABLE_ADD_FUNC(numpunct_char_vector_dtor) - VTABLE_ADD_FUNC(numpunct_char_do_decimal_point) - VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep) - VTABLE_ADD_FUNC(numpunct_char_do_grouping) - VTABLE_ADD_FUNC(numpunct_char_do_falsename) - VTABLE_ADD_FUNC(numpunct_char_do_truename)); - __ASM_VTABLE(numpunct_wchar, - VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor) - VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point) - VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep) - VTABLE_ADD_FUNC(numpunct_wchar_do_grouping) - VTABLE_ADD_FUNC(numpunct_wchar_do_falsename) - VTABLE_ADD_FUNC(numpunct_wchar_do_truename)); - __ASM_VTABLE(numpunct_short, - VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor) - VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point) - VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep) - VTABLE_ADD_FUNC(numpunct_wchar_do_grouping) - VTABLE_ADD_FUNC(numpunct_wchar_do_falsename) - VTABLE_ADD_FUNC(numpunct_wchar_do_truename)); - __ASM_VTABLE(num_get_char, - VTABLE_ADD_FUNC(num_get_char_vector_dtor) - VTABLE_ADD_FUNC(num_get_char_do_get_void) - VTABLE_ADD_FUNC(num_get_char_do_get_double) - VTABLE_ADD_FUNC(num_get_char_do_get_double) - VTABLE_ADD_FUNC(num_get_char_do_get_float) - VTABLE_ADD_FUNC(num_get_char_do_get_uint64) - VTABLE_ADD_FUNC(num_get_char_do_get_int64) - VTABLE_ADD_FUNC(num_get_char_do_get_ulong) - VTABLE_ADD_FUNC(num_get_char_do_get_long) - VTABLE_ADD_FUNC(num_get_char_do_get_uint) - VTABLE_ADD_FUNC(num_get_char_do_get_ushort) - VTABLE_ADD_FUNC(num_get_char_do_get_bool)); - __ASM_VTABLE(num_get_short, - VTABLE_ADD_FUNC(num_get_wchar_vector_dtor) - VTABLE_ADD_FUNC(num_get_short_do_get_void) - VTABLE_ADD_FUNC(num_get_short_do_get_double) - VTABLE_ADD_FUNC(num_get_short_do_get_double) - VTABLE_ADD_FUNC(num_get_short_do_get_float) - VTABLE_ADD_FUNC(num_get_short_do_get_uint64) - VTABLE_ADD_FUNC(num_get_short_do_get_int64) - VTABLE_ADD_FUNC(num_get_short_do_get_ulong) - VTABLE_ADD_FUNC(num_get_short_do_get_long) - VTABLE_ADD_FUNC(num_get_short_do_get_uint) - VTABLE_ADD_FUNC(num_get_short_do_get_ushort) - VTABLE_ADD_FUNC(num_get_short_do_get_bool)); - __ASM_VTABLE(num_get_wchar, - VTABLE_ADD_FUNC(num_get_wchar_vector_dtor) - VTABLE_ADD_FUNC(num_get_wchar_do_get_void) - VTABLE_ADD_FUNC(num_get_wchar_do_get_double) - VTABLE_ADD_FUNC(num_get_wchar_do_get_double) - VTABLE_ADD_FUNC(num_get_wchar_do_get_float) - VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64) - VTABLE_ADD_FUNC(num_get_wchar_do_get_int64) - VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong) - VTABLE_ADD_FUNC(num_get_wchar_do_get_long) - VTABLE_ADD_FUNC(num_get_wchar_do_get_uint) - VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort) - VTABLE_ADD_FUNC(num_get_wchar_do_get_bool)); - __ASM_VTABLE(num_put_char, - VTABLE_ADD_FUNC(num_put_char_vector_dtor) - VTABLE_ADD_FUNC(num_put_char_do_put_ptr) - VTABLE_ADD_FUNC(num_put_char_do_put_double) - VTABLE_ADD_FUNC(num_put_char_do_put_double) - VTABLE_ADD_FUNC(num_put_char_do_put_uint64) - VTABLE_ADD_FUNC(num_put_char_do_put_int64) - VTABLE_ADD_FUNC(num_put_char_do_put_ulong) - VTABLE_ADD_FUNC(num_put_char_do_put_long) - VTABLE_ADD_FUNC(num_put_char_do_put_bool)); - __ASM_VTABLE(num_put_wchar, - VTABLE_ADD_FUNC(num_put_wchar_vector_dtor) - VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr) - VTABLE_ADD_FUNC(num_put_wchar_do_put_double) - VTABLE_ADD_FUNC(num_put_wchar_do_put_double) - VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64) - VTABLE_ADD_FUNC(num_put_wchar_do_put_int64) - VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong) - VTABLE_ADD_FUNC(num_put_wchar_do_put_long) - VTABLE_ADD_FUNC(num_put_wchar_do_put_bool)); - __ASM_VTABLE(num_put_short, - VTABLE_ADD_FUNC(num_put_wchar_vector_dtor) - VTABLE_ADD_FUNC(num_put_short_do_put_ptr) - VTABLE_ADD_FUNC(num_put_short_do_put_double) - VTABLE_ADD_FUNC(num_put_short_do_put_double) - VTABLE_ADD_FUNC(num_put_short_do_put_uint64) - VTABLE_ADD_FUNC(num_put_short_do_put_int64) - VTABLE_ADD_FUNC(num_put_short_do_put_ulong) - VTABLE_ADD_FUNC(num_put_short_do_put_long) - VTABLE_ADD_FUNC(num_put_short_do_put_bool)); - __ASM_VTABLE(time_put_char, - VTABLE_ADD_FUNC(time_put_char_vector_dtor) - VTABLE_ADD_FUNC(time_put_char_do_put)); - __ASM_VTABLE(time_put_wchar, - VTABLE_ADD_FUNC(time_put_wchar_vector_dtor) - VTABLE_ADD_FUNC(time_put_wchar_do_put)); - __ASM_VTABLE(time_put_short, - VTABLE_ADD_FUNC(time_put_wchar_vector_dtor) - VTABLE_ADD_FUNC(time_put_wchar_do_put)); -#ifndef __GNUC__ -} -#endif - -void init_locale(void *base) -{ -#ifdef __x86_64__ - init_locale_facet_rtti(base); - init_collate_char_rtti(base); - init_collate_wchar_rtti(base); - init_collate_short_rtti(base); - init_ctype_base_rtti(base); - init_ctype_char_rtti(base); - init_ctype_wchar_rtti(base); - init_ctype_short_rtti(base); - init_codecvt_base_rtti(base); - init_codecvt_char_rtti(base); - init_codecvt_wchar_rtti(base); - init_codecvt_short_rtti(base); - init_numpunct_char_rtti(base); - init_numpunct_wchar_rtti(base); - init_numpunct_short_rtti(base); - init_num_get_char_rtti(base); - init_num_get_wchar_rtti(base); - init_num_get_short_rtti(base); - init_num_put_char_rtti(base); - init_num_put_wchar_rtti(base); - init_num_put_short_rtti(base); - init_time_put_char_rtti(base); - init_time_put_wchar_rtti(base); - init_time_put_short_rtti(base); -#endif -} - -void free_locale(void) -{ - facets_elem *iter, *safe; - - if(global_locale) { - locale__Locimp_dtor(global_locale); - locale_dtor(&classic_locale); - } - - LIST_FOR_EACH_ENTRY_SAFE(iter, safe, &lazy_facets, facets_elem, entry) { - list_remove(&iter->entry); - if(locale_facet__Decref(iter->fac)) - call_locale_facet_vector_dtor(iter->fac, 1); - MSVCRT_operator_delete(iter); - } -} diff --git a/dlls/msvcp80/math.c b/dlls/msvcp80/math.c deleted file mode 100644 index 7d56c70eea0..00000000000 --- a/dlls/msvcp80/math.c +++ /dev/null @@ -1,2169 +0,0 @@ -/* - * Copyright 2011 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include -#include -#include -#define _USE_MATH_DEFINES -#include - -#include "msvcp.h" -#include "windef.h" -#include "winbase.h" - -typedef double LDOUBLE; /* long double is just a double */ - -typedef struct { } std_Num_base; -typedef struct { } std_Ctraits; - -enum std_float_denorm_style -{ - denorm_indeterminate = -1, - denorm_absent = 0, - denorm_present = 1 -}; - -enum std_float_round_style -{ - round_indeterminate = -1, - round_toward_zero = 0, - round_to_nearest = 1, - round_toward_infinity = 2, - round_toward_neg_infinity = 3 -}; - -/* these are defined as integers but the bit patterns are then interpreted as floats/doubles */ -const DWORD _FDenorm = 1; -const ULONGLONG _Denorm = 1; -const ULONGLONG _LDenorm = 1; -const DWORD _FInf = 0x7f800000; -const ULONGLONG _Inf = (ULONGLONG)0x7ff00000 << 32; -const ULONGLONG _LInf = (ULONGLONG)0x7ff00000 << 32; -const DWORD _FNan = 0x7fc00000; -const ULONGLONG _Nan = (ULONGLONG)0x7ff80000 << 32; -const ULONGLONG _LNan = (ULONGLONG)0x7ff80000 << 32; -const DWORD _FSnan = 0x7f800001; -const ULONGLONG _Snan = ((ULONGLONG)0x7ff00000 << 32) + 1; -const ULONGLONG _LSnan = ((ULONGLONG)0x7ff00000 << 32) + 1; -const ULONGLONG _LZero = 0; -const ULONGLONG _Hugeval = (ULONGLONG)0x7ff00000 << 32; - -const float _FEps = FLT_EPSILON; -const double _Eps = DBL_EPSILON; -const LDOUBLE _LEps = LDBL_EPSILON; - -/* ?digits10@?$numeric_limits@C@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_signed_char_digits10 = 2; - -/* ?digits10@?$numeric_limits@D@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_char_digits10 = 2; - -/* ?digits10@?$numeric_limits@E@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_unsigned_char_digits10 = 2; - -/* ?digits10@?$numeric_limits@F@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_short_digits10 = 4; - -/* ?digits10@?$numeric_limits@G@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_unsigned_short_digits10 = 4; - -/* ?digits10@?$numeric_limits@H@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_int_digits10 = 9; - -/* ?digits10@?$numeric_limits@I@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_unsigned_int_digits10 = 9; - -/* ?digits10@?$numeric_limits@J@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_long_digits10 = 9; - -/* ?digits10@?$numeric_limits@K@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_unsigned_long_digits10 = 9; - -/* ?digits10@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_float_digits10 = FLT_DIG; - -/* ?digits10@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_double_digits10 = DBL_DIG; - -/* ?digits10@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_long_double_digits10 = LDBL_DIG; - -/* ?digits10@?$numeric_limits@_J@std@@2HB -> public: static int const std::numeric_limits<__int64>::digits10 */ -const int std_numeric_limits_int64_digits10 = 18; - -/* ?digits10@?$numeric_limits@_K@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_unsigned_int64_digits10 = 18; - -/* ?digits10@?$numeric_limits@_N@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_bool_digits10 = 0; - -/* ?digits10@?$numeric_limits@_W@std@@2HB -> public: static int const std::numeric_limits::digits10 */ -const int std_numeric_limits_wchar_t_digits10 = 4; - -/* ?digits10@_Num_base@std@@2HB -> public: static int const std::_Num_base::digits10 */ -const int std_Num_base_digits10 = 0; - -/* ?digits@?$numeric_limits@C@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_signed_char_digits = 7; - -/* ?digits@?$numeric_limits@D@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_char_digits = (CHAR_MIN < 0) ? 7 : 8; - -/* ?digits@?$numeric_limits@E@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_unsigned_char_digits = 8; - -/* ?digits@?$numeric_limits@F@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_short_digits = 15; - -/* ?digits@?$numeric_limits@G@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_unsigned_short_digits = 16; - -/* ?digits@?$numeric_limits@H@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_int_digits = 31; - -/* ?digits@?$numeric_limits@I@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_unsigned_int_digits = 32; - -/* ?digits@?$numeric_limits@J@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_long_digits = 31; - -/* ?digits@?$numeric_limits@K@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_unsigned_long_digits = 32; - -/* ?digits@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_float_digits = FLT_MANT_DIG; - -/* ?digits@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_double_digits = DBL_MANT_DIG; - -/* ?digits@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_long_double_digits = LDBL_MANT_DIG; - -/* ?digits@?$numeric_limits@_J@std@@2HB -> public: static int const std::numeric_limits<__int64>::digits */ -const int std_numeric_limits_int64_digits = 63; - -/* ?digits@?$numeric_limits@_K@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_unsigned_int64_digits = 64; - -/* ?digits@?$numeric_limits@_N@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_bool_digits = 1; - -/* ?digits@?$numeric_limits@_W@std@@2HB -> public: static int const std::numeric_limits::digits */ -const int std_numeric_limits_wchar_t_digits = 16; - -/* ?digits@_Num_base@std@@2HB -> public: static int const std::_Num_base::digits */ -const int std_Num_base_digits = 0; - -/* ?has_denorm@_Num_base@std@@2W4float_denorm_style@2@B -> public: static enum std::float_denorm_style const std::_Num_base::has_denorm */ -const enum std_float_denorm_style std_Num_base_has_denorm = denorm_absent; - -/* ?has_denorm@_Num_float_base@std@@2W4float_denorm_style@2@B -> public: static enum std::float_denorm_style const std::_Num_float_base::has_denorm */ -const enum std_float_denorm_style std_Num_float_base_has_denorm = denorm_present; - -/* ?has_denorm_loss@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::has_denorm_loss */ -const BOOLEAN std_Num_base_has_denorm_loss = FALSE; - -/* ?has_denorm_loss@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::has_denorm_loss */ -const BOOLEAN std_Num_float_base_has_denorm_loss = TRUE; - -/* ?has_infinity@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::has_infinity */ -const BOOLEAN std_Num_base_has_infinity = FALSE; - -/* ?has_infinity@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::has_infinity */ -const BOOLEAN std_Num_float_base_has_infinity = TRUE; - -/* ?has_quiet_NaN@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::has_quiet_NaN */ -const BOOLEAN std_Num_base_has_quiet_NaN = FALSE; - -/* ?has_quiet_NaN@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::has_quiet_NaN */ -const BOOLEAN std_Num_float_base_has_quiet_NaN = TRUE; - -/* ?has_signaling_NaN@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::has_signaling_NaN */ -const BOOLEAN std_Num_base_has_signaling_NaN = FALSE; - -/* ?has_signaling_NaN@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::has_signaling_NaN */ -const BOOLEAN std_Num_float_base_has_signaling_NaN = TRUE; - -/* ?is_bounded@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::is_bounded */ -const BOOLEAN std_Num_base_is_bounded = FALSE; - -/* ?is_bounded@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::is_bounded */ -const BOOLEAN std_Num_float_base_is_bounded = TRUE; - -/* ?is_bounded@_Num_int_base@std@@2_NB -> public: static bool const std::_Num_int_base::is_bounded */ -const BOOLEAN std_Num_int_base_is_bounded = TRUE; - -/* ?is_exact@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::is_exact */ -const BOOLEAN std_Num_base_is_exact = FALSE; - -/* ?is_exact@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::is_exact */ -const BOOLEAN std_Num_float_base_is_exact = FALSE; - -/* ?is_exact@_Num_int_base@std@@2_NB -> public: static bool const std::_Num_int_base::is_exact */ -const BOOLEAN std_Num_int_base_is_exact = TRUE; - -/* ?is_iec559@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::is_iec559 */ -const BOOLEAN std_Num_base_is_iec559 = FALSE; - -/* ?is_iec559@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::is_iec559 */ -const BOOLEAN std_Num_float_base_is_iec559 = TRUE; - -/* ?is_integer@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::is_integer */ -const BOOLEAN std_Num_base_is_integer = FALSE; - -/* ?is_integer@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::is_integer */ -const BOOLEAN std_Num_float_base_is_integer = FALSE; - -/* ?is_integer@_Num_int_base@std@@2_NB -> public: static bool const std::_Num_int_base::is_integer */ -const BOOLEAN std_Num_int_base_is_integer = TRUE; - -/* ?is_modulo@?$numeric_limits@_N@std@@2_NB -> public: static bool const std::numeric_limits::is_modulo */ -const BOOLEAN std_numeric_limits_bool_is_modulo = FALSE; - -/* ?is_modulo@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::is_modulo */ -const BOOLEAN std_Num_base_is_modulo = FALSE; - -/* ?is_modulo@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::is_modulo */ -const BOOLEAN std_Num_float_base_is_modulo = FALSE; - -/* ?is_modulo@_Num_int_base@std@@2_NB -> public: static bool const std::_Num_int_base::is_modulo */ -const BOOLEAN std_Num_int_base_is_modulo = TRUE; - -/* ?is_signed@?$numeric_limits@C@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_signed_char_is_signed = TRUE; - -/* ?is_signed@?$numeric_limits@D@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_char_is_signed = (CHAR_MIN < 0); - -/* ?is_signed@?$numeric_limits@E@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_unsigned_char_is_signed = FALSE; - -/* ?is_signed@?$numeric_limits@F@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_short_is_signed = TRUE; - -/* ?is_signed@?$numeric_limits@G@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_unsigned_short_is_signed = FALSE; - -/* ?is_signed@?$numeric_limits@H@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_int_is_signed = TRUE; - -/* ?is_signed@?$numeric_limits@I@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_unsigned_int_is_signed = FALSE; - -/* ?is_signed@?$numeric_limits@J@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_long_is_signed = TRUE; - -/* ?is_signed@?$numeric_limits@K@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_unsigned_long_is_signed = FALSE; - -/* ?is_signed@?$numeric_limits@_J@std@@2_NB -> public: static bool const std::numeric_limits<__int64>::is_signed */ -const BOOLEAN std_numeric_limits_int64_is_signed = TRUE; - -/* ?is_signed@?$numeric_limits@_K@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_unsigned_int64_is_signed = FALSE; - -/* ?is_signed@?$numeric_limits@_N@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_bool_is_signed = FALSE; - -/* ?is_signed@?$numeric_limits@_W@std@@2_NB -> public: static bool const std::numeric_limits::is_signed */ -const BOOLEAN std_numeric_limits_wchar_t_is_signed = FALSE; - -/* ?is_signed@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::is_signed */ -const BOOLEAN std_Num_base_is_signed = FALSE; - -/* ?is_signed@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::is_signed */ -const BOOLEAN std_Num_float_base_is_signed = TRUE; - -/* ?is_specialized@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::is_specialized */ -const BOOLEAN std_Num_base_is_specialized = FALSE; - -/* ?is_specialized@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::is_specialized */ -const BOOLEAN std_Num_float_base_is_specialized = TRUE; - -/* ?is_specialized@_Num_int_base@std@@2_NB -> public: static bool const std::_Num_int_base::is_specialized */ -const BOOLEAN std_Num_int_base_is_specialized = TRUE; - -/* ?max_exponent10@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits::max_exponent10 */ -const int std_numeric_limits_float_max_exponent10 = FLT_MAX_10_EXP; - -/* ?max_exponent10@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits::max_exponent10 */ -const int std_numeric_limits_double_max_exponent10 = DBL_MAX_10_EXP; - -/* ?max_exponent10@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits::max_exponent10 */ -const int std_numeric_limits_long_double_max_exponent10 = LDBL_MAX_10_EXP; - -/* ?max_exponent10@_Num_base@std@@2HB -> public: static int const std::_Num_base::max_exponent10 */ -const int std_Num_base_max_exponent10 = 0; - -/* ?max_exponent@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits::max_exponent */ -const int std_numeric_limits_float_max_exponent = FLT_MAX_EXP; - -/* ?max_exponent@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits::max_exponent */ -const int std_numeric_limits_double_max_exponent = DBL_MAX_EXP; - -/* ?max_exponent@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits::max_exponent */ -const int std_numeric_limits_long_double_max_exponent = LDBL_MAX_EXP; - -/* ?max_exponent@_Num_base@std@@2HB -> public: static int const std::_Num_base::max_exponent */ -const int std_Num_base_max_exponent = 0; - -/* ?min_exponent10@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits::min_exponent10 */ -const int std_numeric_limits_float_min_exponent10 = FLT_MIN_10_EXP; - -/* ?min_exponent10@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits::min_exponent10 */ -const int std_numeric_limits_double_min_exponent10 = DBL_MIN_10_EXP; - -/* ?min_exponent10@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits::min_exponent10 */ -const int std_numeric_limits_long_double_min_exponent10 = LDBL_MIN_10_EXP; - -/* ?min_exponent10@_Num_base@std@@2HB -> public: static int const std::_Num_base::min_exponent10 */ -const int std_Num_base_min_exponent10 = 0; - -/* ?min_exponent@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits::min_exponent */ -const int std_numeric_limits_float_min_exponent = FLT_MIN_EXP; - -/* ?min_exponent@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits::min_exponent */ -const int std_numeric_limits_double_min_exponent = DBL_MIN_EXP; - -/* ?min_exponent@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits::min_exponent */ -const int std_numeric_limits_long_double_min_exponent = LDBL_MIN_EXP; - -/* ?min_exponent@_Num_base@std@@2HB -> public: static int const std::_Num_base::min_exponent */ -const int std_Num_base_min_exponent = 0; - -/* ?radix@_Num_base@std@@2HB -> public: static int const std::_Num_base::radix */ -const int std_Num_base_radix = 0; - -/* ?radix@_Num_float_base@std@@2HB -> public: static int const std::_Num_float_base::radix */ -const int std_Num_float_base_radix = FLT_RADIX; - -/* ?radix@_Num_int_base@std@@2HB -> public: static int const std::_Num_int_base::radix */ -const int std_Num_int_base_radix = 2; - -/* ?round_style@_Num_base@std@@2W4float_round_style@2@B -> public: static enum std::float_round_style const std::_Num_base::round_style */ -const enum std_float_round_style std_Num_base_round_style = round_toward_zero; - -/* ?round_style@_Num_float_base@std@@2W4float_round_style@2@B -> public: static enum std::float_round_style const std::_Num_float_base::round_style */ -const enum std_float_round_style std_Num_float_base_round_style = round_to_nearest; - -/* ?tinyness_before@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::tinyness_before */ -const BOOLEAN std_Num_base_tinyness_before = FALSE; - -/* ?tinyness_before@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::tinyness_before */ -const BOOLEAN std_Num_float_base_tinyness_before = TRUE; - -/* ?traps@_Num_base@std@@2_NB -> public: static bool const std::_Num_base::traps */ -const BOOLEAN std_Num_base_traps = FALSE; - -/* ?traps@_Num_float_base@std@@2_NB -> public: static bool const std::_Num_float_base::traps */ -const BOOLEAN std_Num_float_base_traps = TRUE; - -/* ??4?$numeric_limits@C@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@C@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@D@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@D@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@E@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@E@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@F@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@F@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@G@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@G@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@H@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@H@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@I@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@I@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@J@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@J@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@K@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@K@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@M@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@M@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@N@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@N@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@O@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@O@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@_J@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<__int64> & __thiscall std::numeric_limits<__int64>::operator=(class std::numeric_limits<__int64> const &) */ -/* ??4?$numeric_limits@_J@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<__int64> & __ptr64 __cdecl std::numeric_limits<__int64>::operator=(class std::numeric_limits<__int64> const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@_K@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@_K@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@_N@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@_N@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4?$numeric_limits@_W@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits & __thiscall std::numeric_limits::operator=(class std::numeric_limits const &) */ -/* ??4?$numeric_limits@_W@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits & __ptr64 __cdecl std::numeric_limits::operator=(class std::numeric_limits const & __ptr64) __ptr64 */ -/* ??4_Num_base@std@@QAEAAU01@ABU01@@Z -> public: struct std::_Num_base & __thiscall std::_Num_base::operator=(struct std::_Num_base const &) */ -/* ??4_Num_base@std@@QEAAAEAU01@AEBU01@@Z -> public: struct std::_Num_base & __ptr64 __cdecl std::_Num_base::operator=(struct std::_Num_base const & __ptr64) __ptr64 */ -/* ??4_Num_float_base@std@@QAEAAU01@ABU01@@Z -> public: struct std::_Num_float_base & __thiscall std::_Num_float_base::operator=(struct std::_Num_float_base const &) */ -/* ??4_Num_float_base@std@@QEAAAEAU01@AEBU01@@Z -> public: struct std::_Num_float_base & __ptr64 __cdecl std::_Num_float_base::operator=(struct std::_Num_float_base const & __ptr64) __ptr64 */ -/* ??4_Num_int_base@std@@QAEAAU01@ABU01@@Z -> public: struct std::_Num_int_base & __thiscall std::_Num_int_base::operator=(struct std::_Num_int_base const &) */ -/* ??4_Num_int_base@std@@QEAAAEAU01@AEBU01@@Z -> public: struct std::_Num_int_base & __ptr64 __cdecl std::_Num_int_base::operator=(struct std::_Num_int_base const & __ptr64) __ptr64 */ -DEFINE_THISCALL_WRAPPER( std_Num_base_op_assign, 8 ) -std_Num_base * __thiscall std_Num_base_op_assign( std_Num_base *this, std_Num_base *right ) -{ - return this; -} - -/* ?denorm_min@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::denorm_min(void) */ -signed char __cdecl std_numeric_limits_signed_char_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::denorm_min(void) */ -char __cdecl std_numeric_limits_char_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::denorm_min(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::denorm_min(void) */ -short __cdecl std_numeric_limits_short_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::denorm_min(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::denorm_min(void) */ -int __cdecl std_numeric_limits_int_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::denorm_min(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::denorm_min(void) */ -LONG __cdecl std_numeric_limits_long_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::denorm_min(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::denorm_min(void) */ -float __cdecl std_numeric_limits_float_denorm_min(void) { return *(float *)&_FDenorm; } - -/* ?denorm_min@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::denorm_min(void) */ -double __cdecl std_numeric_limits_double_denorm_min(void) { return *(double *)&_Denorm; } - -/* ?denorm_min@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::denorm_min(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_denorm_min(void) { return *(LDOUBLE *)&_LDenorm; } - -/* ?denorm_min@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::denorm_min(void) */ -__int64 __cdecl std_numeric_limits_int64_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::denorm_min(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::denorm_min(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_denorm_min(void) { return 0; } - -/* ?denorm_min@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::denorm_min(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_denorm_min(void) { return 0; } - -/* ?epsilon@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::epsilon(void) */ -signed char __cdecl std_numeric_limits_signed_char_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::epsilon(void) */ -char __cdecl std_numeric_limits_char_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::epsilon(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::epsilon(void) */ -short __cdecl std_numeric_limits_short_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::epsilon(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::epsilon(void) */ -int __cdecl std_numeric_limits_int_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::epsilon(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::epsilon(void) */ -LONG __cdecl std_numeric_limits_long_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::epsilon(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::epsilon(void) */ -float __cdecl std_numeric_limits_float_epsilon(void) { return _FEps; } - -/* ?epsilon@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::epsilon(void) */ -double __cdecl std_numeric_limits_double_epsilon(void) { return _Eps; } - -/* ?epsilon@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::epsilon(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_epsilon(void) { return _LEps; } - -/* ?epsilon@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::epsilon(void) */ -__int64 __cdecl std_numeric_limits_int64_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::epsilon(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::epsilon(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_epsilon(void) { return 0; } - -/* ?epsilon@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::epsilon(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_epsilon(void) { return 0; } - -/* ?infinity@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::infinity(void) */ -signed char __cdecl std_numeric_limits_signed_char_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::infinity(void) */ -char __cdecl std_numeric_limits_char_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::infinity(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::infinity(void) */ -short __cdecl std_numeric_limits_short_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::infinity(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::infinity(void) */ -int __cdecl std_numeric_limits_int_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::infinity(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::infinity(void) */ -LONG __cdecl std_numeric_limits_long_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::infinity(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::infinity(void) */ -float __cdecl std_numeric_limits_float_infinity(void) { return *(float *)&_FInf; } - -/* ?infinity@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::infinity(void) */ -double __cdecl std_numeric_limits_double_infinity(void) { return *(double *)&_Inf; } - -/* ?infinity@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::infinity(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_infinity(void) { return *(LDOUBLE *)&_LInf; } - -/* ?infinity@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::infinity(void) */ -__int64 __cdecl std_numeric_limits_int64_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::infinity(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::infinity(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_infinity(void) { return 0; } - -/* ?infinity@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::infinity(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_infinity(void) { return 0; } - -/* ?max@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::max(void) */ -signed char __cdecl std_numeric_limits_signed_char_max(void) { return SCHAR_MAX; } - -/* ?max@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::max(void) */ -char __cdecl std_numeric_limits_char_max(void) { return CHAR_MAX; } - -/* ?max@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::max(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_max(void) { return UCHAR_MAX; } - -/* ?max@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::max(void) */ -short __cdecl std_numeric_limits_short_max(void) { return SHRT_MAX; } - -/* ?max@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::max(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_max(void) { return USHRT_MAX; } - -/* ?max@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::max(void) */ -int __cdecl std_numeric_limits_int_max(void) { return INT_MAX; } - -/* ?max@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::max(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_max(void) { return UINT_MAX; } - -/* ?max@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::max(void) */ -LONG __cdecl std_numeric_limits_long_max(void) { return LONG_MAX; } - -/* ?max@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::max(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_max(void) { return ULONG_MAX; } - -/* ?max@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::max(void) */ -float __cdecl std_numeric_limits_float_max(void) { return FLT_MAX; } - -/* ?max@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::max(void) */ -double __cdecl std_numeric_limits_double_max(void) { return DBL_MAX; } - -/* ?max@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::max(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_max(void) { return LDBL_MAX; } - -/* ?max@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::max(void) */ -__int64 __cdecl std_numeric_limits_int64_max(void) { return I64_MAX; } - -/* ?max@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::max(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_max(void) { return UI64_MAX; } - -/* ?max@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::max(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_max(void) { return 1; } - -/* ?max@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::max(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_max(void) { return USHRT_MAX; } - -/* ?min@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::min(void) */ -signed char __cdecl std_numeric_limits_signed_char_min(void) { return SCHAR_MIN; } - -/* ?min@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::min(void) */ -char __cdecl std_numeric_limits_char_min(void) { return CHAR_MIN; } - -/* ?min@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::min(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_min(void) { return 0; } - -/* ?min@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::min(void) */ -short __cdecl std_numeric_limits_short_min(void) { return SHRT_MIN; } - -/* ?min@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::min(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_min(void) { return 0; } - -/* ?min@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::min(void) */ -int __cdecl std_numeric_limits_int_min(void) { return INT_MIN; } - -/* ?min@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::min(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_min(void) { return 0; } - -/* ?min@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::min(void) */ -LONG __cdecl std_numeric_limits_long_min(void) { return LONG_MIN; } - -/* ?min@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::min(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_min(void) { return 0; } - -/* ?min@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::min(void) */ -float __cdecl std_numeric_limits_float_min(void) { return FLT_MIN; } - -/* ?min@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::min(void) */ -double __cdecl std_numeric_limits_double_min(void) { return DBL_MIN; } - -/* ?min@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::min(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_min(void) { return LDBL_MIN; } - -/* ?min@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::min(void) */ -__int64 __cdecl std_numeric_limits_int64_min(void) { return I64_MIN; } - -/* ?min@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::min(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_min(void) { return 0; } - -/* ?min@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::min(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_min(void) { return 0; } - -/* ?min@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::min(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_min(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::quiet_NaN(void) */ -signed char __cdecl std_numeric_limits_signed_char_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::quiet_NaN(void) */ -char __cdecl std_numeric_limits_char_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::quiet_NaN(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::quiet_NaN(void) */ -short __cdecl std_numeric_limits_short_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::quiet_NaN(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::quiet_NaN(void) */ -int __cdecl std_numeric_limits_int_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::quiet_NaN(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::quiet_NaN(void) */ -LONG __cdecl std_numeric_limits_long_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::quiet_NaN(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::quiet_NaN(void) */ -float __cdecl std_numeric_limits_float_quiet_NaN(void) { return *(float *)&_FNan; } - -/* ?quiet_NaN@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::quiet_NaN(void) */ -double __cdecl std_numeric_limits_double_quiet_NaN(void) { return *(double *)&_Nan; } - -/* ?quiet_NaN@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::quiet_NaN(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_quiet_NaN(void) { return *(LDOUBLE *)&_LNan; } - -/* ?quiet_NaN@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::quiet_NaN(void) */ -__int64 __cdecl std_numeric_limits_int64_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::quiet_NaN(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::quiet_NaN(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_quiet_NaN(void) { return 0; } - -/* ?quiet_NaN@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::quiet_NaN(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_quiet_NaN(void) { return 0; } - -/* ?round_error@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::round_error(void) */ -signed char __cdecl std_numeric_limits_signed_char_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::round_error(void) */ -char __cdecl std_numeric_limits_char_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::round_error(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::round_error(void) */ -short __cdecl std_numeric_limits_short_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::round_error(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::round_error(void) */ -int __cdecl std_numeric_limits_int_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::round_error(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::round_error(void) */ -LONG __cdecl std_numeric_limits_long_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::round_error(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::round_error(void) */ -float __cdecl std_numeric_limits_float_round_error(void) { return 0.5; } - -/* ?round_error@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::round_error(void) */ -double __cdecl std_numeric_limits_double_round_error(void) { return 0.5; } - -/* ?round_error@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::round_error(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_round_error(void) { return 0.5; } - -/* ?round_error@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::round_error(void) */ -__int64 __cdecl std_numeric_limits_int64_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::round_error(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::round_error(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_round_error(void) { return 0; } - -/* ?round_error@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::round_error(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_round_error(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@C@std@@SACXZ -> public: static signed char __cdecl std::numeric_limits::signaling_NaN(void) */ -signed char __cdecl std_numeric_limits_signed_char_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@D@std@@SADXZ -> public: static char __cdecl std::numeric_limits::signaling_NaN(void) */ -char __cdecl std_numeric_limits_char_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@E@std@@SAEXZ -> public: static unsigned char __cdecl std::numeric_limits::signaling_NaN(void) */ -unsigned char __cdecl std_numeric_limits_unsigned_char_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@F@std@@SAFXZ -> public: static short __cdecl std::numeric_limits::signaling_NaN(void) */ -short __cdecl std_numeric_limits_short_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@G@std@@SAGXZ -> public: static unsigned short __cdecl std::numeric_limits::signaling_NaN(void) */ -unsigned short __cdecl std_numeric_limits_unsigned_short_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@H@std@@SAHXZ -> public: static int __cdecl std::numeric_limits::signaling_NaN(void) */ -int __cdecl std_numeric_limits_int_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@I@std@@SAIXZ -> public: static unsigned int __cdecl std::numeric_limits::signaling_NaN(void) */ -unsigned int __cdecl std_numeric_limits_unsigned_int_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@J@std@@SAJXZ -> public: static long __cdecl std::numeric_limits::signaling_NaN(void) */ -LONG __cdecl std_numeric_limits_long_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@K@std@@SAKXZ -> public: static unsigned long __cdecl std::numeric_limits::signaling_NaN(void) */ -ULONG __cdecl std_numeric_limits_unsigned_long_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@M@std@@SAMXZ -> public: static float __cdecl std::numeric_limits::signaling_NaN(void) */ -float __cdecl std_numeric_limits_float_signaling_NaN(void) { return *(float *)&_FSnan; } - -/* ?signaling_NaN@?$numeric_limits@N@std@@SANXZ -> public: static double __cdecl std::numeric_limits::signaling_NaN(void) */ -double __cdecl std_numeric_limits_double_signaling_NaN(void) { return *(double *)&_Snan; } - -/* ?signaling_NaN@?$numeric_limits@O@std@@SAOXZ -> public: static long double __cdecl std::numeric_limits::signaling_NaN(void) */ -LDOUBLE __cdecl std_numeric_limits_long_double_signaling_NaN(void) { return *(LDOUBLE *)&_LSnan; } - -/* ?signaling_NaN@?$numeric_limits@_J@std@@SA_JXZ -> public: static __int64 __cdecl std::numeric_limits<__int64>::signaling_NaN(void) */ -__int64 __cdecl std_numeric_limits_int64_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@_K@std@@SA_KXZ -> public: static unsigned __int64 __cdecl std::numeric_limits::signaling_NaN(void) */ -unsigned __int64 __cdecl std_numeric_limits_unsigned_int64_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@_N@std@@SA_NXZ -> public: static bool __cdecl std::numeric_limits::signaling_NaN(void) */ -BOOLEAN __cdecl std_numeric_limits_bool_signaling_NaN(void) { return 0; } - -/* ?signaling_NaN@?$numeric_limits@_W@std@@SA_WXZ -> public: static wchar_t __cdecl std::numeric_limits::signaling_NaN(void) */ -WCHAR __cdecl std_numeric_limits_wchar_t_signaling_NaN(void) { return 0; } - -/* ??4?$_Ctraits@M@std@@QAEAAV01@ABV01@@Z -> public: class std::_Ctraits & __thiscall std::_Ctraits::operator=(class std::_Ctraits const &) */ -/* ??4?$_Ctraits@M@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::_Ctraits & __ptr64 __cdecl std::_Ctraits::operator=(class std::_Ctraits const & __ptr64) __ptr64 */ -/* ??4?$_Ctraits@N@std@@QAEAAV01@ABV01@@Z -> public: class std::_Ctraits & __thiscall std::_Ctraits::operator=(class std::_Ctraits const &) */ -/* ??4?$_Ctraits@N@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::_Ctraits & __ptr64 __cdecl std::_Ctraits::operator=(class std::_Ctraits const & __ptr64) __ptr64 */ -/* ??4?$_Ctraits@O@std@@QAEAAV01@ABV01@@Z -> public: class std::_Ctraits & __thiscall std::_Ctraits::operator=(class std::_Ctraits const &) */ -/* ??4?$_Ctraits@O@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::_Ctraits & __ptr64 __cdecl std::_Ctraits::operator=(class std::_Ctraits const & __ptr64) __ptr64 */ -DEFINE_THISCALL_WRAPPER( std_Ctraits_op_assign, 8 ) -std_Ctraits * __thiscall std_Ctraits_op_assign( std_Ctraits *this, std_Ctraits *right ) -{ - return this; -} - -/* ?atan2@?$_Ctraits@M@std@@SAMMM@Z -> public: static float __cdecl std::_Ctraits::atan2(float,float) */ -float __cdecl std_Ctraits_float_atan2( float y, float x ) { return atan2f( y, x ); } - -/* ?atan2@?$_Ctraits@N@std@@SANNN@Z -> public: static double __cdecl std::_Ctraits::atan2(double,double) */ -double __cdecl std_Ctraits_double_atan2( double y, double x ) { return atan2( y, x ); } - -/* ?atan2@?$_Ctraits@O@std@@SAOOO@Z -> public: static long double __cdecl std::_Ctraits::atan2(long double,long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_atan2( LDOUBLE y, LDOUBLE x ) { return atan2( y, x ); } - -/* ?cos@?$_Ctraits@M@std@@SAMM@Z -> public: static float __cdecl std::_Ctraits::cos(float) */ -float __cdecl std_Ctraits_float_cos( float x ) { return cosf( x ); } - -/* ?cos@?$_Ctraits@N@std@@SANN@Z -> public: static double __cdecl std::_Ctraits::cos(double) */ -double __cdecl std_Ctraits_double_cos( double x ) { return cos( x ); } - -/* ?cos@?$_Ctraits@O@std@@SAOO@Z -> public: static long double __cdecl std::_Ctraits::cos(long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_cos( LDOUBLE x ) { return cos( x ); } - -/* ?exp@?$_Ctraits@M@std@@SAMM@Z -> public: static float __cdecl std::_Ctraits::exp(float) */ -float __cdecl std_Ctraits_float_exp( float x ) { return expf( x ); } - -/* ?exp@?$_Ctraits@N@std@@SANN@Z -> public: static double __cdecl std::_Ctraits::exp(double) */ -double __cdecl std_Ctraits_double_exp( double x ) { return exp( x ); } - -/* ?exp@?$_Ctraits@O@std@@SAOO@Z -> public: static long double __cdecl std::_Ctraits::exp(long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_exp( LDOUBLE x ) { return exp( x ); } - -/* ?ldexp@?$_Ctraits@M@std@@SAMMH@Z -> public: static float __cdecl std::_Ctraits::ldexp(float,int) */ -float __cdecl std_Ctraits_float_ldexp( float x, int y ) { return ldexpf( x, y ); } - -/* ?ldexp@?$_Ctraits@N@std@@SANNH@Z -> public: static double __cdecl std::_Ctraits::ldexp(double,int) */ -double __cdecl std_Ctraits_double_ldexp( double x, int y ) { return ldexp( x, y ); } - -/* ?ldexp@?$_Ctraits@O@std@@SAOOH@Z -> public: static long double __cdecl std::_Ctraits::ldexp(long double,int) */ -LDOUBLE __cdecl std_Ctraits_long_double_ldexp( LDOUBLE x, int y ) { return ldexp( x, y ); } - -/* ?log@?$_Ctraits@M@std@@SAMM@Z -> public: static float __cdecl std::_Ctraits::log(float) */ -float __cdecl std_Ctraits_float_log( float x ) { return logf( x ); } - -/* ?log@?$_Ctraits@N@std@@SANN@Z -> public: static double __cdecl std::_Ctraits::log(double) */ -double __cdecl std_Ctraits_double_log( double x ) { return log( x ); } - -/* ?log@?$_Ctraits@O@std@@SAOO@Z -> public: static long double __cdecl std::_Ctraits::log(long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_log( LDOUBLE x ) { return log( x ); } - -/* ?pow@?$_Ctraits@M@std@@SAMMM@Z -> public: static float __cdecl std::_Ctraits::pow(float,float) */ -float __cdecl std_Ctraits_float_pow( float x, float y ) { return powf( x, y ); } - -/* ?pow@?$_Ctraits@N@std@@SANNN@Z -> public: static double __cdecl std::_Ctraits::pow(double,double) */ -double __cdecl std_Ctraits_double_pow( double x, double y ) { return pow( x, y ); } - -/* ?pow@?$_Ctraits@O@std@@SAOOO@Z -> public: static long double __cdecl std::_Ctraits::pow(long double,long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_pow( LDOUBLE x, LDOUBLE y ) { return pow( x, y ); } - -/* ?sin@?$_Ctraits@M@std@@SAMM@Z -> public: static float __cdecl std::_Ctraits::sin(float) */ -float __cdecl std_Ctraits_float_sin( float x ) { return sinf( x ); } - -/* ?sin@?$_Ctraits@N@std@@SANN@Z -> public: static double __cdecl std::_Ctraits::sin(double) */ -double __cdecl std_Ctraits_double_sin( double x ) { return sin( x ); } - -/* ?sin@?$_Ctraits@O@std@@SAOO@Z -> public: static long double __cdecl std::_Ctraits::sin(long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_sin( LDOUBLE x ) { return sin( x ); } - -/* ?sqrt@?$_Ctraits@M@std@@SAMM@Z -> public: static float __cdecl std::_Ctraits::sqrt(float) */ -float __cdecl std_Ctraits_float_sqrt( float x ) { return sqrtf( x ); } - -/* ?sqrt@?$_Ctraits@N@std@@SANN@Z -> public: static double __cdecl std::_Ctraits::sqrt(double) */ -double __cdecl std_Ctraits_double_sqrt( double x ) { return sqrt( x ); } - -/* ?sqrt@?$_Ctraits@O@std@@SAOO@Z -> public: static long double __cdecl std::_Ctraits::sqrt(long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_sqrt( LDOUBLE x ) { return sqrt( x ); } - -/* ?tan@?$_Ctraits@M@std@@SAMM@Z -> public: static float __cdecl std::_Ctraits::tan(float) */ -float __cdecl std_Ctraits_float_tan( float x ) { return tanf( x ); } - -/* ?tan@?$_Ctraits@N@std@@SANN@Z -> public: static double __cdecl std::_Ctraits::tan(double) */ -double __cdecl std_Ctraits_double_tan( double x ) { return tan( x ); } - -/* ?tan@?$_Ctraits@O@std@@SAOO@Z -> public: static long double __cdecl std::_Ctraits::tan(long double) */ -LDOUBLE __cdecl std_Ctraits_long_double_tan( LDOUBLE x ) { return tan( x ); } - -/* ??0?$_Complex_base@MU_C_float_complex@@@std@@QAE@ABM0@Z */ -/* ??0?$_Complex_base@MU_C_float_complex@@@std@@QEAA@AEBM0@Z */ -/* ??0?$complex@M@std@@QAE@ABM0@Z */ -/* ??0?$complex@M@std@@QEAA@AEBM0@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_ctor, 12) -complex_float* __thiscall complex_float_ctor(complex_float *this, const float *real, const float *imag) -{ - this->real = *real; - this->imag = *imag; - return this; -} - -/* ??0?$complex@M@std@@QAE@ABU_C_float_complex@@@Z */ -/* ??0?$complex@M@std@@QEAA@AEBU_C_float_complex@@@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_ctor_float, 8) -complex_float* __thiscall complex_float_ctor_float(complex_float *this, const complex_float *c) -{ - this->real = c->real; - this->imag = c->imag; - return this; -} - -/* ??0?$complex@M@std@@QAE@ABU_C_double_complex@@@Z */ -/* ??0?$complex@M@std@@QEAA@AEBU_C_double_complex@@@Z */ -/* ??0?$complex@M@std@@QAE@ABU_C_ldouble_complex@@@Z */ -/* ??0?$complex@M@std@@QEAA@AEBU_C_ldouble_complex@@@Z */ -/* ??0?$complex@M@std@@QAE@ABV?$complex@N@1@@Z */ -/* ??0?$complex@M@std@@QEAA@AEBV?$complex@N@1@@Z */ -/* ??0?$complex@M@std@@QAE@ABV?$complex@O@1@@Z */ -/* ??0?$complex@M@std@@QEAA@AEBV?$complex@O@1@@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_ctor_double, 8) -complex_float* __thiscall complex_float_ctor_double(complex_float *this, const complex_double *c) -{ - this->real = c->real; - this->imag = c->imag; - return this; -} - -/* ??_F?$complex@M@std@@QAEXXZ */ -/* ??_F?$complex@M@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(complex_float_ctor_def, 4) -complex_float* __thiscall complex_float_ctor_def(complex_float *this) -{ - this->real = this->imag = 0; - return this; -} - -/* ??$?8M@std@@YA_NABMABV?$complex@M@0@@Z */ -/* ??$?8M@std@@YA_NAEBMAEBV?$complex@M@0@@Z */ -MSVCP_bool __cdecl complex_float_equal_fc(const float *l, const complex_float *r) -{ - return *l==r->real && r->imag==0; -} - -/* ??$?8M@std@@YA_NABV?$complex@M@0@0@Z */ -/* ??$?8M@std@@YA_NAEBV?$complex@M@0@0@Z */ -MSVCP_bool __cdecl complex_float_equal(const complex_float *l, const complex_float *r) -{ - return l->real==r->real && l->imag==r->imag; -} - -/* ??$?8M@std@@YA_NABV?$complex@M@0@ABM@Z */ -/* ??$?8M@std@@YA_NAEBV?$complex@M@0@AEBM@Z */ -MSVCP_bool __cdecl complex_float_equal_cf(const complex_float *l, const float *r) -{ - return l->real==*r && l->imag==0; -} - -/* ??$?9M@std@@YA_NABMABV?$complex@M@0@@Z */ -/* ??$?9M@std@@YA_NAEBMAEBV?$complex@M@0@@Z */ -MSVCP_bool __cdecl complex_float_not_equal_fc(const float *l, const complex_float *r) -{ - return !complex_float_equal_fc(l, r); -} - -/* ??$?9M@std@@YA_NABV?$complex@M@0@0@Z */ -/* ??$?9M@std@@YA_NAEBV?$complex@M@0@0@Z */ -MSVCP_bool __cdecl complex_float_not_equal(const complex_float *l, const complex_float *r) -{ - return !complex_float_equal(l, r); -} - -/* ??$?9M@std@@YA_NABV?$complex@M@0@ABM@Z */ -/* ??$?9M@std@@YA_NAEBV?$complex@M@0@AEBM@Z */ -MSVCP_bool __cdecl complex_float_not_equal_cf(const complex_float *l, const float *r) -{ - return !complex_float_equal_cf(l, r); -} - -/* ??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z */ -/* ??$?DM@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z */ -complex_float* __cdecl complex_float_mult_fc(complex_float *ret, const float *l, const complex_float *r) -{ - ret->real = *l * r->real; - ret->imag = *l * r->imag; - return ret; -} - -/* ??$?DM@std@@YA?AV?$complex@M@0@ABV10@0@Z */ -/* ??$?DM@std@@YA?AV?$complex@M@0@AEBV10@0@Z */ -complex_float* __cdecl complex_float_mult(complex_float *ret, const complex_float *l, const complex_float *r) -{ - ret->real = l->real*r->real - l->imag*r->imag; - ret->imag = l->imag*r->real + l->real*r->imag; - return ret; -} - -/* ??$?DM@std@@YA?AV?$complex@M@0@ABV10@ABM@Z */ -/* ??$?DM@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z */ -complex_float* __cdecl complex_float_mult_cf(complex_float *ret, const complex_float *l, const float *r) -{ - ret->real = l->real * *r; - ret->imag = l->imag * *r; - return ret; -} - -/* ??$?GM@std@@YA?AV?$complex@M@0@ABMABV10@@Z */ -/* ??$?GM@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z */ -complex_float* __cdecl complex_float_sub_fc(complex_float *ret, const float *l, const complex_float *r) -{ - ret->real = *l - r->real; - ret->imag = -r->imag; - return ret; -} - -/* ??$?GM@std@@YA?AV?$complex@M@0@ABV10@0@Z */ -/* ??$?GM@std@@YA?AV?$complex@M@0@AEBV10@0@Z */ -complex_float* __cdecl complex_float_sub(complex_float *ret, const complex_float *l, const complex_float *r) -{ - ret->real = l->real - r->real; - ret->imag = l->imag - r->imag; - return ret; -} - -/* ??$?GM@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$?GM@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_neg(complex_float *ret, const complex_float *c) -{ - ret->real = -c->real; - ret->imag = -c->imag; - return ret; -} - -/* ??$?GM@std@@YA?AV?$complex@M@0@ABV10@ABM@Z */ -/* ??$?GM@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z */ -complex_float* __cdecl complex_float_sub_cf(complex_float *ret, const complex_float *l, const float *r) -{ - ret->real = l->real - *r; - ret->imag = l->imag; - return ret; -} - -/* ??$?HM@std@@YA?AV?$complex@M@0@ABMABV10@@Z */ -/* ??$?HM@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z */ -complex_float* __cdecl complex_float_add_fc(complex_float *ret, const float *l, const complex_float *r) -{ - ret->real = *l + r->real; - ret->imag = r->imag; - return ret; -} - -/* ??$?HM@std@@YA?AV?$complex@M@0@ABV10@0@Z */ -/* ??$?HM@std@@YA?AV?$complex@M@0@AEBV10@0@Z */ -complex_float* __cdecl complex_float_add(complex_float *ret, const complex_float *l, const complex_float *r) -{ - ret->real = l->real + r->real; - ret->imag = l->imag + r->imag; - return ret; -} - -/* ??$?HM@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$?HM@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_plus(complex_float *ret, const complex_float *c) -{ - *ret = *c; - return ret; -} - -/* ??$?HM@std@@YA?AV?$complex@M@0@ABV10@ABM@Z */ -/* ??$?HM@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z */ -complex_float* __cdecl complex_float_add_cf(complex_float *ret, const complex_float *l, const float *r) -{ - ret->real = l->real + *r; - ret->imag = l->imag; - return ret; -} - -/* ??$?KM@std@@YA?AV?$complex@M@0@ABV10@0@Z */ -/* ??$?KM@std@@YA?AV?$complex@M@0@AEBV10@0@Z */ -complex_float* __cdecl complex_float_div(complex_float *ret, const complex_float *l, const complex_float *r) -{ - float tmp, den; - if((!r->real && !r->imag) || _isnan(l->real) || _isnan(l->imag) - || _isnan(r->real) || _isnan(r->imag)) { - ret->real = std_numeric_limits_float_quiet_NaN(); - ret->imag = ret->real; - return ret; - } - - if (fabsf(r->real) >= fabsf(r->imag)) { - tmp = r->imag / r->real; - den = r->real + r->imag*tmp; - ret->real = (l->real + l->imag*tmp) / den; - ret->imag = (l->imag - l->real*tmp) / den; - } else { - tmp = r->real / r->imag; - den = r->real*tmp + r->imag; - ret->real = (l->real*tmp + l->imag) / den; - ret->imag = (l->imag*tmp - l->real) / den; - } - return ret; -} - -/* ??$?KM@std@@YA?AV?$complex@M@0@ABMABV10@@Z */ -/* ??$?KM@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z */ -complex_float* __cdecl complex_float_div_fc(complex_float *ret, const float *l, const complex_float *r) -{ - complex_float c = {*l, 0}; - return complex_float_div(ret, &c, r); -} - -/* ??$?KM@std@@YA?AV?$complex@M@0@ABV10@ABM@Z */ -/* ??$?KM@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z */ -complex_float* __cdecl complex_float_div_cf(complex_float *ret, const complex_float *l, const float *r) -{ - ret->real = l->real / *r; - ret->imag = l->imag / *r; - return ret; -} - -/* ??4?$_Complex_base@MU_C_float_complex@@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$_Complex_base@MU_C_float_complex@@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??4?$complex@M@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$complex@M@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_assign, 8) -complex_float* __thiscall complex_float_assign(complex_float *this, const complex_float *r) -{ - *this = *r; - return this; -} - -/* ??4?$complex@M@std@@QAEAAV01@ABM@Z */ -/* ??4?$complex@M@std@@QEAAAEAV01@AEBM@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_assign_float, 8) -complex_float* __thiscall complex_float_assign_float(complex_float *this, const float *r) -{ - this->real = *r; - this->imag = 0; - return this; -} - -/* ??X?$complex@M@std@@QAEAAV01@ABM@Z */ -/* ??X?$complex@M@std@@QEAAAEAV01@AEBM@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_mult_assign_float, 8) -complex_float* __thiscall complex_float_mult_assign_float(complex_float *this, const float *r) -{ - this->real *= *r; - this->imag *= *r; - return this; -} - -/* ??X?$complex@M@std@@QAEAAV01@ABV01@@Z */ -/* ??X?$complex@M@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_mult_assign, 8) -complex_float* __thiscall complex_float_mult_assign(complex_float *this, const complex_float *r) -{ - complex_float tmp = *this; - - this->real = tmp.real*r->real - tmp.imag*r->imag; - this->imag = tmp.real*r->imag + tmp.imag*r->real; - return this; -} - -/* ??Y?$complex@M@std@@QAEAAV01@ABM@Z */ -/* ??Y?$complex@M@std@@QEAAAEAV01@AEBM@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_add_assign_float, 8) -complex_float* __thiscall complex_float_add_assign_float(complex_float *this, const float *r) -{ - this->real += *r; - return this; -} - -/* ??Y?$complex@M@std@@QAEAAV01@ABV01@@Z */ -/* ??Y?$complex@M@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_add_assign, 8) -complex_float* __thiscall complex_float_add_assign(complex_float *this, const complex_float *r) -{ - this->real += r->real; - this->imag += r->imag; - return this; -} - -/* ??Z?$complex@M@std@@QAEAAV01@ABM@Z */ -/* ??Z?$complex@M@std@@QEAAAEAV01@AEBM@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_sub_assign_float, 8) -complex_float* __thiscall complex_float_sub_assign_float(complex_float *this, const float *r) -{ - this->real -= *r; - return this; -} - -/* ??Z?$complex@M@std@@QAEAAV01@ABV01@@Z */ -/* ??Z?$complex@M@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_sub_assign, 8) -complex_float* __thiscall complex_float_sub_assign(complex_float *this, const complex_float *r) -{ - this->real -= r->real; - this->imag -= r->imag; - return this; -} - -/* ??_0?$complex@M@std@@QAEAAV01@ABM@Z */ -/* ??_0?$complex@M@std@@QEAAAEAV01@AEBM@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_div_assign_float, 8) -complex_float* __thiscall complex_float_div_assign_float(complex_float *this, const float *r) -{ - this->real /= *r; - this->imag /= *r; - return this; -} - -/* ??_0?$complex@M@std@@QAEAAV01@ABV01@@Z */ -/* ??_0?$complex@M@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_div_assign, 8) -complex_float* __thiscall complex_float_div_assign(complex_float *this, const complex_float *r) -{ - complex_float tmp = *this; - return complex_float_div(this, &tmp, r); -} - -/* ??$arg@M@std@@YAMABV?$complex@M@0@@Z */ -/* ??$arg@M@std@@YAMAEBV?$complex@M@0@@Z */ -float __cdecl complex_float_arg(const complex_float *c) -{ - return atan2(c->imag, c->real); -} - -/* ??$imag@M@std@@YAMABV?$complex@M@0@@Z */ -/* ??$imag@M@std@@YAMAEBV?$complex@M@0@@Z */ -float __cdecl complex_float_imag(const complex_float *c) -{ - return c->imag; -} - -/* ?imag@?$_Complex_base@MU_C_float_complex@@@std@@QAEMABM@Z */ -/* ?imag@?$_Complex_base@MU_C_float_complex@@@std@@QEAAMAEBM@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_imag_set, 8) -float __thiscall complex_float_imag_set(complex_float *this, const float *f) -{ - return (this->imag = *f); -} - -/* ?imag@?$_Complex_base@MU_C_float_complex@@@std@@QBEMXZ */ -/* ?imag@?$_Complex_base@MU_C_float_complex@@@std@@QEBAMXZ */ -DEFINE_THISCALL_WRAPPER(complex_float_imag_get, 4) -float __thiscall complex_float_imag_get(const complex_float *this) -{ - return this->imag; -} - -/* ??$real@M@std@@YAMABV?$complex@M@0@@Z */ -/* ??$real@M@std@@YAMAEBV?$complex@M@0@@Z */ -float __cdecl complex_float_real(const complex_float *c) -{ - return c->real; -} - -/* ?real@?$_Complex_base@MU_C_float_complex@@@std@@QAEMABM@Z */ -/* ?real@?$_Complex_base@MU_C_float_complex@@@std@@QEAAMAEBM@Z */ -DEFINE_THISCALL_WRAPPER(complex_float_real_set, 8) -float __thiscall complex_float_real_set(complex_float *this, const float *f) -{ - return (this->real = *f); -} - -/* ?real@?$_Complex_base@MU_C_float_complex@@@std@@QBEMXZ */ -/* ?real@?$_Complex_base@MU_C_float_complex@@@std@@QEBAMXZ */ -DEFINE_THISCALL_WRAPPER(complex_float_real_get, 4) -float __thiscall complex_float_real_get(const complex_float *this) -{ - return this->real; -} - -/* ??$_Fabs@M@std@@YAMABV?$complex@M@0@PAH@Z */ -/* ??$_Fabs@M@std@@YAMAEBV?$complex@M@0@PEAH@Z */ -float __cdecl complex_float__Fabs(const complex_float *c, int *scale) -{ - float ret; - - ret = hypotf(c->real, c->imag); - if(_isnan(ret) || ret==0) { - *scale = 0; - }else if(ret >= 1) { - *scale = 2; - ret /= 4; - }else { - *scale = -2; - ret *= 4; - } - - return ret; -} - -/* ??$abs@M@std@@YAMABV?$complex@M@0@@Z */ -/* ??$abs@M@std@@YAMAEBV?$complex@M@0@@Z */ -float __cdecl complex_float_abs(const complex_float *c) -{ - return hypotf(c->real, c->imag); -} - -/* ??$conj@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$conj@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_conj(complex_float *ret, const complex_float *c) -{ - ret->real = c->real; - ret->imag = -c->imag; - return ret; -} - -/* ??$cos@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$cos@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_cos(complex_float *ret, const complex_float *c) -{ - ret->real = cos(c->real)*cosh(c->imag); - ret->imag = -sin(c->real)*sinh(c->imag); - return ret; -} - -/* ??$sin@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$sin@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_sin(complex_float *ret, const complex_float *c) -{ - ret->real = sin(c->real)*cosh(c->imag); - ret->imag = cos(c->real)*sinh(c->imag); - return ret; -} - -/* ??$tan@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$tan@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_tan(complex_float *ret, const complex_float *c) -{ - double denom = cos(2*c->real) + cosh(2*c->imag); - ret->real = sin(2*c->real) / denom; - ret->imag = sinh(2*c->imag) / denom; - return ret; -} - -/* ??$cosh@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$cosh@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_cosh(complex_float *ret, const complex_float *c) -{ - ret->real = cosh(c->real)*cos(c->imag); - ret->imag = sinh(c->real)*sin(c->imag); - return ret; -} - -/* ??$sinh@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$sinh@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_sinh(complex_float *ret, const complex_float *c) -{ - ret->real = sinh(c->real)*cos(c->imag); - ret->imag = cosh(c->real)*sin(c->imag); - return ret; -} - -/* ??$tanh@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$tanh@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_tanh(complex_float *ret, const complex_float *c) -{ - complex_float tmp; - - ret->real = -c->imag; - ret->imag = c->real; - complex_float_tan(&tmp, ret); - ret->real = tmp.imag; - ret->imag = -tmp.real; - return ret; -} - -/* ??$exp@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$exp@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_exp(complex_float *ret, const complex_float *c) -{ - ret->real = ret->imag = exp(c->real); - ret->real *= cos(c->imag); - ret->imag *= sin(c->imag); - return ret; -} - -/* ??$log@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$log@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_log(complex_float *ret, const complex_float *c) -{ - ret->real = log(complex_float_abs(c)); - ret->imag = complex_float_arg(c); - return ret; -} - -/* ??$log10@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$log10@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_log10(complex_float *ret, const complex_float *c) -{ - complex_float_log(ret, c); - ret->real *= M_LOG10E; - ret->imag *= M_LOG10E; - return ret; -} - -/* ??$norm@M@std@@YAMABV?$complex@M@0@@Z */ -/* ??$norm@M@std@@YAMAEBV?$complex@M@0@@Z */ -float __cdecl complex_float_norm(const complex_float *c) -{ - return c->real*c->real + c->imag*c->imag; -} - -/* ??$polar@M@std@@YA?AV?$complex@M@0@ABM0@Z */ -/* ??$polar@M@std@@YA?AV?$complex@M@0@AEBM0@Z */ -complex_float* __cdecl complex_float_polar_theta(complex_float *ret, const float *mod, const float *theta) -{ - ret->real = *mod * cos(*theta); - ret->imag = *mod * sin(*theta); - return ret; -} - -/* ??$polar@M@std@@YA?AV?$complex@M@0@ABM@Z */ -/* ??$polar@M@std@@YA?AV?$complex@M@0@AEBM@Z */ -complex_float* __cdecl complex_float_polar(complex_float *ret, const float *mod) -{ - ret->real = *mod; - ret->imag = 0; - return ret; -} - -/* ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@0@Z */ -/* ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@0@Z */ -complex_float* __cdecl complex_float_pow(complex_float *ret, const complex_float *l, const complex_float *r) -{ - float abs = complex_float_abs(l), arg = complex_float_arg(l); - float rad = pow(abs, r->real), theta = r->real*arg; - - if(r->imag) { - rad *= exp(-r->imag * arg); - theta += r->imag * log(abs); - } - - ret->real = rad * cos(theta); - ret->imag = rad * sin(theta); - return ret; -} - -/* ??$pow@M@std@@YA?AV?$complex@M@0@ABMABV10@@Z */ -/* ??$pow@M@std@@YA?AV?$complex@M@0@AEBMAEBV10@@Z */ -complex_float* __cdecl complex_float_pow_fc(complex_float *ret, const float *l, const complex_float *r) -{ - complex_float c = { *l, 0 }; - return complex_float_pow(ret, &c, r); -} - -/* ??$pow@M@std@@YA?AV?$complex@M@0@ABV10@ABM@Z */ -/* ??$pow@M@std@@YA?AV?$complex@M@0@AEBV10@AEBM@Z */ -complex_float* __cdecl complex_float_pow_cf(complex_float *ret, const complex_float *l, const float *r) -{ - complex_float c = { *r, 0 }; - return complex_float_pow(ret, l, &c); -} - -/* ??$sqrt@M@std@@YA?AV?$complex@M@0@ABV10@@Z */ -/* ??$sqrt@M@std@@YA?AV?$complex@M@0@AEBV10@@Z */ -complex_float* __cdecl complex_float_sqrt(complex_float *ret, const complex_float *l) -{ - complex_float c = { 0.5, 0 }; - return complex_float_pow(ret, l, &c); -} - -/* ??0?$_Complex_base@NU_C_double_complex@@@std@@QAE@ABN0@Z */ -/* ??0?$_Complex_base@NU_C_double_complex@@@std@@QEAA@AEBN0@Z */ -/* ??0?$_Complex_base@OU_C_ldouble_complex@@@std@@QAE@ABO0@Z */ -/* ??0?$_Complex_base@OU_C_ldouble_complex@@@std@@QEAA@AEBO0@Z */ -/* ??0?$complex@N@std@@QAE@ABN0@Z */ -/* ??0?$complex@N@std@@QEAA@AEBN0@Z */ -/* ??0?$complex@O@std@@QAE@ABO0@Z */ -/* ??0?$complex@O@std@@QEAA@AEBO0@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_ctor, 12) -complex_double* __thiscall complex_double_ctor(complex_double *this, const double *real, const double *imag) -{ - this->real = *real; - this->imag = *imag; - return this; -} - -/* ??0?$complex@N@std@@QAE@ABU_C_double_complex@@@Z */ -/* ??0?$complex@N@std@@QEAA@AEBU_C_double_complex@@@Z */ -/* ??0?$complex@N@std@@QAE@ABU_C_ldouble_complex@@@Z */ -/* ??0?$complex@N@std@@QEAA@AEBU_C_ldouble_complex@@@Z */ -/* ??0?$complex@N@std@@QAE@ABV?$complex@O@1@@Z */ -/* ??0?$complex@N@std@@QEAA@AEBV?$complex@O@1@@Z */ -/* ??0?$complex@O@std@@QAE@ABU_C_ldouble_complex@@@Z */ -/* ??0?$complex@O@std@@QEAA@AEBU_C_ldouble_complex@@@Z */ -/* ??0?$complex@O@std@@QAE@ABV?$complex@N@1@@Z */ -/* ??0?$complex@O@std@@QEAA@AEBV?$complex@N@1@@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_ctor_double, 8) -complex_double* __thiscall complex_double_ctor_double(complex_double *this, const complex_double *c) -{ - this->real = c->real; - this->imag = c->imag; - return this; -} - -/* ??0?$complex@N@std@@QAE@ABV?$complex@M@1@@Z */ -/* ??0?$complex@N@std@@QEAA@AEBV?$complex@M@1@@Z */ -/* ??0?$complex@O@std@@QAE@ABV?$complex@M@1@@Z */ -/* ??0?$complex@O@std@@QEAA@AEBV?$complex@M@1@@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_ctor_float, 8) -complex_double* __thiscall complex_double_ctor_float(complex_double *this, const complex_float *c) -{ - this->real = c->real; - this->imag = c->imag; - return this; -} - -/* ??_F?$complex@N@std@@QAEXXZ */ -/* ??_F?$complex@N@std@@QEAAXXZ */ -/* ??_F?$complex@O@std@@QAEXXZ */ -/* ??_F?$complex@O@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(complex_double_ctor_def, 4) -complex_double* __thiscall complex_double_ctor_def(complex_double *this) -{ - this->real = this->imag = 0; - return this; -} - -/* ??$?8N@std@@YA_NABNABV?$complex@N@0@@Z */ -/* ??$?8N@std@@YA_NAEBNAEBV?$complex@N@0@@Z */ -/* ??$?8O@std@@YA_NABOABV?$complex@O@0@@Z */ -/* ??$?8O@std@@YA_NAEBOAEBV?$complex@O@0@@Z */ -MSVCP_bool __cdecl complex_double_equal_dc(const double *l, const complex_double *r) -{ - return *l==r->real && r->imag==0; -} - -/* ??$?8N@std@@YA_NABV?$complex@N@0@0@Z */ -/* ??$?8N@std@@YA_NAEBV?$complex@N@0@0@Z */ -/* ??$?8O@std@@YA_NABV?$complex@O@0@0@Z */ -/* ??$?8O@std@@YA_NAEBV?$complex@O@0@0@Z */ -MSVCP_bool __cdecl complex_double_equal(const complex_double *l, const complex_double *r) -{ - return l->real==r->real && l->imag==r->imag; -} - -/* ??$?8N@std@@YA_NABV?$complex@N@0@ABN@Z */ -/* ??$?8N@std@@YA_NAEBV?$complex@N@0@AEBN@Z */ -/* ??$?8O@std@@YA_NABV?$complex@O@0@ABO@Z */ -/* ??$?8O@std@@YA_NAEBV?$complex@O@0@AEBO@Z */ -MSVCP_bool __cdecl complex_double_equal_cd(const complex_double *l, double *r) -{ - return l->real==*r && l->imag==0; -} - -/* ??$?9N@std@@YA_NABNABV?$complex@N@0@@Z */ -/* ??$?9N@std@@YA_NAEBNAEBV?$complex@N@0@@Z */ -/* ??$?9O@std@@YA_NABOABV?$complex@O@0@@Z */ -/* ??$?9O@std@@YA_NAEBOAEBV?$complex@O@0@@Z */ -MSVCP_bool __cdecl complex_double_not_equal_dc(const double *l, const complex_double *r) -{ - return !complex_double_equal_dc(l, r); -} - -/* ??$?9N@std@@YA_NABV?$complex@N@0@0@Z */ -/* ??$?9N@std@@YA_NAEBV?$complex@N@0@0@Z */ -/* ??$?9O@std@@YA_NABV?$complex@O@0@0@Z */ -/* ??$?9O@std@@YA_NAEBV?$complex@O@0@0@Z */ -MSVCP_bool __cdecl complex_double_not_equal(const complex_double *l, const complex_double *r) -{ - return !complex_double_equal(l, r); -} - -/* ??$?9N@std@@YA_NABV?$complex@N@0@ABN@Z */ -/* ??$?9N@std@@YA_NAEBV?$complex@N@0@AEBN@Z */ -/* ??$?9O@std@@YA_NABV?$complex@O@0@ABO@Z */ -/* ??$?9O@std@@YA_NAEBV?$complex@O@0@AEBO@Z */ -MSVCP_bool __cdecl complex_double_not_equal_cd(const complex_double *l, double *r) -{ - return !complex_double_equal_cd(l, r); -} - -/* ??$?DN@std@@YA?AV?$complex@N@0@ABNABV10@@Z */ -/* ??$?DN@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z */ -/* ??$?DO@std@@YA?AV?$complex@O@0@ABOABV10@@Z */ -/* ??$?DO@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z */ -complex_double* __cdecl complex_double_mult_dc(complex_double *ret, const double *l, const complex_double *r) -{ - ret->real = *l * r->real; - ret->imag = *l * r->imag; - return ret; -} - -/* ??$?DN@std@@YA?AV?$complex@N@0@ABV10@0@Z */ -/* ??$?DN@std@@YA?AV?$complex@N@0@AEBV10@0@Z */ -/* ??$?DO@std@@YA?AV?$complex@O@0@ABV10@0@Z */ -/* ??$?DO@std@@YA?AV?$complex@O@0@AEBV10@0@Z */ -complex_double* __cdecl complex_double_mult(complex_double *ret, const complex_double *l, const complex_double *r) -{ - ret->real = l->real*r->real - l->imag*r->imag; - ret->imag = l->imag*r->real + l->real*r->imag; - return ret; -} - -/* ??$?DN@std@@YA?AV?$complex@N@0@ABV10@ABN@Z */ -/* ??$?DN@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z */ -/* ??$?DO@std@@YA?AV?$complex@O@0@ABV10@ABO@Z */ -/* ??$?DO@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z */ -complex_double* __cdecl complex_double_mult_cd(complex_double *ret, const complex_double *l, double *r) -{ - ret->real = l->real * *r; - ret->imag = l->imag * *r; - return ret; -} - -/* ??$?GN@std@@YA?AV?$complex@N@0@ABNABV10@@Z */ -/* ??$?GN@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@ABOABV10@@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z */ -complex_double* __cdecl complex_double_sub_dc(complex_double *ret, const double *l, const complex_double *r) -{ - ret->real = *l - r->real; - ret->imag = -r->imag; - return ret; -} - -/* ??$?GN@std@@YA?AV?$complex@N@0@ABV10@0@Z */ -/* ??$?GN@std@@YA?AV?$complex@N@0@AEBV10@0@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@ABV10@0@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@AEBV10@0@Z */ -complex_double* __cdecl complex_double_sub(complex_double *ret, const complex_double *l, const complex_double *r) -{ - ret->real = l->real - r->real; - ret->imag = l->imag - r->imag; - return ret; -} - -/* ??$?GN@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$?GN@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_neg(complex_double *ret, const complex_double *c) -{ - ret->real = -c->real; - ret->imag = -c->imag; - return ret; -} - -/* ??$?GN@std@@YA?AV?$complex@N@0@ABV10@ABN@Z */ -/* ??$?GN@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@ABV10@ABO@Z */ -/* ??$?GO@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z */ -complex_double* __cdecl complex_double_sub_cd(complex_double *ret, const complex_double *l, double *r) -{ - ret->real = l->real - *r; - ret->imag = l->imag; - return ret; -} - -/* ??$?HN@std@@YA?AV?$complex@N@0@ABNABV10@@Z */ -/* ??$?HN@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@ABOABV10@@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z */ -complex_double* __cdecl complex_double_add_dc(complex_double *ret, const double *l, const complex_double *r) -{ - ret->real = *l + r->real; - ret->imag = r->imag; - return ret; -} - -/* ??$?HN@std@@YA?AV?$complex@N@0@ABV10@0@Z */ -/* ??$?HN@std@@YA?AV?$complex@N@0@AEBV10@0@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@ABV10@0@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@AEBV10@0@Z */ -complex_double* __cdecl complex_double_add(complex_double *ret, const complex_double *l, const complex_double *r) -{ - ret->real = l->real + r->real; - ret->imag = l->imag + r->imag; - return ret; -} - -/* ??$?HN@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$?HN@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_plus(complex_double *ret, const complex_double *c) -{ - *ret = *c; - return ret; -} - -/* ??$?HN@std@@YA?AV?$complex@N@0@ABV10@ABN@Z */ -/* ??$?HN@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@ABV10@ABO@Z */ -/* ??$?HO@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z */ -complex_double* __cdecl complex_double_add_cd(complex_double *ret, const complex_double *l, double *r) -{ - ret->real = l->real + *r; - ret->imag = l->imag; - return ret; -} - -/* ??$?KN@std@@YA?AV?$complex@N@0@ABV10@0@Z */ -/* ??$?KN@std@@YA?AV?$complex@N@0@AEBV10@0@Z */ -/* ??$?KO@std@@YA?AV?$complex@O@0@ABV10@0@Z */ -/* ??$?KO@std@@YA?AV?$complex@O@0@AEBV10@0@Z */ -complex_double* __cdecl complex_double_div(complex_double *ret, const complex_double *l, const complex_double *r) -{ - double tmp, den; - if((!r->real && !r->imag) || _isnan(l->real) || _isnan(l->imag) - || _isnan(r->real) || _isnan(r->imag)) { - ret->real = std_numeric_limits_double_quiet_NaN(); - ret->imag = ret->real; - return ret; - } - - if (fabs(r->real) >= fabs(r->imag)) { - tmp = r->imag / r->real; - den = r->real + r->imag*tmp; - ret->real = (l->real + l->imag*tmp) / den; - ret->imag = (l->imag - l->real*tmp) / den; - } else { - tmp = r->real / r->imag; - den = r->real*tmp + r->imag; - ret->real = (l->real*tmp + l->imag) / den; - ret->imag = (l->imag*tmp - l->real) / den; - } - return ret; -} - -/* ??$?KN@std@@YA?AV?$complex@N@0@ABNABV10@@Z */ -/* ??$?KN@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z */ -/* ??$?KO@std@@YA?AV?$complex@O@0@ABOABV10@@Z */ -/* ??$?KO@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z */ -complex_double* __cdecl complex_double_div_dc(complex_double *ret, const double *l, const complex_double *r) -{ - complex_double c = {*l, 0}; - return complex_double_div(ret, &c, r); -} - -/* ??$?KN@std@@YA?AV?$complex@N@0@ABV10@ABN@Z */ -/* ??$?KN@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z */ -/* ??$?KO@std@@YA?AV?$complex@O@0@ABV10@ABO@Z */ -/* ??$?KO@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z */ -complex_double* __cdecl complex_double_div_cd(complex_double *ret, const complex_double *l, double *r) -{ - ret->real = l->real / *r; - ret->imag = l->imag / *r; - return ret; -} - -/* ??4?$_Complex_base@NU_C_double_complex@@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$_Complex_base@NU_C_double_complex@@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??4?$_Complex_base@OU_C_ldouble_complex@@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$_Complex_base@OU_C_ldouble_complex@@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??4?$complex@N@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$complex@N@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??4?$complex@O@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$complex@O@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_assign, 8) -complex_double* __thiscall complex_double_assign(complex_double *this, const complex_double *r) -{ - *this = *r; - return this; -} - -/* ??4?$complex@N@std@@QAEAAV01@ABN@Z */ -/* ??4?$complex@N@std@@QEAAAEAV01@AEBN@Z */ -/* ??4?$complex@O@std@@QAEAAV01@ABO@Z */ -/* ??4?$complex@O@std@@QEAAAEAV01@AEBO@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_assign_double, 8) -complex_double* __thiscall complex_double_assign_double(complex_double *this, double *r) -{ - this->real = *r; - this->imag = 0; - return this; -} - -/* ??X?$complex@N@std@@QAEAAV01@ABN@Z */ -/* ??X?$complex@N@std@@QEAAAEAV01@AEBN@Z */ -/* ??X?$complex@O@std@@QAEAAV01@ABO@Z */ -/* ??X?$complex@O@std@@QEAAAEAV01@AEBO@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_mult_assign_double, 8) -complex_double* __thiscall complex_double_mult_assign_double(complex_double *this, const double *r) -{ - this->real *= *r; - this->imag *= *r; - return this; -} - -/* ??X?$complex@N@std@@QAEAAV01@ABV01@@Z */ -/* ??X?$complex@N@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??X?$complex@O@std@@QAEAAV01@ABV01@@Z */ -/* ??X?$complex@O@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_mult_assign, 8) -complex_double* __thiscall complex_double_mult_assign(complex_double *this, const complex_double *r) -{ - complex_double tmp = *this; - - this->real = tmp.real*r->real - tmp.imag*r->imag; - this->imag = tmp.real*r->imag + tmp.imag*r->real; - return this; -} - -/* ??Y?$complex@N@std@@QAEAAV01@ABN@Z */ -/* ??Y?$complex@N@std@@QEAAAEAV01@AEBN@Z */ -/* ??Y?$complex@O@std@@QAEAAV01@ABO@Z */ -/* ??Y?$complex@O@std@@QEAAAEAV01@AEBO@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_add_assign_double, 8) -complex_double* __thiscall complex_double_add_assign_double(complex_double *this, const double *r) -{ - this->real += *r; - return this; -} - -/* ??Y?$complex@N@std@@QAEAAV01@ABV01@@Z */ -/* ??Y?$complex@N@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??Y?$complex@O@std@@QAEAAV01@ABV01@@Z */ -/* ??Y?$complex@O@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_add_assign, 8) -complex_double* __thiscall complex_double_add_assign(complex_double *this, const complex_double *r) -{ - this->real += r->real; - this->imag += r->imag; - return this; -} - -/* ??Z?$complex@N@std@@QAEAAV01@ABN@Z */ -/* ??Z?$complex@N@std@@QEAAAEAV01@AEBN@Z */ -/* ??Z?$complex@O@std@@QAEAAV01@ABO@Z */ -/* ??Z?$complex@O@std@@QEAAAEAV01@AEBO@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_sub_assign_double, 8) -complex_double* __thiscall complex_double_sub_assign_double(complex_double *this, const double *r) -{ - this->real -= *r; - return this; -} - -/* ??Z?$complex@N@std@@QAEAAV01@ABV01@@Z */ -/* ??Z?$complex@N@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??Z?$complex@O@std@@QAEAAV01@ABV01@@Z */ -/* ??Z?$complex@O@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_sub_assign, 8) -complex_double* __thiscall complex_double_sub_assign(complex_double *this, const complex_double *r) -{ - this->real -= r->real; - this->imag -= r->imag; - return this; -} - -/* ??_0?$complex@N@std@@QAEAAV01@ABN@Z */ -/* ??_0?$complex@N@std@@QEAAAEAV01@AEBN@Z */ -/* ??_0?$complex@O@std@@QAEAAV01@ABO@Z */ -/* ??_0?$complex@O@std@@QEAAAEAV01@AEBO@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_div_assign_double, 8) -complex_double* __thiscall complex_double_div_assign_double(complex_double *this, const double *r) -{ - this->real /= *r; - this->imag /= *r; - return this; -} - -/* ??_0?$complex@N@std@@QAEAAV01@ABV01@@Z */ -/* ??_0?$complex@N@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??_0?$complex@O@std@@QAEAAV01@ABV01@@Z */ -/* ??_0?$complex@O@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_div_assign, 8) -complex_double* __thiscall complex_double_div_assign(complex_double *this, const complex_double *r) -{ - complex_double tmp = *this; - return complex_double_div(this, &tmp, r); -} - -/* ??$arg@N@std@@YANABV?$complex@N@0@@Z */ -/* ??$arg@N@std@@YANAEBV?$complex@N@0@@Z */ -/* ??$arg@O@std@@YAOABV?$complex@O@0@@Z */ -/* ??$arg@O@std@@YAOAEBV?$complex@O@0@@Z */ -double __cdecl complex_double_arg(const complex_double *c) -{ - return atan2(c->imag, c->real); -} - -/* ??$imag@N@std@@YANABV?$complex@N@0@@Z */ -/* ??$imag@N@std@@YANAEBV?$complex@N@0@@Z */ -/* ??$imag@O@std@@YAOABV?$complex@O@0@@Z */ -/* ??$imag@O@std@@YAOAEBV?$complex@O@0@@Z */ -double __cdecl complex_double_imag(const complex_double *c) -{ - return c->imag; -} - -/* ?imag@?$_Complex_base@NU_C_double_complex@@@std@@QAENABN@Z */ -/* ?imag@?$_Complex_base@NU_C_double_complex@@@std@@QEAANAEBN@Z */ -/* ?imag@?$_Complex_base@OU_C_ldouble_complex@@@std@@QAEOABO@Z */ -/* ?imag@?$_Complex_base@OU_C_ldouble_complex@@@std@@QEAAOAEBO@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_imag_set, 8) -double __thiscall complex_double_imag_set(complex_double *this, const double *d) -{ - return (this->imag = *d); -} - -/* ?imag@?$_Complex_base@NU_C_double_complex@@@std@@QBENXZ */ -/* ?imag@?$_Complex_base@NU_C_double_complex@@@std@@QEBANXZ */ -/* ?imag@?$_Complex_base@OU_C_ldouble_complex@@@std@@QBEOXZ */ -/* ?imag@?$_Complex_base@OU_C_ldouble_complex@@@std@@QEBAOXZ */ -DEFINE_THISCALL_WRAPPER(complex_double_imag_get, 4) -double __thiscall complex_double_imag_get(const complex_double *this) -{ - return this->imag; -} - -/* ??$real@N@std@@YANABV?$complex@N@0@@Z */ -/* ??$real@N@std@@YANAEBV?$complex@N@0@@Z */ -/* ??$real@O@std@@YAOABV?$complex@O@0@@Z */ -/* ??$real@O@std@@YAOAEBV?$complex@O@0@@Z */ -double __cdecl complex_double_real(const complex_double *c) -{ - return c->real; -} - -/* ?real@?$_Complex_base@NU_C_double_complex@@@std@@QAENABN@Z */ -/* ?real@?$_Complex_base@NU_C_double_complex@@@std@@QEAANAEBN@Z */ -/* ?real@?$_Complex_base@OU_C_ldouble_complex@@@std@@QAEOABO@Z */ -/* ?real@?$_Complex_base@OU_C_ldouble_complex@@@std@@QEAAOAEBO@Z */ -DEFINE_THISCALL_WRAPPER(complex_double_real_set, 8) -double __thiscall complex_double_real_set(complex_double *this, const double *d) -{ - return (this->real = *d); -} - -/* ?real@?$_Complex_base@NU_C_double_complex@@@std@@QBENXZ */ -/* ?real@?$_Complex_base@NU_C_double_complex@@@std@@QEBANXZ */ -/* ?real@?$_Complex_base@OU_C_ldouble_complex@@@std@@QBEOXZ */ -/* ?real@?$_Complex_base@OU_C_ldouble_complex@@@std@@QEBAOXZ */ -DEFINE_THISCALL_WRAPPER(complex_double_real_get, 4) -double __thiscall complex_double_real_get(const complex_double *this) -{ - return this->real; -} - -/* ??$_Fabs@N@std@@YANABV?$complex@N@0@PAH@Z */ -/* ??$_Fabs@N@std@@YANAEBV?$complex@N@0@PEAH@Z */ -/* ??$_Fabs@O@std@@YAOABV?$complex@O@0@PAH@Z */ -/* ??$_Fabs@O@std@@YAOAEBV?$complex@O@0@PEAH@Z */ -double __cdecl complex_double__Fabs(const complex_double *c, int *scale) -{ - double ret; - - ret = hypot(c->real, c->imag); - if(_isnan(ret) || ret==0) { - *scale = 0; - }else if(ret >= 1) { - *scale = 2; - ret /= 4; - }else { - *scale = -2; - ret *= 4; - } - - return ret; -} - -/* ??$abs@N@std@@YANABV?$complex@N@0@@Z */ -/* ??$abs@N@std@@YANAEBV?$complex@N@0@@Z */ -/* ??$abs@O@std@@YAOABV?$complex@O@0@@Z */ -/* ??$abs@O@std@@YAOAEBV?$complex@O@0@@Z */ -double __cdecl complex_double_abs(const complex_double *c) -{ - return hypot(c->real, c->imag); -} - -/* ??$conj@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$conj@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$conj@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$conj@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_conj(complex_double *ret, const complex_double *c) -{ - ret->real = c->real; - ret->imag = -c->imag; - return ret; -} - -/* ??$cos@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$cos@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$cos@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$cos@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_cos(complex_double *ret, const complex_double *c) -{ - ret->real = cos(c->real)*cosh(c->imag); - ret->imag = -sin(c->real)*sinh(c->imag); - return ret; -} - -/* ??$sin@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$sin@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$sin@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$sin@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_sin(complex_double *ret, const complex_double *c) -{ - ret->real = sin(c->real)*cosh(c->imag); - ret->imag = cos(c->real)*sinh(c->imag); - return ret; -} - -/* ??$tan@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$tan@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$tan@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$tan@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_tan(complex_double *ret, const complex_double *c) -{ - double denom = cos(2*c->real) + cosh(2*c->imag); - ret->real = sin(2*c->real) / denom; - ret->imag = sinh(2*c->imag) / denom; - return ret; -} - -/* ??$cosh@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$cosh@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$cosh@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$cosh@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_cosh(complex_double *ret, const complex_double *c) -{ - ret->real = cosh(c->real)*cos(c->imag); - ret->imag = sinh(c->real)*sin(c->imag); - return ret; -} - -/* ??$sinh@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$sinh@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$sinh@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$sinh@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_sinh(complex_double *ret, const complex_double *c) -{ - ret->real = sinh(c->real)*cos(c->imag); - ret->imag = cosh(c->real)*sin(c->imag); - return ret; -} - -/* ??$tanh@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$tanh@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$tanh@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$tanh@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_tanh(complex_double *ret, const complex_double *c) -{ - complex_double tmp; - - ret->real = -c->imag; - ret->imag = c->real; - complex_double_tan(&tmp, ret); - ret->real = tmp.imag; - ret->imag = -tmp.real; - return ret; -} - -/* ??$exp@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$exp@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$exp@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$exp@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_exp(complex_double *ret, const complex_double *c) -{ - ret->real = ret->imag = exp(c->real); - ret->real *= cos(c->imag); - ret->imag *= sin(c->imag); - return ret; -} - -/* ??$log@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$log@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$log@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$log@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_log(complex_double *ret, const complex_double *c) -{ - ret->real = log(complex_double_abs(c)); - ret->imag = complex_double_arg(c); - return ret; -} - -/* ??$log10@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$log10@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$log10@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$log10@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_log10(complex_double *ret, const complex_double *c) -{ - complex_double_log(ret, c); - ret->real *= M_LOG10E; - ret->imag *= M_LOG10E; - return ret; -} - -/* ??$norm@N@std@@YANABV?$complex@N@0@@Z */ -/* ??$norm@N@std@@YANAEBV?$complex@N@0@@Z */ -/* ??$norm@O@std@@YAOABV?$complex@O@0@@Z */ -/* ??$norm@O@std@@YAOAEBV?$complex@O@0@@Z */ -double __cdecl complex_double_norm(const complex_double *c) -{ - return c->real*c->real + c->imag*c->imag; -} - -/* ??$polar@N@std@@YA?AV?$complex@N@0@ABN0@Z */ -/* ??$polar@N@std@@YA?AV?$complex@N@0@AEBN0@Z */ -/* ??$polar@O@std@@YA?AV?$complex@O@0@ABO0@Z */ -/* ??$polar@O@std@@YA?AV?$complex@O@0@AEBO0@Z */ -complex_double* __cdecl complex_double_polar_theta(complex_double *ret, const double *mod, const double *theta) -{ - ret->real = *mod * cos(*theta); - ret->imag = *mod * sin(*theta); - return ret; -} - -/* ??$polar@N@std@@YA?AV?$complex@N@0@ABN@Z */ -/* ??$polar@N@std@@YA?AV?$complex@N@0@AEBN@Z */ -/* ??$polar@O@std@@YA?AV?$complex@O@0@ABO@Z */ -/* ??$polar@O@std@@YA?AV?$complex@O@0@AEBO@Z */ -complex_double* __cdecl complex_double_polar(complex_double *ret, const double *mod) -{ - ret->real = *mod; - ret->imag = 0; - return ret; -} - -/* ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@0@Z */ -/* ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@0@Z */ -/* ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@0@Z */ -/* ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@0@Z */ -complex_double* __cdecl complex_double_pow(complex_double *ret, const complex_double *l, const complex_double *r) -{ - double abs = complex_double_abs(l), arg = complex_double_arg(l); - double rad = pow(abs, r->real), theta = r->real*arg; - - if(r->imag) { - rad *= exp(-r->imag * arg); - theta += r->imag * log(abs); - } - - ret->real = rad * cos(theta); - ret->imag = rad * sin(theta); - return ret; -} - -/* ??$pow@N@std@@YA?AV?$complex@N@0@ABNABV10@@Z */ -/* ??$pow@N@std@@YA?AV?$complex@N@0@AEBNAEBV10@@Z */ -/* ??$pow@O@std@@YA?AV?$complex@O@0@ABOABV10@@Z */ -/* ??$pow@O@std@@YA?AV?$complex@O@0@AEBOAEBV10@@Z */ -complex_double* __cdecl complex_double_pow_dc(complex_double *ret, const double *l, const complex_double *r) -{ - complex_double c = { *l, 0 }; - return complex_double_pow(ret, &c, r); -} - -/* ??$pow@N@std@@YA?AV?$complex@N@0@ABV10@ABN@Z */ -/* ??$pow@N@std@@YA?AV?$complex@N@0@AEBV10@AEBN@Z */ -/* ??$pow@O@std@@YA?AV?$complex@O@0@ABV10@ABO@Z */ -/* ??$pow@O@std@@YA?AV?$complex@O@0@AEBV10@AEBO@Z */ -complex_double* __cdecl complex_double_pow_cd(complex_double *ret, const complex_double *l, const double *r) -{ - complex_double c = { *r, 0 }; - return complex_double_pow(ret, l, &c); -} - -/* ??$sqrt@N@std@@YA?AV?$complex@N@0@ABV10@@Z */ -/* ??$sqrt@N@std@@YA?AV?$complex@N@0@AEBV10@@Z */ -/* ??$sqrt@O@std@@YA?AV?$complex@O@0@ABV10@@Z */ -/* ??$sqrt@O@std@@YA?AV?$complex@O@0@AEBV10@@Z */ -complex_double* __cdecl complex_double_sqrt(complex_double *ret, const complex_double *l) -{ - complex_double c = { 0.5, 0 }; - return complex_double_pow(ret, l, &c); -} diff --git a/dlls/msvcp80/memory.c b/dlls/msvcp80/memory.c deleted file mode 100644 index 4407cfe3967..00000000000 --- a/dlls/msvcp80/memory.c +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright 2010 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include -#include - -#include "msvcp.h" - -#include "windef.h" -#include "winbase.h" - - -/* ?address@?$allocator@D@std@@QBEPADAAD@Z */ -/* ?address@?$allocator@D@std@@QEBAPEADAEAD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_address, 8) -char* __thiscall MSVCP_allocator_char_address(void *this, char *ptr) -{ - return ptr; -} - -/* ?address@?$allocator@D@std@@QBEPBDABD@Z */ -/* ?address@?$allocator@D@std@@QEBAPEBDAEBD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_const_address, 8) -const char* __thiscall MSVCP_allocator_char_const_address(void *this, const char *ptr) -{ - return ptr; -} - -/* ??0?$allocator@D@std@@QAE@XZ */ -/* ??0?$allocator@D@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_ctor, 4) -void* __thiscall MSVCP_allocator_char_ctor(void *this) -{ - return this; -} - -/* ??0?$allocator@D@std@@QAE@ABV01@@Z */ -/* ??0?$allocator@D@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_copy_ctor, 8) -void* __thiscall MSVCP_allocator_char_copy_ctor(void *this, const void *copy) -{ - return this; -} - -/* ??4?$allocator@D@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$allocator@D@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_assign, 8) -void* __thiscall MSVCP_allocator_char_assign(void *this, const void *assign) -{ - return this; -} - -/* ?deallocate@?$allocator@D@std@@QAEXPADI@Z */ -/* ?deallocate@?$allocator@D@std@@QEAAXPEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_deallocate, 12) -void __thiscall MSVCP_allocator_char_deallocate(void *this, char *ptr, MSVCP_size_t size) -{ - MSVCRT_operator_delete(ptr); -} - -/* ?allocate@?$allocator@D@std@@QAEPADI@Z */ -/* ?allocate@?$allocator@D@std@@QEAAPEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_allocate, 8) -char* __thiscall MSVCP_allocator_char_allocate(void *this, MSVCP_size_t count) -{ - return MSVCRT_operator_new(count); -} - -/* ?allocate@?$allocator@D@std@@QAEPADIPBX@Z */ -/* ?allocate@?$allocator@D@std@@QEAAPEAD_KPEBX@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_allocate_hint, 12) -char* __thiscall MSVCP_allocator_char_allocate_hint(void *this, - MSVCP_size_t count, const void *hint) -{ - /* Native ignores hint */ - return MSVCP_allocator_char_allocate(this, count); -} - -/* ?construct@?$allocator@D@std@@QAEXPADABD@Z */ -/* ?construct@?$allocator@D@std@@QEAAXPEADAEBD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_construct, 12) -void __thiscall MSVCP_allocator_char_construct(void *this, char *ptr, const char *val) -{ - *ptr = *val; -} - -/* ?destroy@?$allocator@D@std@@QAEXPAD@Z */ -/* ?destroy@?$allocator@D@std@@QEAAXPEAD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_destroy, 8) -void __thiscall MSVCP_allocator_char_destroy(void *this, char *ptr) -{ -} - -/* ?max_size@?$allocator@D@std@@QBEIXZ */ -/* ?max_size@?$allocator@D@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_max_size, 4) -MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(void *this) -{ - return UINT_MAX/sizeof(char); -} - - -/* allocator */ -/* ?address@?$allocator@_W@std@@QBEPA_WAA_W@Z */ -/* ?address@?$allocator@_W@std@@QEBAPEA_WAEA_W@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_address, 8) -wchar_t* __thiscall MSVCP_allocator_wchar_address(void *this, wchar_t *ptr) -{ - return ptr; -} - -/* ?address@?$allocator@_W@std@@QBEPB_WAB_W@Z */ -/* ?address@?$allocator@_W@std@@QEBAPEB_WAEB_W@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_const_address, 8) -const wchar_t* __thiscall MSVCP_allocator_wchar_const_address(void *this, const wchar_t *ptr) -{ - return ptr; -} - -/* ??0?$allocator@_W@std@@QAE@XZ */ -/* ??0?$allocator@_W@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_ctor, 4) -void* __thiscall MSVCP_allocator_wchar_ctor(void *this) -{ - return this; -} - -/* ??0?$allocator@_W@std@@QAE@ABV01@@Z */ -/* ??0?$allocator@_W@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_copy_ctor, 8) -void* __thiscall MSVCP_allocator_wchar_copy_ctor(void *this, void *copy) -{ - return this; -} - -/* ??4?$allocator@_W@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$allocator@_W@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_assign, 8) -void* __thiscall MSVCP_allocator_wchar_assign(void *this, void *assign) -{ - return this; -} - -/* ?deallocate@?$allocator@_W@std@@QAEXPA_WI@Z */ -/* ?deallocate@?$allocator@_W@std@@QEAAXPEA_W_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_deallocate, 12) -void __thiscall MSVCP_allocator_wchar_deallocate(void *this, - wchar_t *ptr, MSVCP_size_t size) -{ - MSVCRT_operator_delete(ptr); -} - -/* ?allocate@?$allocator@_W@std@@QAEPA_WI@Z */ -/* ?allocate@?$allocator@_W@std@@QEAAPEA_W_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_allocate, 8) -wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void *this, MSVCP_size_t count) -{ - if(UINT_MAX/count < sizeof(wchar_t)) { - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return NULL; - } - - return MSVCRT_operator_new(count * sizeof(wchar_t)); -} - -/* ?allocate@?$allocator@_W@std@@QAEPA_WIPBX@Z */ -/* ?allocate@?$allocator@_W@std@@QEAAPEA_W_KPEBX@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_allocate_hint, 12) -wchar_t* __thiscall MSVCP_allocator_wchar_allocate_hint(void *this, - MSVCP_size_t count, const void *hint) -{ - return MSVCP_allocator_wchar_allocate(this, count); -} - -/* ?construct@?$allocator@_W@std@@QAEXPA_WAB_W@Z */ -/* ?construct@?$allocator@_W@std@@QEAAXPEA_WAEB_W@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_construct, 12) -void __thiscall MSVCP_allocator_wchar_construct(void *this, - wchar_t *ptr, const wchar_t *val) -{ - *ptr = *val; -} - -/* ?destroy@?$allocator@_W@std@@QAEXPA_W@Z */ -/* ?destroy@?$allocator@_W@std@@QEAAXPEA_W@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_destroy, 8) -void __thiscall MSVCP_allocator_wchar_destroy(void *this, char *ptr) -{ -} - -/* ?max_size@?$allocator@_W@std@@QBEIXZ */ -/* ?max_size@?$allocator@_W@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_wchar_max_size, 4) -MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(void *this) -{ - return UINT_MAX/sizeof(wchar_t); -} - -/* allocator */ -/* ?address@?$allocator@G@std@@QBEPAGAAG@Z */ -/* ?address@?$allocator@G@std@@QEBAPEAGAEAG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_address, 8) -unsigned short* __thiscall MSVCP_allocator_short_address( - void *this, unsigned short *ptr) -{ - return ptr; -} - -/* ?address@?$allocator@G@std@@QBEPBGABG@Z */ -/* ?address@?$allocator@G@std@@QEBAPEBGAEBG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_const_address, 8) -const unsigned short* __thiscall MSVCP_allocator_short_const_address( - void *this, const unsigned short *ptr) -{ - return ptr; -} - -/* ??0?$allocator@G@std@@QAE@XZ */ -/* ??0?$allocator@G@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_ctor, 4) -void* __thiscall MSVCP_allocator_short_ctor(void *this) -{ - return this; -} - -/* ??0?$allocator@G@std@@QAE@ABV01@@Z */ -/* ??0?$allocator@G@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_copy_ctor, 8) -void* __thiscall MSVCP_allocator_short_copy_ctor(void *this, void *copy) -{ - return this; -} - -/* ??4?$allocator@G@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$allocator@G@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_assign, 8) -void* __thiscall MSVCP_allocator_short_assign(void *this, void *assign) -{ - return this; -} - -/* ?deallocate@?$allocator@G@std@@QAEXPAGI@Z */ -/* ?deallocate@?$allocator@G@std@@QEAAXPEAG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_deallocate, 12) -void __thiscall MSVCP_allocator_short_deallocate(void *this, - unsigned short *ptr, MSVCP_size_t size) -{ - MSVCRT_operator_delete(ptr); -} - -/* ?allocate@?$allocator@G@std@@QAEPAGI@Z */ -/* ?allocate@?$allocator@G@std@@QEAAPEAG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_allocate, 8) -unsigned short* __thiscall MSVCP_allocator_short_allocate( - void *this, MSVCP_size_t count) -{ - if(UINT_MAX/count < sizeof(unsigned short)) { - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - return NULL; - } - - return MSVCRT_operator_new(count * sizeof(unsigned short)); -} - -/* ?allocate@?$allocator@G@std@@QAEPAGIPBX@Z */ -/* ?allocate@?$allocator@G@std@@QEAAPEAG_KPEBX@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_allocate_hint, 12) -unsigned short* __thiscall MSVCP_allocator_short_allocate_hint( - void *this, MSVCP_size_t count, const void *hint) -{ - return MSVCP_allocator_short_allocate(this, count); -} - -/* ?construct@?$allocator@G@std@@QAEXPAGABG@Z */ -/* ?construct@?$allocator@G@std@@QEAAXPEAGAEBG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_construct, 12) -void __thiscall MSVCP_allocator_short_construct(void *this, - unsigned short *ptr, unsigned short *val) -{ - *ptr = *val; -} - -/* ?destroy@?$allocator@G@std@@QAEXPAG@Z */ -/* ?destroy@?$allocator@G@std@@QEAAXPEAG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_destroy, 8) -void __thiscall MSVCP_allocator_short_destroy(void *this, MSVCP_size_t *ptr) -{ -} - -/* ?max_size@?$allocator@G@std@@QBEIXZ */ -/* ?max_size@?$allocator@G@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_short_max_size, 4) -MSVCP_size_t __thiscall MSVCP_allocator_short_max_size(void *this) -{ - return UINT_MAX/sizeof(unsigned short); -} - -/* allocator */ -/* ??0?$allocator@X@std@@QAE@XZ */ -/* ??0?$allocator@X@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_void_ctor, 4) -void* __thiscall MSVCP_allocator_void_ctor(void *this) -{ - return this; -} - -/* ??0?$allocator@X@std@@QAE@ABV01@@Z */ -/* ??0?$allocator@X@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_void_copy_ctor, 8) -void* __thiscall MSVCP_allocator_void_copy_ctor(void *this, void *copy) -{ - return this; -} - -/* ??4?$allocator@X@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$allocator@X@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_allocator_void_assign, 8) -void* __thiscall MSVCP_allocator_void_assign(void *this, void *assign) -{ - return this; -} diff --git a/dlls/msvcp80/misc.c b/dlls/msvcp80/misc.c deleted file mode 100644 index 3cf1d5bbbeb..00000000000 --- a/dlls/msvcp80/misc.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright 2010 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include -#include - -#include "msvcp.h" - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(msvcp); - -/* ??0_Mutex@std@@QAE@XZ */ -/* ??0_Mutex@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(mutex_ctor, 4) -mutex* __thiscall mutex_ctor(mutex *this) -{ - CRITICAL_SECTION *cs = MSVCRT_operator_new(sizeof(*cs)); - if(!cs) { - ERR("Out of memory\n"); - throw_exception(EXCEPTION_BAD_ALLOC, NULL); - } - - InitializeCriticalSection(cs); - cs->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": _Mutex critical section"); - this->mutex = cs; - return this; -} - -/* ??1_Mutex@std@@QAE@XZ */ -/* ??1_Mutex@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(mutex_dtor, 4) -void __thiscall mutex_dtor(mutex *this) -{ - ((CRITICAL_SECTION*)this->mutex)->DebugInfo->Spare[0] = 0; - DeleteCriticalSection(this->mutex); - MSVCRT_operator_delete(this->mutex); -} - -/* ?_Lock@_Mutex@std@@QAEXXZ */ -/* ?_Lock@_Mutex@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(mutex_lock, 4) -void __thiscall mutex_lock(mutex *this) -{ - EnterCriticalSection(this->mutex); -} - -/* ?_Unlock@_Mutex@std@@QAEXXZ */ -/* ?_Unlock@_Mutex@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(mutex_unlock, 4) -void __thiscall mutex_unlock(mutex *this) -{ - LeaveCriticalSection(this->mutex); -} - -/* ?_Mutex_Lock@_Mutex@std@@CAXPAV12@@Z */ -/* ?_Mutex_Lock@_Mutex@std@@CAXPEAV12@@Z */ -void CDECL mutex_mutex_lock(mutex *m) -{ - mutex_lock(m); -} - -/* ?_Mutex_Unlock@_Mutex@std@@CAXPAV12@@Z */ -/* ?_Mutex_Unlock@_Mutex@std@@CAXPEAV12@@Z */ -void CDECL mutex_mutex_unlock(mutex *m) -{ - mutex_unlock(m); -} - -/* ?_Mutex_ctor@_Mutex@std@@CAXPAV12@@Z */ -/* ?_Mutex_ctor@_Mutex@std@@CAXPEAV12@@Z */ -void CDECL mutex_mutex_ctor(mutex *m) -{ - mutex_ctor(m); -} - -/* ?_Mutex_dtor@_Mutex@std@@CAXPAV12@@Z */ -/* ?_Mutex_dtor@_Mutex@std@@CAXPEAV12@@Z */ -void CDECL mutex_mutex_dtor(mutex *m) -{ - mutex_dtor(m); -} - -static CRITICAL_SECTION lockit_cs[_MAX_LOCK]; - -/* ?_Lockit_ctor@_Lockit@std@@SAXH@Z */ -void __cdecl _Lockit_init(int locktype) { - InitializeCriticalSection(&lockit_cs[locktype]); - lockit_cs[locktype].DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": _Lockit critical section"); -} - -/* ?_Lockit_dtor@_Lockit@std@@SAXH@Z */ -void __cdecl _Lockit_free(int locktype) -{ - lockit_cs[locktype].DebugInfo->Spare[0] = 0; - DeleteCriticalSection(&lockit_cs[locktype]); -} - -void init_lockit(void) { - int i; - - for(i=0; i<_MAX_LOCK; i++) - _Lockit_init(i); -} - -void free_lockit(void) { - int i; - - for(i=0; i<_MAX_LOCK; i++) - _Lockit_free(i); -} - -/* ?_Lockit_ctor@_Lockit@std@@CAXPAV12@H@Z */ -/* ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@H@Z */ -void __cdecl _Lockit__Lockit_ctor_locktype(_Lockit *lockit, int locktype) -{ - lockit->locktype = locktype; - EnterCriticalSection(&lockit_cs[locktype]); -} - -/* ?_Lockit_ctor@_Lockit@std@@CAXPAV12@@Z */ -/* ?_Lockit_ctor@_Lockit@std@@CAXPEAV12@@Z */ -void __cdecl _Lockit__Lockit_ctor(_Lockit *lockit) -{ - _Lockit__Lockit_ctor_locktype(lockit, 0); -} - -/* ??0_Lockit@std@@QAE@H@Z */ -/* ??0_Lockit@std@@QEAA@H@Z */ -DEFINE_THISCALL_WRAPPER(_Lockit_ctor_locktype, 8) -_Lockit* __thiscall _Lockit_ctor_locktype(_Lockit *this, int locktype) -{ - _Lockit__Lockit_ctor_locktype(this, locktype); - return this; -} - -/* ??0_Lockit@std@@QAE@XZ */ -/* ??0_Lockit@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(_Lockit_ctor, 4) -_Lockit* __thiscall _Lockit_ctor(_Lockit *this) -{ - _Lockit__Lockit_ctor_locktype(this, 0); - return this; -} - -/* ?_Lockit_dtor@_Lockit@std@@CAXPAV12@@Z */ -/* ?_Lockit_dtor@_Lockit@std@@CAXPEAV12@@Z */ -void __cdecl _Lockit__Lockit_dtor(_Lockit *lockit) -{ - LeaveCriticalSection(&lockit_cs[lockit->locktype]); -} - -/* ??1_Lockit@std@@QAE@XZ */ -/* ??1_Lockit@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(_Lockit_dtor, 4) -void __thiscall _Lockit_dtor(_Lockit *this) -{ - _Lockit__Lockit_dtor(this); -} - -/* wctype */ -unsigned short __cdecl wctype(const char *property) -{ - static const struct { - const char *name; - unsigned short mask; - } properties[] = { - { "alnum", _DIGIT|_ALPHA }, - { "alpha", _ALPHA }, - { "cntrl", _CONTROL }, - { "digit", _DIGIT }, - { "graph", _DIGIT|_PUNCT|_ALPHA }, - { "lower", _LOWER }, - { "print", _DIGIT|_PUNCT|_BLANK|_ALPHA }, - { "punct", _PUNCT }, - { "space", _SPACE }, - { "upper", _UPPER }, - { "xdigit", _HEX } - }; - unsigned int i; - - for(i=0; i, allocator> */ -#define BUF_SIZE_CHAR 16 -typedef struct -{ - void *allocator; - union { - char buf[BUF_SIZE_CHAR]; - char *ptr; - } data; - MSVCP_size_t size; - MSVCP_size_t res; -} basic_string_char; - -basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*); -basic_string_char* __stdcall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*); -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, MSVCP_size_t); -basic_string_char* __stdcall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*); -void __stdcall MSVCP_basic_string_char_dtor(basic_string_char*); -const char* __stdcall MSVCP_basic_string_char_c_str(const basic_string_char*); -void __thiscall MSVCP_basic_string_char_clear(basic_string_char*); -basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char); -MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*); -basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*); - -#define BUF_SIZE_WCHAR 8 -typedef struct -{ - void *allocator; - union { - wchar_t buf[BUF_SIZE_WCHAR]; - wchar_t *ptr; - } data; - MSVCP_size_t size; - MSVCP_size_t res; -} basic_string_wchar; - -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*); -basic_string_wchar* __stdcall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*); -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, MSVCP_size_t); -void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*); -const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*); -void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*); -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t); -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*); - -char* __stdcall MSVCP_allocator_char_allocate(void*, MSVCP_size_t); -void __stdcall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t); -MSVCP_size_t __stdcall MSVCP_allocator_char_max_size(void*); -wchar_t* __stdcall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t); -void __stdcall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t); -MSVCP_size_t __stdcall MSVCP_allocator_wchar_max_size(void*); - -/* class locale::facet */ -typedef struct { - const vtable_ptr *vtable; - MSVCP_size_t refs; -} locale_facet; - -typedef enum { - CODECVT_ok = 0, - CODECVT_partial = 1, - CODECVT_error = 2, - CODECVT_noconv = 3 -} codecvt_base_result; - -typedef struct { - LCID handle; - unsigned page; - const short *table; - int delfl; -} _Ctypevec; - -/* class codecvt_base */ -typedef struct { - locale_facet facet; -} codecvt_base; - -/* class codecvt */ -typedef struct { - codecvt_base base; -} codecvt_char; - -MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base*); -int __thiscall codecvt_char_unshift(const codecvt_char*, int*, char*, char*, char**); -int __thiscall codecvt_char_out(const codecvt_char*, int*, const char*, - const char*, const char**, char*, char*, char**); -int __thiscall codecvt_char_in(const codecvt_char*, int*, const char*, - const char*, const char**, char*, char*, char**); -int __thiscall codecvt_base_max_length(const codecvt_base*); - -typedef struct { - LCID handle; - unsigned page; -} _Cvtvec; - -/* class codecvt */ -typedef struct { - codecvt_base base; - _Cvtvec cvt; -} codecvt_wchar; - -int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, int*, char*, char*, char**); -int __thiscall codecvt_wchar_out(const codecvt_wchar*, int*, const wchar_t*, - const wchar_t*, const wchar_t**, char*, char*, char**); -int __thiscall codecvt_wchar_in(const codecvt_wchar*, int*, const char*, - const char*, const char**, wchar_t*, wchar_t*, wchar_t**); - -/* class ctype_base */ -typedef struct { - locale_facet facet; -} ctype_base; - -/* class ctype */ -typedef struct { - ctype_base base; - _Ctypevec ctype; -} ctype_char; - -MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char*, short, char); -char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char); -char __thiscall ctype_char_widen_ch(const ctype_char*, char); - -/* class ctype */ -typedef struct { - ctype_base base; - _Ctypevec ctype; - _Cvtvec cvt; -} ctype_wchar; - -MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t); -char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char); -wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char); - -/* class locale */ -typedef struct -{ - struct _locale__Locimp *ptr; -} locale; - -locale* __thiscall locale_ctor(locale*); -locale* __thiscall locale_copy_ctor(locale*, const locale*); -locale* __thiscall locale_operator_assign(locale*, const locale*); -void __thiscall locale_dtor(locale*); -void free_locale(void); -codecvt_char* codecvt_char_use_facet(const locale*); -codecvt_wchar* codecvt_wchar_use_facet(const locale*); -codecvt_wchar* codecvt_short_use_facet(const locale*); -ctype_char* ctype_char_use_facet(const locale*); -ctype_wchar* ctype_wchar_use_facet(const locale*); -ctype_wchar* ctype_short_use_facet(const locale*); - -/* class _Lockit */ -typedef struct { - int locktype; -} _Lockit; - -#define _LOCK_LOCALE 0 -#define _LOCK_MALLOC 1 -#define _LOCK_STREAM 2 -#define _LOCK_DEBUG 3 -#define _MAX_LOCK 4 - -void init_lockit(void); -void free_lockit(void); -_Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int); -void __thiscall _Lockit_dtor(_Lockit*); - -/* class mutex */ -typedef struct { - void *mutex; -} mutex; - -mutex* __thiscall mutex_ctor(mutex*); -void __thiscall mutex_dtor(mutex*); -void __thiscall mutex_lock(mutex*); -void __thiscall mutex_unlock(mutex*); - -typedef enum { - FMTFLAG_skipws = 0x0001, - FMTFLAG_unitbuf = 0x0002, - FMTFLAG_uppercase = 0x0004, - FMTFLAG_showbase = 0x0008, - FMTFLAG_showpoint = 0x0010, - FMTFLAG_showpos = 0x0020, - FMTFLAG_left = 0x0040, - FMTFLAG_right = 0x0080, - FMTFLAG_internal = 0x0100, - FMTFLAG_dec = 0x0200, - FMTFLAG_oct = 0x0400, - FMTFLAG_hex = 0x0800, - FMTFLAG_scientific = 0x1000, - FMTFLAG_fixed = 0x2000, - FMTFLAG_hexfloat = 0x3000, - FMTFLAG_boolalpha = 0x4000, - FMTFLAG_stdio = 0x8000, - FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal, - FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex, - FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed, - FMTFLAG_mask = 0xffff -} IOSB_fmtflags; - -typedef enum { - OPENMODE_in = 0x01, - OPENMODE_out = 0x02, - OPENMODE_ate = 0x04, - OPENMODE_app = 0x08, - OPENMODE_trunc = 0x10, - OPENMODE__Nocreate = 0x40, - OPENMODE__Noreplace = 0x80, - OPENMODE_binary = 0x20, - OPENMODE_mask = 0xff -} IOSB_openmode; - -typedef enum { - SEEKDIR_beg = 0x0, - SEEKDIR_cur = 0x1, - SEEKDIR_end = 0x2, - SEEKDIR_mask = 0x3 -} IOSB_seekdir; - -typedef enum { - IOSTATE_goodbit = 0x00, - IOSTATE_eofbit = 0x01, - IOSTATE_failbit = 0x02, - IOSTATE_badbit = 0x04, - IOSTATE__Hardfail = 0x10, - IOSTATE_mask = 0x17 -} IOSB_iostate; - -typedef struct _iosarray { - struct _iosarray *next; - int index; - int long_val; - void *ptr_val; -} IOS_BASE_iosarray; - -typedef enum { - EVENT_erase_event, - EVENT_imbue_event, - EVENT_copyfmt_event -} IOS_BASE_event; - -struct _ios_base; -typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int); -typedef struct _fnarray { - struct _fnarray *next; - int index; - IOS_BASE_event_callback event_handler; -} IOS_BASE_fnarray; - -/* class ios_base */ -typedef struct _ios_base { - const vtable_ptr *vtable; - MSVCP_size_t stdstr; - IOSB_iostate state; - IOSB_iostate except; - IOSB_fmtflags fmtfl; - streamsize prec; - streamsize wide; - IOS_BASE_iosarray *arr; - IOS_BASE_fnarray *calls; - locale *loc; -} ios_base; - -/* class basic_streambuf */ -typedef struct { - const vtable_ptr *vtable; - mutex lock; - char *rbuf; - char *wbuf; - char **prbuf; - char **pwbuf; - char *rpos; - char *wpos; - char **prpos; - char **pwpos; - int rsize; - int wsize; - int *prsize; - int *pwsize; - locale *loc; -} basic_streambuf_char; - -typedef struct { - basic_streambuf_char *strbuf; - MSVCP_bool got; - char val; -} istreambuf_iterator_char; - -typedef struct { - MSVCP_bool failed; - basic_streambuf_char *strbuf; -} ostreambuf_iterator_char; - -int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*); -int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*); -int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char); - -/* class basic_streambuf */ -typedef struct { - const vtable_ptr *vtable; - mutex lock; - wchar_t *rbuf; - wchar_t *wbuf; - wchar_t **prbuf; - wchar_t **pwbuf; - wchar_t *rpos; - wchar_t *wpos; - wchar_t **prpos; - wchar_t **pwpos; - int rsize; - int wsize; - int *prsize; - int *pwsize; - locale *loc; -} basic_streambuf_wchar; - -typedef struct { - basic_streambuf_wchar *strbuf; - MSVCP_bool got; - wchar_t val; -} istreambuf_iterator_wchar; - -typedef struct { - MSVCP_bool failed; - basic_streambuf_wchar *strbuf; -} ostreambuf_iterator_wchar; - -unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*); -unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*); -unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t); - -/* class num_get */ -typedef struct { - locale_facet facet; - _Cvtvec cvt; -} num_get; - -num_get* num_get_char_use_facet(const locale*); -istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*); -istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*); -istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*); -istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*); -istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*); -istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*); -istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*); -istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**); -istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*); -istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*); -istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*, - istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*); - -num_get* num_get_wchar_use_facet(const locale*); -num_get* num_get_short_use_facet(const locale*); -istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*); -istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*); -istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*); -istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*); -istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*); -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*); -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*); -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**); -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*); -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*); -istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*, - istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*); - -/* class num_put */ -/* class num_put */ -typedef struct { - locale_facet facet; - _Cvtvec cvt; -} num_put; - -num_put* num_put_char_use_facet(const locale*); -ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, LONG); -ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, ULONG); -ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, double); -ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, double); -ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, const void*); -ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, __int64); -ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, unsigned __int64); -ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*, - ostreambuf_iterator_char, ios_base*, char, MSVCP_bool); - -num_put* num_put_wchar_use_facet(const locale*); -num_put* num_put_short_use_facet(const locale*); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, double); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, double); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64); -ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*, - ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool); - -void init_exception(void*); -void init_locale(void*); -void init_io(void*); -void free_io(void); - -/* class complex */ -typedef struct { - float real; - float imag; -} complex_float; - -/* class complex */ -/* class complex */ -typedef struct { - double real; - double imag; -} complex_double; diff --git a/dlls/msvcp80/msvcp80.spec b/dlls/msvcp80/msvcp80.spec index 64e25b7088b..88b3b7b9731 100644 --- a/dlls/msvcp80/msvcp80.spec +++ b/dlls/msvcp80/msvcp80.spec @@ -4971,18 +4971,18 @@ @ extern ?radix@_Num_base@std@@2HB std_Num_base_radix @ extern ?radix@_Num_float_base@std@@2HB std_Num_float_base_radix @ extern ?radix@_Num_int_base@std@@2HB std_Num_int_base_radix -@ thiscall -arch=win32 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rbegin -@ cdecl -arch=win64 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rbegin -@ thiscall -arch=win32 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rbegin -@ cdecl -arch=win64 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rbegin -@ thiscall -arch=win32 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin -@ cdecl -arch=win64 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin -@ thiscall -arch=win32 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin -@ cdecl -arch=win64 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin -@ thiscall -arch=win32 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin -@ cdecl -arch=win64 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin -@ thiscall -arch=win32 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin -@ cdecl -arch=win64 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rbegin +@ thiscall -arch=win32 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rbegin +@ cdecl -arch=win64 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rbegin +@ thiscall -arch=win32 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rbegin +@ cdecl -arch=win64 ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rbegin +@ thiscall -arch=win32 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin +@ cdecl -arch=win64 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin +@ thiscall -arch=win32 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin +@ cdecl -arch=win64 ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin +@ thiscall -arch=win32 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin +@ cdecl -arch=win64 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin +@ thiscall -arch=win32 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin +@ cdecl -arch=win64 ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rbegin @ thiscall -arch=win32 ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ(ptr) basic_fstream_char_rdbuf @ cdecl -arch=win64 ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ(ptr) basic_fstream_char_rdbuf @ thiscall -arch=win32 ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ(ptr) basic_fstream_wchar_rdbuf @@ -5059,18 +5059,18 @@ @ cdecl -arch=win64 ?real@?$_Complex_base@OU_C_ldouble_complex@@@std@@QEBAOXZ(ptr) complex_double_real_get @ thiscall -arch=i386 ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z(ptr ptr long) ios_base_register_callback @ cdecl -arch=win64 ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z(ptr ptr long) ios_base_register_callback -@ thiscall -arch=win32 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rend -@ cdecl -arch=win64 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rend -@ thiscall -arch=win32 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rend -@ cdecl -arch=win64 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) basic_string_char_rend -@ thiscall -arch=win32 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend -@ cdecl -arch=win64 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend -@ thiscall -arch=win32 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend -@ cdecl -arch=win64 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend -@ thiscall -arch=win32 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend -@ cdecl -arch=win64 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend -@ thiscall -arch=win32 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend -@ cdecl -arch=win64 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) basic_string_wchar_rend +@ thiscall -arch=win32 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rend +@ cdecl -arch=win64 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rend +@ thiscall -arch=win32 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rend +@ cdecl -arch=win64 ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_char_rend +@ thiscall -arch=win32 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend +@ cdecl -arch=win64 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend +@ thiscall -arch=win32 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend +@ cdecl -arch=win64 ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend +@ thiscall -arch=win32 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend +@ cdecl -arch=win64 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend +@ thiscall -arch=win32 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend +@ cdecl -arch=win64 ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ(ptr ptr) MSVCP_basic_string_wchar_rend @ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z(ptr long long ptr) basic_string_char_replace @ cdecl -arch=win64 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z(ptr long long long long) basic_string_char_replace_ch @ thiscall -arch=win32 ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z(ptr long long ptr long long) basic_string_char_replace_substr diff --git a/dlls/msvcp80/msvcp80_main.c b/dlls/msvcp80/msvcp80_main.c deleted file mode 100644 index 1d6333382ac..00000000000 --- a/dlls/msvcp80/msvcp80_main.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2010 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include - -#include "msvcp.h" - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(msvcp); - -#ifdef __i386__ - -#define DEFINE_VTBL_WRAPPER(off) \ - __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \ - "popl %eax\n\t" \ - "popl %ecx\n\t" \ - "pushl %eax\n\t" \ - "movl 0(%ecx), %eax\n\t" \ - "jmp *" #off "(%eax)\n\t") - -DEFINE_VTBL_WRAPPER(0); -DEFINE_VTBL_WRAPPER(4); -DEFINE_VTBL_WRAPPER(8); -DEFINE_VTBL_WRAPPER(12); -DEFINE_VTBL_WRAPPER(16); -DEFINE_VTBL_WRAPPER(20); -DEFINE_VTBL_WRAPPER(24); -DEFINE_VTBL_WRAPPER(28); -DEFINE_VTBL_WRAPPER(32); -DEFINE_VTBL_WRAPPER(36); -DEFINE_VTBL_WRAPPER(40); -DEFINE_VTBL_WRAPPER(44); -DEFINE_VTBL_WRAPPER(48); -DEFINE_VTBL_WRAPPER(52); -DEFINE_VTBL_WRAPPER(56); - -#endif - -void* (__cdecl *MSVCRT_operator_new)(MSVCP_size_t); -void (__cdecl *MSVCRT_operator_delete)(void*); -void* (__cdecl *MSVCRT_set_new_handler)(void*); - -static void init_cxx_funcs(void) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - if (sizeof(void *) > sizeof(int)) /* 64-bit has different names */ - { - MSVCRT_operator_new = (void*)GetProcAddress(hmod, "??2@YAPEAX_K@Z"); - MSVCRT_operator_delete = (void*)GetProcAddress(hmod, "??3@YAXPEAX@Z"); - MSVCRT_set_new_handler = (void*)GetProcAddress(hmod, "?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z"); - } - else - { - MSVCRT_operator_new = (void*)GetProcAddress(hmod, "??2@YAPAXI@Z"); - MSVCRT_operator_delete = (void*)GetProcAddress(hmod, "??3@YAXPAX@Z"); - MSVCRT_set_new_handler = (void*)GetProcAddress(hmod, "?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z"); - } -} - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - init_cxx_funcs(); - init_lockit(); - init_exception(hinstDLL); - init_locale(hinstDLL); - init_io(hinstDLL); - break; - case DLL_PROCESS_DETACH: - if (lpvReserved) break; - free_io(); - free_locale(); - free_lockit(); - break; - } - - return TRUE; -} - -/* ?_BADOFF@std@@3JB -> long const std::_BADOFF */ -/* ?_BADOFF@std@@3_JB -> __int64 const std::_BADOFF */ -const streamoff std_BADOFF = -1; - -/* ?_BADOFF_func@std@@YAABJXZ -> long const & __cdecl std::_BADOFF_func(void) */ -/* ?_BADOFF_func@std@@YAAEB_JXZ -> __int64 const & __ptr64 __cdecl std::_BADOFF_func(void) */ -const streamoff * __cdecl std_BADOFF_func(void) -{ - return &std_BADOFF; -} - -/* ?_Fpz@std@@3_JA __int64 std::_Fpz */ -__int64 std_Fpz = 0; - -/* ?_Fpz_func@std@@YAAA_JXZ -> __int64 & __cdecl std::_Fpz_func(void) */ -/* ?_Fpz_func@std@@YAAEA_JXZ -> __int64 & __ptr64 __cdecl std::_Fpz_func(void) */ -__int64 * __cdecl std_Fpz_func(void) -{ - return &std_Fpz; -} diff --git a/dlls/msvcp80/string.c b/dlls/msvcp80/string.c deleted file mode 100644 index 83dceac6f56..00000000000 --- a/dlls/msvcp80/string.c +++ /dev/null @@ -1,4456 +0,0 @@ -/* - * Copyright 2010 Piotr Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#include - -#include "msvcp.h" -#include "stdio.h" -#include "assert.h" - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(msvcp); - -/* _String_iterator and _String_const_iterator class */ -typedef struct { - basic_string_char *bstr; - const char *pos; -} String_iterator_char; - -typedef struct { - void *cont; - const basic_string_char *bstr; - const char *pos; -} basic_string_char_reverse_iter; - -typedef struct { - basic_string_wchar *bstr; - const wchar_t *pos; -} String_iterator_wchar; - -typedef struct { - void *cont; - const basic_string_wchar *bstr; - const wchar_t *pos; -} basic_string_wchar_reverse_iter; - -/* size_t_noverify structure */ -typedef struct { - MSVCP_size_t val; -} size_t_noverify; - -/* allocator class */ -typedef struct { - char empty_struct; -} allocator; - -/* char_traits */ -/* ?assign@?$char_traits@D@std@@SAXAADABD@Z */ -/* ?assign@?$char_traits@D@std@@SAXAEADAEBD@Z */ -void CDECL MSVCP_char_traits_char_assign(char *ch, const char *assign) -{ - *ch = *assign; -} - -/* ?eq@?$char_traits@D@std@@SA_NABD0@Z */ -/* ?eq@?$char_traits@D@std@@SA_NAEBD0@Z */ -MSVCP_bool CDECL MSVCP_char_traits_char_eq(const char *ch1, const char *ch2) -{ - return *ch1 == *ch2; -} - -/* ?lt@?$char_traits@D@std@@SA_NABD0@Z */ -/* ?lt@?$char_traits@D@std@@SA_NAEBD0@Z */ -MSVCP_bool CDECL MSVCP_char_traits_lt(const char *ch1, const char *ch2) -{ - return *ch1 < *ch2; -} - -/* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */ -/* ?compare@?$char_traits@D@std@@SAHPEBD0_K@Z */ -int CDECL MSVCP_char_traits_char_compare( - const char *s1, const char *s2, MSVCP_size_t count) -{ - int ret = memcmp(s1, s2, count); - return (ret>0 ? 1 : (ret<0 ? -1 : 0)); -} - -/* ?length@?$char_traits@D@std@@SAIPBD@Z */ -/* ?length@?$char_traits@D@std@@SA_KPEBD@Z */ -MSVCP_size_t CDECL MSVCP_char_traits_char_length(const char *str) -{ - return strlen(str); -} - -/* ?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */ -/* ?_Copy_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */ -char* CDECL MSVCP_char_traits_char__Copy_s(char *dest, - MSVCP_size_t size, const char *src, MSVCP_size_t count) -{ - if(!dest || !src || size */ -/* ?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z */ -/* ?assign@?$char_traits@_W@std@@SAXAEA_WAEB_W@Z */ -void CDECL MSVCP_char_traits_wchar_assign(wchar_t *ch, - const wchar_t *assign) -{ - *ch = *assign; -} - -/* ?eq@?$char_traits@_W@std@@SA_NAB_W0@Z */ -/* ?eq@?$char_traits@_W@std@@SA_NAEB_W0@Z */ -MSVCP_bool CDECL MSVCP_char_traits_wchar_eq(wchar_t *ch1, wchar_t *ch2) -{ - return *ch1 == *ch2; -} - -/* ?lt@?$char_traits@_W@std@@SA_NAB_W0@Z */ -/* ?lt@?$char_traits@_W@std@@SA_NAEB_W0@Z */ -MSVCP_bool CDECL MSVCP_char_traits_wchar_lt(const wchar_t *ch1, - const wchar_t *ch2) -{ - return *ch1 < *ch2; -} - -/* ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z */ -/* ?compare@?$char_traits@_W@std@@SAHPEB_W0_K@Z */ -int CDECL MSVCP_char_traits_wchar_compare(const wchar_t *s1, - const wchar_t *s2, MSVCP_size_t count) -{ - int ret = memcmp(s1, s2, count * sizeof(wchar_t)); - return (ret>0 ? 1 : (ret<0 ? -1 : 0)); -} - -/* ?length@?$char_traits@_W@std@@SAIPB_W@Z */ -/* ?length@?$char_traits@_W@std@@SA_KPEB_W@Z */ -MSVCP_size_t CDECL MSVCP_char_traits_wchar_length(const wchar_t *str) -{ - return wcslen((WCHAR*)str); -} - -/* ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */ -/* ?_Copy_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */ -wchar_t* CDECL MSVCP_char_traits_wchar__Copy_s(wchar_t *dest, - MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count) -{ - if(!dest || !src || size */ -/* ?assign@?$char_traits@G@std@@SAXAAGABG@Z */ -/* ?assign@?$char_traits@G@std@@SAXAEAGAEBG@Z */ -void CDECL MSVCP_char_traits_short_assign(unsigned short *ch, - const unsigned short *assign) -{ - *ch = *assign; -} - -/* ?eq@?$char_traits@G@std@@SA_NABG0@Z */ -/* ?eq@?$char_traits@G@std@@SA_NAEBG0@Z */ -MSVCP_bool CDECL MSVCP_char_traits_short_eq(const unsigned short *ch1, - const unsigned short *ch2) -{ - return *ch1 == *ch2; -} - -/* ?lt@?$char_traits@G@std@@SA_NABG0@Z */ -/* ?lt@?$char_traits@G@std@@SA_NAEBG0@Z */ -MSVCP_bool CDECL MSVCP_char_traits_short_lt(const unsigned short *ch1, - const unsigned short *ch2) -{ - return *ch1 < *ch2; -} - -/* ?compare@?$char_traits@G@std@@SAHPBG0I@Z */ -/* ?compare@?$char_traits@G@std@@SAHPEBG0_K@Z */ -int CDECL MSVCP_char_traits_short_compare(const unsigned short *s1, - const unsigned short *s2, MSVCP_size_t count) -{ - MSVCP_size_t i; - - for(i=0; i, allocator> */ -/* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB */ -/* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB */ -const MSVCP_size_t MSVCP_basic_string_char_npos = -1; - -/* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ */ -/* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAPEADXZ */ -DEFINE_THISCALL_WRAPPER(basic_string_char_ptr, 4) -char* __thiscall basic_string_char_ptr(basic_string_char *this) -{ - if(this->res < BUF_SIZE_CHAR) - return this->data.buf; - return this->data.ptr; -} - -/* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ */ -/* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEBAPEBDXZ */ -DEFINE_THISCALL_WRAPPER(basic_string_char_const_ptr, 4) -const char* __thiscall basic_string_char_const_ptr(const basic_string_char *this) -{ - if(this->res < BUF_SIZE_CHAR) - return this->data.buf; - return this->data.ptr; -} - -/* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXI@Z */ -/* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_eos, 8) -void __thiscall basic_string_char_eos(basic_string_char *this, MSVCP_size_t len) -{ - static const char nullbyte = '\0'; - - this->size = len; - MSVCP_char_traits_char_assign(basic_string_char_ptr(this)+len, &nullbyte); -} - -/* ?_Inside@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NPBD@Z */ -/* ?_Inside@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAA_NPEBD@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_inside, 8) -MSVCP_bool __thiscall basic_string_char_inside( - basic_string_char *this, const char *ptr) -{ - char *cstr = basic_string_char_ptr(this); - - return ptr>=cstr && ptrsize; -} - -/* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z */ -/* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_N_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_tidy, 12) -void __thiscall basic_string_char_tidy(basic_string_char *this, - MSVCP_bool built, MSVCP_size_t new_size) -{ - if(built && BUF_SIZE_CHAR<=this->res) { - char *ptr = this->data.ptr; - - if(new_size > 0) - MSVCP_char_traits_char__Copy_s(this->data.buf, BUF_SIZE_CHAR, ptr, new_size); - MSVCP_allocator_char_deallocate(this->allocator, ptr, this->res+1); - } - - this->res = BUF_SIZE_CHAR-1; - basic_string_char_eos(this, new_size); -} - -/* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z */ -/* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAA_N_K_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_grow, 12) -MSVCP_bool __thiscall basic_string_char_grow( - basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim) -{ - if(this->res < new_size) { - MSVCP_size_t new_res = new_size, len = this->size; - char *ptr; - - new_res |= 0xf; - - if(new_res/3 < this->res/2) - new_res = this->res + this->res/2; - - ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+1); - if(!ptr) - ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+1); - else - new_size = new_res; - if(!ptr) { - ERR("Out of memory\n"); - basic_string_char_tidy(this, TRUE, 0); - return FALSE; - } - - MSVCP_char_traits_char__Copy_s(ptr, new_size, - basic_string_char_ptr(this), this->size); - basic_string_char_tidy(this, TRUE, 0); - this->data.ptr = ptr; - this->res = new_size; - basic_string_char_eos(this, len); - } else if(trim && new_size < BUF_SIZE_CHAR) - basic_string_char_tidy(this, TRUE, - new_sizesize ? new_size : this->size); - else if(new_size == 0) - basic_string_char_eos(this, 0); - - return (new_size>0); -} - -/* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXII@Z */ -/* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_K0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 12) -void __thiscall basic_string_char__Copy(basic_string_char *this, - MSVCP_size_t new_size, MSVCP_size_t copy_len) -{ - TRACE("%p %lu %lu\n", this, new_size, copy_len); - - if(!basic_string_char_grow(this, new_size, FALSE)) - return; - basic_string_char_eos(this, copy_len); -} - -/* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KAIV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -/* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KA_KV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -MSVCP_size_t __cdecl MSVCP_basic_string_char_Pdif(String_iterator_char i1, String_iterator_char i2) -{ - TRACE("(%p %p) (%p %p)\n", i1.bstr, i1.pos, i2.bstr, i2.pos); - - if((!i1.bstr && i1.pos) || i1.bstr!=i2.bstr) { - _invalid_parameter(NULL, NULL, NULL, 0, 0); - return 0; - } - - return !i1.pos ? 0 : i1.pos-i2.pos; -} - -/* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */ -/* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8) -allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret) -{ - TRACE("%p\n", this); - return ret; -} - -/* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */ -/* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_erase( - basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len) -{ - TRACE("%p %lu %lu\n", this, pos, len); - - if(pos > this->size) - MSVCP__String_base_Xran(); - - if(len > this->size-pos) - len = this->size-pos; - - if(len) { - MSVCP_char_traits_char__Move_s(basic_string_char_ptr(this)+pos, - this->res-pos, basic_string_char_ptr(this)+pos+len, - this->size-pos-len); - basic_string_char_eos(this, this->size-len); - } - - return this; -} - -/* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -/* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter_range, 24) -String_iterator_char* __thiscall basic_string_char_erase_iter_range(basic_string_char *this, - String_iterator_char *ret, String_iterator_char beg, String_iterator_char end) -{ - MSVCP_size_t off; - - ret->bstr = this; - ret->pos = basic_string_char_ptr(this); - off = MSVCP_basic_string_char_Pdif(beg, *ret); - - MSVCP_basic_string_char_erase(this, off, MSVCP_basic_string_char_Pdif(end, beg)); - - ret->bstr = this; - ret->pos = basic_string_char_ptr(this)+off; - return ret; -} - -/* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -/* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 16) -String_iterator_char* __thiscall basic_string_char_erase_iter(basic_string_char *this, - String_iterator_char *ret, String_iterator_char pos) -{ - MSVCP_size_t off; - - ret->bstr = this; - ret->pos = basic_string_char_ptr(this); - off = MSVCP_basic_string_char_Pdif(pos, *ret); - - MSVCP_basic_string_char_erase(this, off, 1); - - ret->bstr = this; - ret->pos = basic_string_char_ptr(this)+off; - return ret; -} - -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */ -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_substr, 16) -basic_string_char* __thiscall MSVCP_basic_string_char_assign_substr( - basic_string_char *this, const basic_string_char *assign, - MSVCP_size_t pos, MSVCP_size_t len) -{ - TRACE("%p %p %lu %lu\n", this, assign, pos, len); - - if(assign->size < pos) - MSVCP__String_base_Xran(); - - if(len > assign->size-pos) - len = assign->size-pos; - - if(this == assign) { - MSVCP_basic_string_char_erase(this, pos+len, MSVCP_basic_string_char_npos); - MSVCP_basic_string_char_erase(this, 0, pos); - } else if(basic_string_char_grow(this, len, FALSE)) { - MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this), - this->res, basic_string_char_const_ptr(assign)+pos, len); - basic_string_char_eos(this, len); - } - - return this; -} - -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */ -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */ -/* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_assign( - basic_string_char *this, const basic_string_char *assign) -{ - return MSVCP_basic_string_char_assign_substr(this, assign, - 0, MSVCP_basic_string_char_npos); -} - -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */ -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr_len, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr_len( - basic_string_char *this, const char *str, MSVCP_size_t len) -{ - TRACE("%p %s %lu\n", this, debugstr_an(str, len), len); - - if(basic_string_char_inside(this, str)) - return MSVCP_basic_string_char_assign_substr(this, this, - str-basic_string_char_ptr(this), len); - else if(basic_string_char_grow(this, len, FALSE)) { - MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this), - this->res, str, len); - basic_string_char_eos(this, len); - } - - return this; -} - -/* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */ -/* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ch, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_assign_ch( - basic_string_char *this, char ch) -{ - return MSVCP_basic_string_char_assign_cstr_len(this, &ch, 1); -} - -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */ -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */ -/* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */ -/* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr( - basic_string_char *this, const char *str) -{ - return MSVCP_basic_string_char_assign_cstr_len(this, str, - MSVCP_char_traits_char_length(str)); -} - -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */ -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assignn, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_assignn( - basic_string_char *this, MSVCP_size_t count, char ch) -{ - TRACE("%p %ld %c\n", this, count, ch); - - basic_string_char_grow(this, count, FALSE); - MSVCP_char_traits_char_assignn(basic_string_char_ptr(this), count, ch); - basic_string_char_eos(this, count); - return this; -} - -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */ -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ptr_ptr, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_assign_ptr_ptr( - basic_string_char *this, const char *first, const char *last) -{ - return MSVCP_basic_string_char_assign_cstr_len(this, first, last-first); -} - -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -/* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_iter, 20) -basic_string_char* __thiscall MSVCP_basic_string_char_assign_iter(basic_string_char *this, - String_iterator_char beg, String_iterator_char end) -{ - return MSVCP_basic_string_char_assign_ptr_ptr(this, beg.pos, end.pos); -} - -/* ?_Chassign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXIID@Z */ -/* ?_Chassign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_K0D@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_Chassign, 16) -void __thiscall MSVCP_basic_string_char_Chassign(basic_string_char *this, - MSVCP_size_t off, MSVCP_size_t count, char ch) -{ - TRACE("%p %lu %lu %c\n", this, off, count, ch); - MSVCP_char_traits_char_assignn(basic_string_char_ptr(this)+off, count, ch); -} - -/* ?_Copy_s@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADIII@Z */ -/* ?_Copy_s@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K11@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_Copy_s, 20) -MSVCP_size_t __thiscall MSVCP_basic_string_char_Copy_s(const basic_string_char *this, - char *dest, MSVCP_size_t size, MSVCP_size_t count, MSVCP_size_t off) -{ - TRACE("%p %p %lu %lu %lu\n", this, dest, size, count, off); - - if(this->size < off) - MSVCP__String_base_Xran(); - - if(count > this->size-off) - count = this->size-off; - - MSVCP_char_traits_char__Copy_s(dest, size, - basic_string_char_const_ptr(this)+off, count); - return count; -} - -/* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */ -/* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16) -MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this, - char *dest, MSVCP_size_t count, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_Copy_s(this, dest, count, count, off); -} - -/* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */ -/* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */ -/* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */ -/* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_c_str, 4) -const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char *this) -{ - TRACE("%p\n", this); - return basic_string_char_const_ptr(this); -} - -/* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */ -/* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_capacity, 4) -MSVCP_size_t __thiscall MSVCP_basic_string_char_capacity(basic_string_char *this) -{ - TRACE("%p\n", this); - return this->res; -} - -/* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */ -/* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_reserve, 8) -void __thiscall MSVCP_basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size) -{ - MSVCP_size_t len; - - TRACE("%p %ld\n", this, size); - - len = this->size; - if(len > size) - return; - - if(basic_string_char_grow(this, size, TRUE)) - basic_string_char_eos(this, len); -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor, 4) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char *this) -{ - TRACE("%p\n", this); - - basic_string_char_tidy(this, FALSE, 0); - return this; -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_copy_ctor, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor( - basic_string_char *this, const basic_string_char *copy) -{ - TRACE("%p %p\n", this, copy); - - basic_string_char_tidy(this, FALSE, 0); - MSVCP_basic_string_char_assign(this, copy); - return this; -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr( - basic_string_char *this, const char *str) -{ - TRACE("%p %s\n", this, debugstr_a(str)); - - basic_string_char_tidy(this, FALSE, 0); - MSVCP_basic_string_char_assign_cstr(this, str); - return this; -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_alloc, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_alloc( - basic_string_char *this, const char *str, const void *alloc) -{ - return MSVCP_basic_string_char_ctor_cstr(this, str); -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDI@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len( - basic_string_char *this, const char *str, MSVCP_size_t len) -{ - TRACE("%p %s %ld\n", this, debugstr_an(str, len), len); - - basic_string_char_tidy(this, FALSE, 0); - MSVCP_basic_string_char_assign_cstr_len(this, str, len); - return this; -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len_alloc, 16) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len_alloc( - basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc) -{ - return MSVCP_basic_string_char_ctor_cstr_len(this, str, len); -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@II@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_substr, 16) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_substr( - basic_string_char *this, const basic_string_char *assign, - MSVCP_size_t pos, MSVCP_size_t len) -{ - TRACE("%p %p %lu %lu\n", this, assign, pos, len); - - basic_string_char_tidy(this, FALSE, 0); - MSVCP_basic_string_char_assign_substr(this, assign, pos, len); - return this; -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_substr_alloc, 20) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_substr_alloc( - basic_string_char *this, const basic_string_char *assign, - MSVCP_size_t pos, MSVCP_size_t len, const void *alloc) -{ - return MSVCP_basic_string_char_ctor_substr(this, assign, pos, len); -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_alloc, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_alloc( - basic_string_char *this, const void *alloc) -{ - TRACE("%p %p\n", this, alloc); - - basic_string_char_tidy(this, FALSE, 0); - return this; -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ID@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ch, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ch(basic_string_char *this, - MSVCP_size_t count, char ch) -{ - TRACE("%p %ld %c\n", this, count, ch); - - basic_string_char_tidy(this, FALSE, 0); - MSVCP_basic_string_char_assignn(this, count, ch); - return this; -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ch_alloc, 16) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ch_alloc(basic_string_char *this, - MSVCP_size_t count, char ch, const void *alloc) -{ - return MSVCP_basic_string_char_ctor_ch(this, count, ch); -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ptr_ptr, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ptr_ptr(basic_string_char *this, - const char *first, const char *last) -{ - return MSVCP_basic_string_char_ctor_cstr_len(this, first, last-first); -} - -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0@Z */ -/* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_iter, 20) -basic_string_char* __thiscall MSVCP_basic_string_char_ctor_iter(basic_string_char *this, - String_iterator_char beg, String_iterator_char end) -{ - return MSVCP_basic_string_char_ctor_cstr_len(this, beg.pos, end.pos-beg.pos); -} - -/* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */ -/* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_dtor, 4) -void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this) -{ - TRACE("%p\n", this); - basic_string_char_tidy(this, TRUE, 0); -} - -/* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */ -/* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */ -/* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */ -/* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_length, 4) -MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char *this) -{ - TRACE("%p\n", this); - return this->size; -} - -/* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */ -/* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4) -MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this) -{ - TRACE("%p\n", this); - return MSVCP_allocator_char_max_size(this->allocator)-1; -} - -/* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */ -/* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_empty, 4) -MSVCP_bool __thiscall MSVCP_basic_string_char_empty(basic_string_char *this) -{ - TRACE("%p\n", this); - return this->size == 0; -} - -/* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */ -/* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_swap, 8) -void __thiscall MSVCP_basic_string_char_swap(basic_string_char *this, basic_string_char *str) -{ - if(this != str) { - char tmp[sizeof(this->data)]; - const MSVCP_size_t size = this->size; - const MSVCP_size_t res = this->res; - - memcpy(tmp, this->data.buf, sizeof(this->data)); - memcpy(this->data.buf, str->data.buf, sizeof(this->data)); - memcpy(str->data.buf, tmp, sizeof(this->data)); - - this->size = str->size; - this->res = str->res; - - str->size = size; - str->res = res; - } -} - -/* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */ -/* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_substr, 16) -basic_string_char* __thiscall MSVCP_basic_string_char_substr(basic_string_char *this, - basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len) -{ - TRACE("%p %lu %lu\n", this, off, len); - - MSVCP_basic_string_char_ctor_substr(ret, this, off, len); - return ret; -} - -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */ -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_substr, 16) -basic_string_char* __thiscall MSVCP_basic_string_char_append_substr(basic_string_char *this, - const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count) -{ - TRACE("%p %p %lu %lu\n", this, append, offset, count); - - if(append->size < offset) - MSVCP__String_base_Xran(); - - if(count > append->size-offset) - count = append->size-offset; - - if(MSVCP_basic_string_char_npos-this->size<=count || this->size+countsize) - MSVCP__String_base_Xlen(); - - if(basic_string_char_grow(this, this->size+count, FALSE)) { - MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this)+this->size, - this->res-this->size, basic_string_char_const_ptr(append)+offset, count); - basic_string_char_eos(this, this->size+count); - } - - return this; -} - -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */ -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */ -/* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */ -/* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_append( - basic_string_char *this, const basic_string_char *append) -{ - return MSVCP_basic_string_char_append_substr(this, append, - 0, MSVCP_basic_string_char_npos); -} - -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */ -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr_len, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr_len( - basic_string_char *this, const char *append, MSVCP_size_t count) -{ - TRACE("%p %s %lu\n", this, debugstr_an(append, count), count); - - if(basic_string_char_inside(this, append)) - return MSVCP_basic_string_char_append_substr(this, this, - append-basic_string_char_ptr(this), count); - - if(MSVCP_basic_string_char_npos-this->size<=count || this->size+countsize) - MSVCP__String_base_Xlen(); - - if(basic_string_char_grow(this, this->size+count, FALSE)) { - MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this)+this->size, - this->res-this->size, append, count); - basic_string_char_eos(this, this->size+count); - } - - return this; -} - -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */ -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */ -/* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */ -/* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr( - basic_string_char *this, const char *append) -{ - return MSVCP_basic_string_char_append_cstr_len(this, append, - MSVCP_char_traits_char_length(append)); -} - -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */ -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_beg_end, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_append_beg_end( - basic_string_char *this, const char *beg, const char *end) -{ - return MSVCP_basic_string_char_append_cstr_len(this, beg, end-beg); -} - -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_iter, 20) -basic_string_char* __thiscall MSVCP_basic_string_char_append_iter( - basic_string_char *this, String_iterator_char beg, String_iterator_char end) -{ - return MSVCP_basic_string_char_append_cstr_len(this, beg.pos, end.pos-beg.pos); -} - -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */ -/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_len_ch, 12) -basic_string_char* __thiscall MSVCP_basic_string_char_append_len_ch( - basic_string_char *this, MSVCP_size_t count, char ch) -{ - TRACE("%p %lu %c\n", this, count, ch); - - if(MSVCP_basic_string_char_npos-this->size <= count) - MSVCP__String_base_Xlen(); - - if(basic_string_char_grow(this, this->size+count, FALSE)) { - MSVCP_char_traits_char_assignn(basic_string_char_ptr(this)+this->size, count, ch); - basic_string_char_eos(this, this->size+count); - } - - return this; -} - -/* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */ -/* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */ -/* ?push_back@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXD@Z */ -/* ?push_back@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_ch, 8) -basic_string_char* __thiscall MSVCP_basic_string_char_append_ch( - basic_string_char *this, char ch) -{ - return MSVCP_basic_string_char_append_len_ch(this, 1, ch); -} - -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */ -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */ -basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_cstr(basic_string_char *ret, - const basic_string_char *left, const char *right) -{ - TRACE("%p %s\n", left, debugstr_a(right)); - - MSVCP_basic_string_char_copy_ctor(ret, left); - MSVCP_basic_string_char_append_cstr(ret, right); - return ret; -} - -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */ -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */ -basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_cstr_bstr(basic_string_char *ret, - const char *left, const basic_string_char *right) -{ - TRACE("%s %p\n", debugstr_a(left), right); - - MSVCP_basic_string_char_ctor_cstr(ret, left); - MSVCP_basic_string_char_append(ret, right); - return ret; -} - -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */ -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */ -basic_string_char* __cdecl MSVCP_basic_string_char_concatenate(basic_string_char *ret, - const basic_string_char *left, const basic_string_char *right) -{ - TRACE("%p %p\n", left, right); - - MSVCP_basic_string_char_copy_ctor(ret, left); - MSVCP_basic_string_char_append(ret, right); - return ret; -} - -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */ -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */ -basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_ch(basic_string_char *ret, - const basic_string_char *left, char right) -{ - TRACE("%p %c\n", left, right); - - MSVCP_basic_string_char_copy_ctor(ret, left); - MSVCP_basic_string_char_append_ch(ret, right); - return ret; -} - -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */ -/* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */ -basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_ch_bstr(basic_string_char *ret, - char left, const basic_string_char *right) -{ - TRACE("%c %p\n", left, right); - - MSVCP_basic_string_char_ctor_cstr_len(ret, &left, 1); - MSVCP_basic_string_char_append(ret, right); - return ret; -} - -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */ -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr_len, 20) -int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len( - const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num, - const char *str, MSVCP_size_t count) -{ - int ans; - - TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count); - - if(this->size < pos) - MSVCP__String_base_Xran(); - - if(num > this->size-pos) - num = this->size-pos; - - ans = MSVCP_char_traits_char_compare(basic_string_char_const_ptr(this)+pos, - str, num>count ? count : num); - if(ans) - return ans; - - if(num > count) - ans = 1; - else if(num < count) - ans = -1; - return ans; -} - -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */ -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr, 16) -int __thiscall MSVCP_basic_string_char_compare_substr_cstr(const basic_string_char *this, - MSVCP_size_t pos, MSVCP_size_t num, const char *str) -{ - return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num, - str, MSVCP_char_traits_char_length(str)); -} - -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */ -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_cstr, 8) -int __thiscall MSVCP_basic_string_char_compare_cstr( - const basic_string_char *this, const char *str) -{ - return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size, - str, MSVCP_char_traits_char_length(str)); -} - -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */ -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_substr, 24) -int __thiscall MSVCP_basic_string_char_compare_substr_substr( - const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num, - const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count) -{ - TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count); - - if(compare->size < off) - MSVCP__String_base_Xran(); - - if(count > compare->size-off) - count = compare->size-off; - - return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num, - basic_string_char_const_ptr(compare)+off, count); -} - -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */ -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr, 16) -int __thiscall MSVCP_basic_string_char_compare_substr( - const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num, - const basic_string_char *compare) -{ - return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num, - basic_string_char_const_ptr(compare), compare->size); -} - -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */ -/* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare, 8) -int __thiscall MSVCP_basic_string_char_compare( - const basic_string_char *this, const basic_string_char *compare) -{ - return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size, - basic_string_char_const_ptr(compare), compare->size); -} - -/* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -/* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_equal( - const basic_string_char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare(left, right) == 0; -} - -/* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */ -/* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_equal_str_cstr( - const basic_string_char *left, const char *right) -{ - return MSVCP_basic_string_char_compare_cstr(left, right) == 0; -} - -/* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_equal_cstr_str( - const char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare_cstr(right, left) == 0; -} - -/* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -/* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal( - const basic_string_char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare(left, right) != 0; -} - -/* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */ -/* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_str_cstr( - const basic_string_char *left, const char *right) -{ - return MSVCP_basic_string_char_compare_cstr(left, right) != 0; -} - -/* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_cstr_str( - const char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare_cstr(right, left) != 0; -} - -/* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -/* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_lower( - const basic_string_char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare(left, right) < 0; -} - -/* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */ -/* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_lower_bstr_cstr( - const basic_string_char *left, const char *right) -{ - return MSVCP_basic_string_char_compare_cstr(left, right) < 0; -} - -/* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_lower_cstr_bstr( - const char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare_cstr(right, left) > 0; -} - -/* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -/* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_leq( - const basic_string_char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare(left, right) <= 0; -} - -/* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */ -/* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_leq_bstr_cstr( - const basic_string_char *left, const char *right) -{ - return MSVCP_basic_string_char_compare_cstr(left, right) <= 0; -} - -/* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_leq_cstr_bstr( - const char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare_cstr(right, left) >= 0; -} - -/* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -/* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_greater( - const basic_string_char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare(left, right) > 0; -} - -/* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */ -/* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_greater_bstr_cstr( - const basic_string_char *left, const char *right) -{ - return MSVCP_basic_string_char_compare_cstr(left, right) > 0; -} - -/* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_greater_cstr_bstr( - const char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare_cstr(right, left) < 0; -} - -/* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -/* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_geq( - const basic_string_char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare(left, right) >= 0; -} - -/* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */ -/* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_geq_bstr_cstr( - const basic_string_char *left, const char *right) -{ - return MSVCP_basic_string_char_compare_cstr(left, right) >= 0; -} - -/* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -/* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_char_geq_cstr_bstr( - const char *left, const basic_string_char *right) -{ - return MSVCP_basic_string_char_compare_cstr(right, left) <= 0; -} - -/* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */ -/* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_substr( - const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len) -{ - const char *p, *end; - - TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len); - - if(len==0 && pos<=this->size) - return pos; - if(pos>=this->size || len>this->size) - return MSVCP_basic_string_char_npos; - - end = basic_string_char_const_ptr(this)+this->size-len+1; - for(p=basic_string_char_const_ptr(this)+pos; psize); -} - -/* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */ -/* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_ch( - const basic_string_char *this, char ch, MSVCP_size_t pos) -{ - return MSVCP_basic_string_char_find_cstr_substr(this, &ch, pos, 1); -} - -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */ -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr( - const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len) -{ - const char *p, *end; - - TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len); - - if(len==0) - return possize ? pos : this->size; - - if(len > this->size) - return MSVCP_basic_string_char_npos; - - if(pos > this->size-len+1) - pos = this->size-len+1; - end = basic_string_char_const_ptr(this); - for(p=end+pos; p>=end; p--) { - if(*p==*find && !MSVCP_char_traits_char_compare(p, find, len)) - return p-basic_string_char_const_ptr(this); - } - - return MSVCP_basic_string_char_npos; -} - -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */ -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_off, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_off( - const basic_string_char *this, const char *find, MSVCP_size_t pos) -{ - return MSVCP_basic_string_char_rfind_cstr_substr(this, find, pos, - MSVCP_char_traits_char_length(find)); -} - -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */ -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_off, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_off( - const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_rfind_cstr_substr(this, - basic_string_char_const_ptr(find), off, find->size); -} - -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */ -/* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_ch( - const basic_string_char *this, char ch, MSVCP_size_t pos) -{ - return MSVCP_basic_string_char_rfind_cstr_substr(this, &ch, pos, 1); -} - -/* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */ -/* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr_substr( - const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const char *p, *end; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - if(len>0 && offsize) { - end = basic_string_char_const_ptr(this)+this->size; - for(p=basic_string_char_const_ptr(this)+off; psize); -} - -/* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */ -/* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr( - const basic_string_char *this, const char *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_first_of_cstr_substr( - this, find, off, MSVCP_char_traits_char_length(find)); -} - -/* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */ -/* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_ch( - const basic_string_char *this, char ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1); -} - -/* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */ -/* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr_substr( - const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const char *p, *end; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - if(offsize) { - end = basic_string_char_const_ptr(this)+this->size; - for(p=basic_string_char_const_ptr(this)+off; psize); -} - -/* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */ -/* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr( - const basic_string_char *this, const char *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_first_not_of_cstr_substr( - this, find, off, MSVCP_char_traits_char_length(find)); -} - -/* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */ -/* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_ch( - const basic_string_char *this, char ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1); -} - -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */ -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr_substr( - const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const char *p, *beg; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - if(len>0 && this->size>0) { - if(off >= this->size) - off = this->size-1; - - beg = basic_string_char_const_ptr(this); - for(p=beg+off; p>=beg; p--) - if(MSVCP_char_traits_char_find(find, len, p)) - return p-beg; - } - - return MSVCP_basic_string_char_npos; -} - -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */ -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of( - const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_last_of_cstr_substr(this, - basic_string_char_const_ptr(find), off, find->size); -} - -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */ -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr( - const basic_string_char *this, const char *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_last_of_cstr_substr( - this, find, off, MSVCP_char_traits_char_length(find)); -} - -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */ -/* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_ch( - const basic_string_char *this, char ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1); -} - -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */ -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr_substr( - const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const char *p, *beg; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - if(len>0 && this->size>0) { - if(off >= this->size) - off = this->size-1; - - beg = basic_string_char_const_ptr(this); - for(p=beg+off; p>=beg; p--) - if(!MSVCP_char_traits_char_find(find, len, p)) - return p-beg; - } - - return MSVCP_basic_string_char_npos; -} - -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */ -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of( - const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this, - basic_string_char_const_ptr(find), off, find->size); -} - -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */ -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr( - const basic_string_char *this, const char *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_last_not_of_cstr_substr( - this, find, off, MSVCP_char_traits_char_length(find)); -} - -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */ -/* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_ch( - const basic_string_char *this, char ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1); -} - -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */ -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at, 8) -char* __thiscall MSVCP_basic_string_char_operator_at( - basic_string_char *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - assert(this->size >= pos); - return basic_string_char_ptr(this)+pos; -} - -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */ -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_const_operator_at, 8) -const char* __thiscall MSVCP_basic_string_char_const_operator_at( - const basic_string_char *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - assert(this->size >= pos); - return basic_string_char_const_ptr(this)+pos; -} - -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEADU_Size_type_nosscl@01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at_noverify, 8) -char* __thiscall MSVCP_basic_string_char_operator_at_noverify( - basic_string_char *this, size_t_noverify pos) -{ - TRACE("%p %lu\n", this, pos.val); - return basic_string_char_ptr(this)+pos.val; -} - -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBDU_Size_type_nosscl@01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_const_at_noverify, 8) -const char* __thiscall MSVCP_basic_string_char_operator_const_at_noverify( - const basic_string_char *this, size_t_noverify pos) -{ - TRACE("%p %lu\n", this, pos.val); - return basic_string_char_const_ptr(this)+pos.val; -} - -/* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */ -/* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_at, 8) -char* __thiscall MSVCP_basic_string_char_at( - basic_string_char *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - if(this->size <= pos) - MSVCP__String_base_Xran(); - - return basic_string_char_ptr(this)+pos; -} - -/* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */ -/* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_const_at, 8) -const char* __thiscall MSVCP_basic_string_char_const_at( - const basic_string_char *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - if(this->size <= pos) - MSVCP__String_base_Xran(); - - return basic_string_char_const_ptr(this)+pos; -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20) -basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this, - MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len) -{ - MSVCP_size_t inside_pos = -1; - char *ptr = basic_string_char_ptr(this); - - TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len); - - if(this->size < off) - MSVCP__String_base_Xran(); - - if(len > this->size-off) - len = this->size-off; - - if(MSVCP_basic_string_char_npos-str_len <= this->size-len) - MSVCP__String_base_Xlen(); - - if(basic_string_char_inside(this, str)) - inside_pos = str-ptr; - - if(len < str_len) { - basic_string_char_grow(this, this->size-len+str_len, FALSE); - ptr = basic_string_char_ptr(this); - } - - if(inside_pos == -1) { - memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char)); - memcpy(ptr+off, str, str_len*sizeof(char)); - } else if(len >= str_len) { - memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char)); - memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char)); - } else { - MSVCP_size_t size; - - memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char)); - - if(inside_pos < off+len) { - size = off+len-inside_pos; - if(size > str_len) - size = str_len; - memmove(ptr+off, ptr+inside_pos, size*sizeof(char)); - } else { - size = 0; - } - - if(str_len > size) - memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char)); - } - - basic_string_char_eos(this, this->size-len+str_len); - return this; -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16) -basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this, - MSVCP_size_t off, MSVCP_size_t len, const char *str) -{ - return basic_string_char_replace_cstr_len(this, off, len, str, - MSVCP_char_traits_char_length(str)); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24) -basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off, - MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len) -{ - if(str->size < str_off) - MSVCP__String_base_Xran(); - - if(str_len > str->size-str_off) - str_len = str->size-str_off; - - return basic_string_char_replace_cstr_len(this, off, len, - basic_string_char_const_ptr(str)+str_off, str_len); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16) -basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this, - MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str) -{ - return basic_string_char_replace_cstr_len(this, off, len, - basic_string_char_const_ptr(str), str->size); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20) -basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this, - MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch) -{ - char *ptr = basic_string_char_ptr(this); - - TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch); - - if(this->size < off) - MSVCP__String_base_Xran(); - - if(len > this->size-off) - len = this->size-off; - - if(MSVCP_basic_string_char_npos-count <= this->size-len) - MSVCP__String_base_Xlen(); - - if(len < count) { - basic_string_char_grow(this, this->size-len+count, FALSE); - ptr = basic_string_char_ptr(this); - } - - memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char)); - MSVCP_char_traits_char_assignn(ptr+off, count, ch); - basic_string_char_eos(this, this->size-len+count); - - return this; -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@000@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@000@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 36) -basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this, - String_iterator_char beg, String_iterator_char end, - String_iterator_char res_beg, String_iterator_char res_end) -{ - String_iterator_char begin = { this, basic_string_char_ptr(this) }; - return basic_string_char_replace_cstr_len(this, - MSVCP_basic_string_char_Pdif(beg, begin), MSVCP_basic_string_char_Pdif(end, beg), - res_beg.pos, MSVCP_basic_string_char_Pdif(res_end, res_beg)); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0ABV12@@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 24) -basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this, - String_iterator_char beg, String_iterator_char end, const basic_string_char *str) -{ - String_iterator_char begin = { this, basic_string_char_ptr(this) }; - return basic_string_char_replace(this, MSVCP_basic_string_char_Pdif(beg, begin), - MSVCP_basic_string_char_Pdif(end, beg), str); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0ID@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0_KD@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_ch, 28) -basic_string_char* __thiscall basic_string_char_replace_iter_ch(basic_string_char *this, - String_iterator_char beg, String_iterator_char end, MSVCP_size_t count, char ch) -{ - String_iterator_char begin = { this, basic_string_char_ptr(this) }; - return basic_string_char_replace_ch(this, MSVCP_basic_string_char_Pdif(beg, begin), - MSVCP_basic_string_char_Pdif(end, beg), count, ch); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PBD1@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PEBD1@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_ptr_ptr, 28) -basic_string_char* __thiscall basic_string_char_replace_iter_ptr_ptr(basic_string_char *this, - String_iterator_char beg, String_iterator_char end, - const char *res_beg, const char *res_end) -{ - String_iterator_char begin = { this, basic_string_char_ptr(this) }; - return basic_string_char_replace_cstr_len(this, MSVCP_basic_string_char_Pdif(beg, begin), - MSVCP_basic_string_char_Pdif(end, beg), res_beg, res_end-res_beg); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PBD@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PEBD@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 24) -basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this, - String_iterator_char beg, String_iterator_char end, const char *str) -{ - String_iterator_char begin = { this, basic_string_char_ptr(this) }; - return basic_string_char_replace_cstr(this, MSVCP_basic_string_char_Pdif(beg, begin), - MSVCP_basic_string_char_Pdif(end, beg), str); -} - -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PBDI@Z */ -/* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PEBD_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 28) -basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this, - String_iterator_char beg, String_iterator_char end, const char *str, MSVCP_size_t len) -{ - String_iterator_char begin = { this, basic_string_char_ptr(this) }; - return basic_string_char_replace_cstr_len(this, MSVCP_basic_string_char_Pdif(beg, begin), - MSVCP_basic_string_char_Pdif(end, beg), str, len); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12) -basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this, - MSVCP_size_t off, const basic_string_char *str) -{ - return basic_string_char_replace(this, off, 0, str); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20) -basic_string_char* __thiscall basic_string_char_insert_substr( - basic_string_char *this, MSVCP_size_t off, const basic_string_char *str, - MSVCP_size_t str_off, MSVCP_size_t str_count) -{ - return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12) -basic_string_char* __thiscall basic_string_char_insert_cstr( - basic_string_char *this, MSVCP_size_t off, const char *str) -{ - return basic_string_char_replace_cstr(this, off, 0, str); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16) -basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this, - MSVCP_size_t off, const char *str, MSVCP_size_t str_len) -{ - return basic_string_char_replace_cstr_len(this, off, 0, str, str_len); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16) -basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this, - MSVCP_size_t off, MSVCP_size_t count, char ch) -{ - return basic_string_char_replace_ch(this, off, 0, count, ch); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@ID@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@_KD@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 20) -void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this, - String_iterator_char where, MSVCP_size_t count, char ch) -{ - String_iterator_char iter = { this, basic_string_char_ptr(this) }; - MSVCP_size_t off = MSVCP_basic_string_char_Pdif(where, iter); - - basic_string_char_insert_chn(this, off, count, ch); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@D@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@D@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 20) -String_iterator_char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, - String_iterator_char *ret, String_iterator_char where, char ch) -{ - MSVCP_size_t off; - - ret->bstr = this; - ret->pos = basic_string_char_ptr(this); - off = MSVCP_basic_string_char_Pdif(where, *ret); - - basic_string_char_insert_chn(this, off, 1, ch); - ret->pos = basic_string_char_ptr(this)+off; - return ret; -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_null, 16) -String_iterator_char* __thiscall basic_string_char_insert_iter_null(basic_string_char *this, - String_iterator_char *ret, String_iterator_char where) -{ - return basic_string_char_insert_iter_ch(this, ret, where, 0); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@00@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@00@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_beg_end, 28) -void __thiscall basic_string_char_insert_iter_beg_end(basic_string_char *this, - String_iterator_char where, String_iterator_char beg, String_iterator_char end) -{ - basic_string_char_replace_iter_iter(this, where, where, beg, end); -} - -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD1@Z */ -/* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD1@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ptr_ptr, 20) -void __thiscall basic_string_char_insert_iter_ptr_ptr(basic_string_char *this, - String_iterator_char where, const char *beg, const char *end) -{ - basic_string_char_replace_iter_ptr_ptr(this, where, where, beg, end); -} - -/* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */ -/* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize_ch, 12) -void __thiscall MSVCP_basic_string_char_resize_ch( - basic_string_char *this, MSVCP_size_t size, char ch) -{ - TRACE("%p %lu %c\n", this, size, ch); - - if(size <= this->size) - MSVCP_basic_string_char_erase(this, size, this->size); - else - MSVCP_basic_string_char_append_len_ch(this, size-this->size, ch); -} - -/* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */ -/* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize, 8) -void __thiscall MSVCP_basic_string_char_resize( - basic_string_char *this, MSVCP_size_t size) -{ - MSVCP_basic_string_char_resize_ch(this, size, '\0'); -} - -/* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */ -/* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_clear, 4) -void __thiscall MSVCP_basic_string_char_clear(basic_string_char *this) -{ - basic_string_char_eos(this, 0); -} - -/* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_begin, 8) -String_iterator_char* __thiscall MSVCP_basic_string_char_begin( - basic_string_char *this, String_iterator_char *ret) -{ - TRACE("%p\n", this); - - ret->bstr = this; - ret->pos = basic_string_char_const_ptr(this); - return ret; -} - -/* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -/* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_end, 8) -String_iterator_char* __thiscall MSVCP_basic_string_char_end( - basic_string_char *this, String_iterator_char *ret) -{ - TRACE("%p\n", this); - - ret->bstr = this; - ret->pos = basic_string_char_const_ptr(this)+this->size; - return ret; -} - -/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8) -basic_string_char_reverse_iter* __thiscall basic_string_char_rbegin(const basic_string_char *this, basic_string_char_reverse_iter *ret) -{ - ret->cont = NULL; - ret->bstr = this; - ret->pos = basic_string_char_const_ptr(this)+this->size; - return ret; -} - -/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8) -basic_string_char_reverse_iter* __thiscall basic_string_char_rend(const basic_string_char *this, basic_string_char_reverse_iter *ret) -{ - ret->cont = NULL; - ret->bstr = this; - ret->pos = basic_string_char_const_ptr(this); - return ret; -} - -/* basic_string, allocator> */ -/* basic_string, allocator> */ -/* ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2IB */ -/* ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2_KB */ -/* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */ -/* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */ -const MSVCP_size_t MSVCP_basic_string_wchar_npos = -1; - -/* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEPA_WXZ */ -/* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAPEA_WXZ */ -/* ?_Myptr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEPAGXZ */ -/* ?_Myptr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAPEAGXZ */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_ptr, 4) -wchar_t* __thiscall basic_string_wchar_ptr(basic_string_wchar *this) -{ - if(this->res < BUF_SIZE_WCHAR) - return this->data.buf; - return this->data.ptr; -} - -/* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IBEPB_WXZ */ -/* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEBAPEB_WXZ */ -/* ?_Myptr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IBEPBGXZ */ -/* ?_Myptr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEBAPEBGXZ */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_const_ptr, 4) -const wchar_t* __thiscall basic_string_wchar_const_ptr(const basic_string_wchar *this) -{ - if(this->res < BUF_SIZE_WCHAR) - return this->data.buf; - return this->data.ptr; -} - -/* ?_Eos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXI@Z */ -/* ?_Eos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_K@Z */ -/* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXI@Z */ -/* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAX_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_eos, 8) -void __thiscall basic_string_wchar_eos(basic_string_wchar *this, MSVCP_size_t len) -{ - static const wchar_t nullbyte_w = '\0'; - - this->size = len; - MSVCP_char_traits_wchar_assign(basic_string_wchar_ptr(this)+len, &nullbyte_w); -} - -/* ?_Inside@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAE_NPB_W@Z */ -/* ?_Inside@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAA_NPEB_W@Z */ -/* ?_Inside@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAE_NPBG@Z */ -/* ?_Inside@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAA_NPEBG@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_inside, 8) -MSVCP_bool __thiscall basic_string_wchar_inside( - basic_string_wchar *this, const wchar_t *ptr) -{ - wchar_t *cstr = basic_string_wchar_ptr(this); - - return ptr>=cstr && ptrsize; -} - -/* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEX_NI@Z */ -/* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_N_K@Z */ -/* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEX_NI@Z */ -/* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAX_N_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_tidy, 12) -void __thiscall basic_string_wchar_tidy(basic_string_wchar *this, - MSVCP_bool built, MSVCP_size_t new_size) -{ - if(built && BUF_SIZE_WCHAR<=this->res) { - wchar_t *ptr = this->data.ptr; - - if(new_size > 0) - MSVCP_char_traits_wchar__Copy_s(this->data.buf, BUF_SIZE_WCHAR, ptr, new_size); - MSVCP_allocator_wchar_deallocate(this->allocator, ptr, this->res+1); - } - - this->res = BUF_SIZE_WCHAR-1; - basic_string_wchar_eos(this, new_size); -} - -/* ?_Grow@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAE_NI_N@Z */ -/* ?_Grow@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAA_N_K_N@Z */ -/* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAE_NI_N@Z */ -/* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAA_N_K_N@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_grow, 12) -MSVCP_bool __thiscall basic_string_wchar_grow( - basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim) -{ - if(this->res < new_size) { - MSVCP_size_t new_res = new_size, len = this->size; - wchar_t *ptr; - - new_res |= 0xf; - - if(new_res/3 < this->res/2) - new_res = this->res + this->res/2; - - ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+1); - if(!ptr) - ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+1); - else - new_size = new_res; - if(!ptr) { - ERR("Out of memory\n"); - basic_string_wchar_tidy(this, TRUE, 0); - return FALSE; - } - - MSVCP_char_traits_wchar__Copy_s(ptr, new_size, - basic_string_wchar_ptr(this), this->size); - basic_string_wchar_tidy(this, TRUE, 0); - this->data.ptr = ptr; - this->res = new_size; - basic_string_wchar_eos(this, len); - } else if(trim && new_size < BUF_SIZE_WCHAR) - basic_string_wchar_tidy(this, TRUE, - new_sizesize ? new_size : this->size); - else if(new_size == 0) - basic_string_wchar_eos(this, 0); - - return (new_size>0); -} - -/* ?_Copy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXII@Z */ -/* ?_Copy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_K0@Z */ -/* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXII@Z */ -/* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAX_K0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 12) -void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, - MSVCP_size_t new_size, MSVCP_size_t copy_len) -{ - TRACE("%p %lu %lu\n", this, new_size, copy_len); - - if(!basic_string_wchar_grow(this, new_size, FALSE)) - return; - basic_string_wchar_eos(this, copy_len); -} - -/* ?_Pdif@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@KAIV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?_Pdif@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@KA_KV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@KAIV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -/* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@KA_KV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -MSVCP_size_t __cdecl MSVCP_basic_string_wchar_Pdif(String_iterator_wchar i1, String_iterator_wchar i2) -{ - TRACE("(%p %p) (%p %p)\n", i1.bstr, i1.pos, i2.bstr, i2.pos); - - if((!i1.bstr && i1.pos) || i1.bstr!=i2.bstr) { - _invalid_parameter(NULL, NULL, NULL, 0, 0); - return 0; - } - - return !i1.pos ? 0 : i1.pos-i2.pos; -} - -/* ?get_allocator@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$allocator@_W@2@XZ */ -/* ?get_allocator@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$allocator@_W@2@XZ */ -/* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */ -/* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8) -allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret) -{ - TRACE("%p\n", this); - return ret; -} - -/* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@II@Z */ -/* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0@Z */ -/* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */ -/* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_erase, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_erase( - basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len) -{ - TRACE("%p %lu %lu\n", this, pos, len); - - if(pos > this->size) - MSVCP__String_base_Xran(); - - if(len > this->size-pos) - len = this->size-pos; - - if(len) { - MSVCP_char_traits_wchar__Move_s(basic_string_wchar_ptr(this)+pos, - this->res-pos, basic_string_wchar_ptr(this)+pos+len, - this->size-pos-len); - basic_string_wchar_eos(this, this->size-len); - } - - return this; -} - -/* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -/* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter_range, 24) -String_iterator_wchar* __thiscall basic_string_wchar_erase_iter_range(basic_string_wchar *this, - String_iterator_wchar *ret, String_iterator_wchar beg, String_iterator_wchar end) -{ - MSVCP_size_t off; - - ret->bstr = this; - ret->pos = basic_string_wchar_ptr(this); - off = MSVCP_basic_string_wchar_Pdif(beg, *ret); - - MSVCP_basic_string_wchar_erase(this, off, MSVCP_basic_string_wchar_Pdif(end, beg)); - - ret->bstr = this; - ret->pos = basic_string_wchar_ptr(this)+off; - return ret; -} - -/* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -/* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 16) -String_iterator_wchar* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, - String_iterator_wchar *ret, String_iterator_wchar pos) -{ - MSVCP_size_t off; - - ret->bstr = this; - ret->pos = basic_string_wchar_ptr(this); - off = MSVCP_basic_string_wchar_Pdif(pos, *ret); - - MSVCP_basic_string_wchar_erase(this, off, 1); - - ret->bstr = this; - ret->pos = basic_string_wchar_ptr(this)+off; - return ret; -} - -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */ -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_substr, 16) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_substr( - basic_string_wchar *this, const basic_string_wchar *assign, - MSVCP_size_t pos, MSVCP_size_t len) -{ - TRACE("%p %p %lu %lu\n", this, assign, pos, len); - - if(assign->size < pos) - MSVCP__String_base_Xran(); - - if(len > assign->size-pos) - len = assign->size-pos; - - if(this == assign) { - MSVCP_basic_string_wchar_erase(this, pos+len, MSVCP_basic_string_wchar_npos); - MSVCP_basic_string_wchar_erase(this, 0, pos); - } else if(basic_string_wchar_grow(this, len, FALSE)) { - MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this), - this->res, basic_string_wchar_const_ptr(assign)+pos, len); - basic_string_wchar_eos(this, len); - } - - return this; -} - -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z */ -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z */ -/* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */ -/* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign( - basic_string_wchar *this, const basic_string_wchar *assign) -{ - return MSVCP_basic_string_wchar_assign_substr(this, assign, - 0, MSVCP_basic_string_wchar_npos); -} - -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_WI@Z */ -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W_K@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr_len, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr_len( - basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len) -{ - TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len); - - if(basic_string_wchar_inside(this, str)) - return MSVCP_basic_string_wchar_assign_substr(this, this, - str-basic_string_wchar_ptr(this), len); - else if(basic_string_wchar_grow(this, len, FALSE)) { - MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this), - this->res, str, len); - basic_string_wchar_eos(this, len); - } - - return this; -} - -/* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@_W@Z */ -/* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@_W@Z */ -/* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */ -/* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ch, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ch( - basic_string_wchar *this, wchar_t ch) -{ - return MSVCP_basic_string_wchar_assign_cstr_len(this, &ch, 1); -} - -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W@Z */ -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W@Z */ -/* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@PB_W@Z */ -/* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@PEB_W@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */ -/* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */ -/* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr( - basic_string_wchar *this, const wchar_t *str) -{ - return MSVCP_basic_string_wchar_assign_cstr_len(this, str, - MSVCP_char_traits_wchar_length(str)); -} - -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@Z */ -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K_W@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assignn, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assignn( - basic_string_wchar *this, MSVCP_size_t count, wchar_t ch) -{ - TRACE("%p %ld %c\n", this, count, ch); - - basic_string_wchar_grow(this, count, FALSE); - MSVCP_char_traits_wchar_assignn(basic_string_wchar_ptr(this), count, ch); - basic_string_wchar_eos(this, count); - return this; -} - -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W0@Z */ -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W0@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ptr_ptr, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ptr_ptr( - basic_string_wchar *this, const wchar_t *first, const wchar_t *last) -{ - return MSVCP_basic_string_wchar_assign_cstr_len(this, first, last-first); -} - -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -/* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_iter, 20) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_iter(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end) -{ - return MSVCP_basic_string_wchar_assign_ptr_ptr(this, beg.pos, end.pos); -} - -/* ?_Chassign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXII_W@Z */ -/* ?_Chassign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_K0_W@Z */ -/* ?_Chassign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXIIG@Z */ -/* ?_Chassign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAX_K0G@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_Chassign, 16) -void __thiscall MSVCP_basic_string_wchar_Chassign(basic_string_wchar *this, - MSVCP_size_t off, MSVCP_size_t count, wchar_t ch) -{ - TRACE("%p %lu %lu %c\n", this, off, count, ch); - MSVCP_char_traits_wchar_assignn(basic_string_wchar_ptr(this)+off, count, ch); -} - -/* ?_Copy_s@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPA_WIII@Z */ -/* ?_Copy_s@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEA_W_K11@Z */ -/* ?_Copy_s@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGIII@Z */ -/* ?_Copy_s@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K11@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_Copy_s, 20) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_Copy_s(const basic_string_wchar *this, - wchar_t *dest, MSVCP_size_t size, MSVCP_size_t count, MSVCP_size_t off) -{ - TRACE("%p %p %lu %lu %lu\n", this, dest, size, count, off); - - if(this->size < off) - MSVCP__String_base_Xran(); - - if(count > this->size-off) - count = this->size-off; - - MSVCP_char_traits_wchar__Copy_s(dest, size, - basic_string_wchar_const_ptr(this)+off, count); - return count; -} - -/* ?copy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPA_WII@Z */ -/* ?copy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEA_W_K1@Z */ -/* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */ -/* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16) -MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this, - wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_Copy_s(this, dest, count, count, off); -} - -/* ?c_str@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPB_WXZ */ -/* ?c_str@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEB_WXZ */ -/* ?data@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPB_WXZ */ -/* ?data@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEB_WXZ */ -/* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */ -/* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */ -/* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */ -/* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_c_str, 4) -const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar *this) -{ - TRACE("%p\n", this); - return basic_string_wchar_const_ptr(this); -} - -/* ?capacity@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */ -/* ?capacity@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */ -/* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */ -/* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_capacity, 4) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_capacity(basic_string_wchar *this) -{ - TRACE("%p\n", this); - return this->res; -} - -/* ?reserve@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI@Z */ -/* ?reserve@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K@Z */ -/* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */ -/* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_reserve, 8) -void __thiscall MSVCP_basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size) -{ - MSVCP_size_t len; - - TRACE("%p %ld\n", this, size); - - len = this->size; - if(len > size) - return; - - if(basic_string_wchar_grow(this, size, TRUE)) - basic_string_wchar_eos(this, len); -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@XZ */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor, 4) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar *this) -{ - TRACE("%p\n", this); - - basic_string_wchar_tidy(this, FALSE, 0); - return this; -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_copy_ctor, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_copy_ctor( - basic_string_wchar *this, const basic_string_wchar *copy) -{ - TRACE("%p %p\n", this, copy); - - basic_string_wchar_tidy(this, FALSE, 0); - MSVCP_basic_string_wchar_assign(this, copy); - return this; -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr( - basic_string_wchar *this, const wchar_t *str) -{ - TRACE("%p %s\n", this, debugstr_w(str)); - - basic_string_wchar_tidy(this, FALSE, 0); - MSVCP_basic_string_wchar_assign_cstr(this, str); - return this; -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WABV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_WAEBV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_alloc, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_alloc( - basic_string_wchar *this, const wchar_t *str, const void *alloc) -{ - return MSVCP_basic_string_wchar_ctor_cstr(this, str); -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WI@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W_K@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGI@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len( - basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len) -{ - TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len); - - basic_string_wchar_tidy(this, FALSE, 0); - MSVCP_basic_string_wchar_assign_cstr_len(this, str, len); - return this; -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WIABV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W_KAEBV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len_alloc, 16) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len_alloc( - basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc) -{ - return MSVCP_basic_string_wchar_ctor_cstr_len(this, str, len); -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@II@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@_K1@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@II@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_substr, 16) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_substr( - basic_string_wchar *this, const basic_string_wchar *assign, - MSVCP_size_t pos, MSVCP_size_t len) -{ - TRACE("%p %p %lu %lu\n", this, assign, pos, len); - - basic_string_wchar_tidy(this, FALSE, 0); - MSVCP_basic_string_wchar_assign_substr(this, assign, pos, len); - return this; -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@IIABV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_substr_alloc, 20) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_substr_alloc( - basic_string_wchar *this, const basic_string_wchar *assign, - MSVCP_size_t pos, MSVCP_size_t len, const void *alloc) -{ - return MSVCP_basic_string_wchar_ctor_substr(this, assign, pos, len); -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_alloc, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_alloc( - basic_string_wchar *this, const void *alloc) -{ - TRACE("%p %p\n", this, alloc); - - basic_string_wchar_tidy(this, FALSE, 0); - return this; -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@I_W@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@_K_W@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IG@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ch, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ch(basic_string_wchar *this, - MSVCP_size_t count, wchar_t ch) -{ - TRACE("%p %ld %c\n", this, count, ch); - - basic_string_wchar_tidy(this, FALSE, 0); - MSVCP_basic_string_wchar_assignn(this, count, ch); - return this; -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@I_WABV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@_K_WAEBV?$allocator@_W@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ch_alloc, 16) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this, - MSVCP_size_t count, wchar_t ch, const void *alloc) -{ - return MSVCP_basic_string_wchar_ctor_ch(this, count, ch); -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W0@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W0@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ptr_ptr, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ptr_ptr(basic_string_wchar *this, - const wchar_t *first, const wchar_t *last) -{ - return MSVCP_basic_string_wchar_ctor_cstr_len(this, first, last-first); -} - -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@0@Z */ -/* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@0@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@1@0@Z */ -/* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@1@0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_iter, 20) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_iter(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end) -{ - return MSVCP_basic_string_wchar_ctor_cstr_len(this, beg.pos, end.pos-beg.pos); -} - -/* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */ -/* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@XZ */ -/* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */ -/* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_dtor, 4) -void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this) -{ - TRACE("%p\n", this); - basic_string_wchar_tidy(this, TRUE, 0); -} - -/* ?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */ -/* ?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */ -/* ?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */ -/* ?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */ -/* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */ -/* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */ -/* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */ -/* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_length, 4) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar *this) -{ - TRACE("%p\n", this); - return this->size; -} - -/* ?max_size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */ -/* ?max_size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */ -/* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */ -/* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4) -MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this) -{ - TRACE("%p\n", this); - return MSVCP_allocator_wchar_max_size(this->allocator)-1; -} - -/* ?empty@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE_NXZ */ -/* ?empty@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_NXZ */ -/* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */ -/* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_empty, 4) -MSVCP_bool __thiscall MSVCP_basic_string_wchar_empty(basic_string_wchar *this) -{ - TRACE("%p\n", this); - return this->size == 0; -} - -/* ?swap@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXAAV12@@Z */ -/* ?swap@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEAV12@@Z */ -/* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */ -/* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_swap, 8) -void __thiscall MSVCP_basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str) -{ - if(this != str) { - char tmp[sizeof(this->data)]; - const MSVCP_size_t size = this->size; - const MSVCP_size_t res = this->res; - - memcpy(tmp, this->data.buf, sizeof(this->data)); - memcpy(this->data.buf, str->data.buf, sizeof(this->data)); - memcpy(str->data.buf, tmp, sizeof(this->data)); - - this->size = str->size; - this->res = str->res; - - str->size = size; - str->res = res; - } -} - -/* ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV12@II@Z */ -/* ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV12@_K0@Z */ -/* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */ -/* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_substr, 16) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_substr(basic_string_wchar *this, - basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len) -{ - TRACE("%p %lu %lu\n", this, off, len); - - MSVCP_basic_string_wchar_ctor_substr(ret, this, off, len); - return ret; -} - -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */ -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_substr, 16) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_substr(basic_string_wchar *this, - const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count) -{ - TRACE("%p %p %lu %lu\n", this, append, offset, count); - - if(append->size < offset) - MSVCP__String_base_Xran(); - - if(count > append->size-offset) - count = append->size-offset; - - if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+countsize) - MSVCP__String_base_Xlen(); - - if(basic_string_wchar_grow(this, this->size+count, FALSE)) { - MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this)+this->size, - this->res-this->size, basic_string_wchar_const_ptr(append)+offset, count); - basic_string_wchar_eos(this, this->size+count); - } - - return this; -} - -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z */ -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z */ -/* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@ABV01@@Z */ -/* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */ -/* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */ -/* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append( - basic_string_wchar *this, const basic_string_wchar *append) -{ - return MSVCP_basic_string_wchar_append_substr(this, append, - 0, MSVCP_basic_string_wchar_npos); -} - -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_WI@Z */ -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W_K@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr_len, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr_len( - basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count) -{ - TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count); - - if(basic_string_wchar_inside(this, append)) - return MSVCP_basic_string_wchar_append_substr(this, this, - append-basic_string_wchar_ptr(this), count); - - if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+countsize) - MSVCP__String_base_Xlen(); - - if(basic_string_wchar_grow(this, this->size+count, FALSE)) { - MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this)+this->size, - this->res-this->size, append, count); - basic_string_wchar_eos(this, this->size+count); - } - - return this; -} - -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W@Z */ -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W@Z */ -/* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@PB_W@Z */ -/* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@PEB_W@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */ -/* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */ -/* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr( - basic_string_wchar *this, const wchar_t *append) -{ - return MSVCP_basic_string_wchar_append_cstr_len(this, append, - MSVCP_char_traits_wchar_length(append)); -} - -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W0@Z */ -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W0@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_beg_end, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_beg_end( - basic_string_wchar *this, const wchar_t *beg, const wchar_t *end) -{ - return MSVCP_basic_string_wchar_append_cstr_len(this, beg, end-beg); -} - -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_iter, 20) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_iter( - basic_string_wchar *this, String_iterator_wchar beg, String_iterator_wchar end) -{ - return MSVCP_basic_string_wchar_append_cstr_len(this, beg.pos, end.pos-beg.pos); -} - -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@Z */ -/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K_W@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */ -/* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_len_ch, 12) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_len_ch( - basic_string_wchar *this, MSVCP_size_t count, wchar_t ch) -{ - TRACE("%p %lu %c\n", this, count, ch); - - if(MSVCP_basic_string_wchar_npos-this->size <= count) - MSVCP__String_base_Xlen(); - - if(basic_string_wchar_grow(this, this->size+count, FALSE)) { - MSVCP_char_traits_wchar_assignn(basic_string_wchar_ptr(this)+this->size, count, ch); - basic_string_wchar_eos(this, this->size+count); - } - - return this; -} - -/* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@_W@Z */ -/* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@_W@Z */ -/* ?push_back@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEX_W@Z */ -/* ?push_back@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_W@Z */ -/* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */ -/* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */ -/* ?push_back@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXG@Z */ -/* ?push_back@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_ch, 8) -basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch( - basic_string_wchar *this, wchar_t ch) -{ - return MSVCP_basic_string_wchar_append_len_ch(this, 1, ch); -} - -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@PB_W@Z */ -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@PEB_W@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */ -basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret, - const basic_string_wchar *left, const wchar_t *right) -{ - TRACE("%p %s\n", left, debugstr_w(right)); - - MSVCP_basic_string_wchar_copy_ctor(ret, left); - MSVCP_basic_string_wchar_append_cstr(ret, right); - return ret; -} - -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_WABV10@@Z */ -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_WAEBV10@@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */ -basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret, - const wchar_t *left, const basic_string_wchar *right) -{ - TRACE("%s %p\n", debugstr_w(left), right); - - MSVCP_basic_string_wchar_ctor_cstr(ret, left); - MSVCP_basic_string_wchar_append(ret, right); - return ret; -} - -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@0@Z */ -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@0@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */ -basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate(basic_string_wchar *ret, - const basic_string_wchar *left, const basic_string_wchar *right) -{ - TRACE("%p %p\n", left, right); - - MSVCP_basic_string_wchar_copy_ctor(ret, left); - MSVCP_basic_string_wchar_append(ret, right); - return ret; -} - -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@_W@Z */ -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@_W@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */ -basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch( - basic_string_wchar *ret, const basic_string_wchar *left, wchar_t right) -{ - TRACE("%p %c\n", left, right); - - MSVCP_basic_string_wchar_copy_ctor(ret, left); - MSVCP_basic_string_wchar_append_ch(ret, right); - return ret; -} - -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WABV10@@Z */ -/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WAEBV10@@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */ -/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */ -basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_ch_bstr( - basic_string_wchar* ret, wchar_t left, const basic_string_wchar *right) -{ - TRACE("%c %p\n", left, right); - - MSVCP_basic_string_wchar_ctor_cstr_len(ret, &left, 1); - MSVCP_basic_string_wchar_append(ret, right); - return ret; -} - -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIPB_WI@Z */ -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0PEB_W0@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr_len, 20) -int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len( - const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num, - const wchar_t *str, MSVCP_size_t count) -{ - int ans; - - TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count); - - if(this->size < pos) - MSVCP__String_base_Xran(); - - if(num > this->size-pos) - num = this->size-pos; - - ans = MSVCP_char_traits_wchar_compare(basic_string_wchar_const_ptr(this)+pos, - str, num>count ? count : num); - if(ans) - return ans; - - if(num > count) - ans = 1; - else if(num < count) - ans = -1; - return ans; -} - -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIPB_W@Z */ -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0PEB_W@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr, 16) -int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this, - MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str) -{ - return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num, - str, MSVCP_char_traits_wchar_length(str)); -} - -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHPB_W@Z */ -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAHPEB_W@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_cstr, 8) -int __thiscall MSVCP_basic_string_wchar_compare_cstr( - const basic_string_wchar *this, const wchar_t *str) -{ - return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size, - str, MSVCP_char_traits_wchar_length(str)); -} - -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIABV12@II@Z */ -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0AEBV12@00@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_substr, 24) -int __thiscall MSVCP_basic_string_wchar_compare_substr_substr( - const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num, - const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count) -{ - TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count); - - if(compare->size < off) - MSVCP__String_base_Xran(); - - if(count > compare->size-off) - count = compare->size-off; - - return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num, - basic_string_wchar_const_ptr(compare)+off, count); -} - -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIABV12@@Z */ -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0AEBV12@@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr, 16) -int __thiscall MSVCP_basic_string_wchar_compare_substr( - const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num, - const basic_string_wchar *compare) -{ - return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num, - basic_string_wchar_const_ptr(compare), compare->size); -} - -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHABV12@@Z */ -/* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAHAEBV12@@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */ -/* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare, 8) -int __thiscall MSVCP_basic_string_wchar_compare( - const basic_string_wchar *this, const basic_string_wchar *compare) -{ - return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size, - basic_string_wchar_const_ptr(compare), compare->size); -} - -/* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -/* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal( - const basic_string_wchar *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare(left, right) == 0; -} - -/* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */ -/* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */ -/* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */ -/* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_str_cstr( - const basic_string_wchar *left, const wchar_t *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(left, right) == 0; -} - -/* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_cstr_str( - const wchar_t *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(right, left) == 0; -} - -/* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -/* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal( - const basic_string_wchar *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare(left, right) != 0; -} - -/* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */ -/* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */ -/* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */ -/* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_str_cstr( - const basic_string_wchar *left, const wchar_t *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(left, right) != 0; -} - -/* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_cstr_str( - const wchar_t *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(right, left) != 0; -} - -/* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -/* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower( - const basic_string_wchar *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare(left, right) < 0; -} - -/* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */ -/* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */ -/* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */ -/* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_bstr_cstr( - const basic_string_wchar *left, const wchar_t *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(left, right) < 0; -} - -/* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_cstr_bstr( - const wchar_t *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(right, left) > 0; -} - -/* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -/* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq( - const basic_string_wchar *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare(left, right) <= 0; -} - -/* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */ -/* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */ -/* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */ -/* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq_bstr_cstr( - const basic_string_wchar *left, const wchar_t *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(left, right) <= 0; -} - -/* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq_cstr_bstr( - const wchar_t *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(right, left) >= 0; -} - -/* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -/* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater( - const basic_string_wchar *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare(left, right) > 0; -} - -/* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */ -/* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */ -/* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */ -/* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater_bstr_cstr( - const basic_string_wchar *left, const wchar_t *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(left, right) > 0; -} - -/* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater_cstr_bstr( - const wchar_t *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(right, left) < 0; -} - -/* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */ -/* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -/* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq( - const basic_string_wchar *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare(left, right) >= 0; -} - -/* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */ -/* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */ -/* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */ -/* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq_bstr_cstr( - const basic_string_wchar *left, const wchar_t *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(left, right) >= 0; -} - -/* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */ -/* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -/* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */ -MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq_cstr_bstr( - const wchar_t *left, const basic_string_wchar *right) -{ - return MSVCP_basic_string_wchar_compare_cstr(right, left) <= 0; -} - -/* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */ -/* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */ -/* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */ -/* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_substr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len) -{ - const wchar_t *p, *end; - - TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len); - - if(len==0 && pos<=this->size) - return pos; - if(pos>=this->size || len>this->size) - return MSVCP_basic_string_wchar_npos; - - end = basic_string_wchar_const_ptr(this)+this->size-len+1; - for(p=basic_string_wchar_const_ptr(this)+pos; psize); -} - -/* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */ -/* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */ -/* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */ -/* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_ch( - const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos) -{ - return MSVCP_basic_string_wchar_find_cstr_substr(this, &ch, pos, 1); -} - -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */ -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len) -{ - const wchar_t *p, *end; - - TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len); - - if(len==0) - return possize ? pos : this->size; - - if(len > this->size) - return MSVCP_basic_string_wchar_npos; - - if(pos > this->size-len+1) - pos = this->size-len+1; - end = basic_string_wchar_const_ptr(this); - for(p=end+pos; p>=end; p--) { - if(*p==*find && !MSVCP_char_traits_wchar_compare(p, find, len)) - return p-basic_string_wchar_const_ptr(this); - } - - return MSVCP_basic_string_wchar_npos; -} - -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */ -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_off, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_off( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos) -{ - return MSVCP_basic_string_wchar_rfind_cstr_substr(this, find, pos, - MSVCP_char_traits_wchar_length(find)); -} - -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */ -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_off, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_off( - const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_rfind_cstr_substr(this, - basic_string_wchar_const_ptr(find), off, find->size); -} - -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */ -/* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */ -/* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_ch( - const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos) -{ - return MSVCP_basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1); -} - -/* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */ -/* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */ -/* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */ -/* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr_substr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const wchar_t *p, *end; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - if(len>0 && offsize) { - end = basic_string_wchar_const_ptr(this)+this->size; - for(p=basic_string_wchar_const_ptr(this)+off; psize); -} - -/* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */ -/* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */ -/* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */ -/* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_first_of_cstr_substr( - this, find, off, MSVCP_char_traits_wchar_length(find)); -} - -/* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */ -/* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */ -/* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */ -/* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_ch( - const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1); -} - -/* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */ -/* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */ -/* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */ -/* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr_substr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const wchar_t *p, *end; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - if(offsize) { - end = basic_string_wchar_const_ptr(this)+this->size; - for(p=basic_string_wchar_const_ptr(this)+off; psize); -} - -/* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */ -/* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */ -/* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */ -/* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr( - this, find, off, MSVCP_char_traits_wchar_length(find)); -} - -/* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */ -/* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */ -/* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */ -/* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_ch( - const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1); -} - -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */ -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr_substr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const wchar_t *p, *beg; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - - if(len>0 && this->size>0) { - if(off >= this->size) - off = this->size-1; - - beg = basic_string_wchar_const_ptr(this); - for(p=beg+off; p>=beg; p--) - if(MSVCP_char_traits_wchar_find(find, len, p)) - return p-beg; - } - - return MSVCP_basic_string_wchar_npos; -} - -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */ -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of( - const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this, - basic_string_wchar_const_ptr(find), off, find->size); -} - -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */ -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_last_of_cstr_substr( - this, find, off, MSVCP_char_traits_wchar_length(find)); -} - -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */ -/* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */ -/* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_ch( - const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1); -} - -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */ -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr_substr, 16) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr_substr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len) -{ - const wchar_t *p, *beg; - - TRACE("%p %p %lu %lu\n", this, find, off, len); - - if(len>0 && this->size>0) { - if(off >= this->size) - off = this->size-1; - - beg = basic_string_wchar_const_ptr(this); - for(p=beg+off; p>=beg; p--) - if(!MSVCP_char_traits_wchar_find(find, len, p)) - return p-beg; - } - - return MSVCP_basic_string_wchar_npos; -} - -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */ -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of( - const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this, - basic_string_wchar_const_ptr(find), off, find->size); -} - -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */ -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr( - const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr( - this, find, off, MSVCP_char_traits_wchar_length(find)); -} - -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */ -/* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */ -/* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_ch, 12) -MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_ch( - const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off) -{ - return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIPB_WI@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W0@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20) -basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this, - MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len) -{ - MSVCP_size_t inside_pos = -1; - wchar_t *ptr = basic_string_wchar_ptr(this); - - TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len); - - if(this->size < off) - MSVCP__String_base_Xran(); - - if(len > this->size-off) - len = this->size-off; - - if(MSVCP_basic_string_wchar_npos-str_len <= this->size-len) - MSVCP__String_base_Xlen(); - - if(basic_string_wchar_inside(this, str)) - inside_pos = str-ptr; - - if(len < str_len) { - basic_string_wchar_grow(this, this->size-len+str_len, FALSE); - ptr = basic_string_wchar_ptr(this); - } - - if(inside_pos == -1) { - memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(wchar_t)); - memcpy(ptr+off, str, str_len*sizeof(wchar_t)); - } else if(len >= str_len) { - memmove(ptr+off, ptr+inside_pos, str_len*sizeof(wchar_t)); - memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(wchar_t)); - } else { - MSVCP_size_t size; - - memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(wchar_t)); - - if(inside_pos < off+len) { - size = off+len-inside_pos; - if(size > str_len) - size = str_len; - memmove(ptr+off, ptr+inside_pos, size*sizeof(wchar_t)); - } else { - size = 0; - } - - if(str_len > size) - memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(wchar_t)); - } - - basic_string_wchar_eos(this, this->size-len+str_len); - return this; -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIPB_W@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16) -basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this, - MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str) -{ - return basic_string_wchar_replace_cstr_len(this, off, len, str, - MSVCP_char_traits_wchar_length(str)); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@II@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24) -basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off, - MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len) -{ - if(str->size < str_off) - MSVCP__String_base_Xran(); - - if(str_len > str->size-str_off) - str_len = str->size-str_off; - - return basic_string_wchar_replace_cstr_len(this, off, len, - basic_string_wchar_const_ptr(str)+str_off, str_len); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16) -basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this, - MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str) -{ - return basic_string_wchar_replace_cstr_len(this, off, len, - basic_string_wchar_const_ptr(str), str->size); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@III_W@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K00_W@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20) -basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this, - MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch) -{ - wchar_t *ptr = basic_string_wchar_ptr(this); - - TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch); - - if(this->size < off) - MSVCP__String_base_Xran(); - - if(len > this->size-off) - len = this->size-off; - - if(MSVCP_basic_string_wchar_npos-count <= this->size-len) - MSVCP__String_base_Xlen(); - - if(len < count) { - basic_string_wchar_grow(this, this->size-len+count, FALSE); - ptr = basic_string_wchar_ptr(this); - } - - memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(wchar_t)); - MSVCP_char_traits_wchar_assignn(ptr+off, count, ch); - basic_string_wchar_eos(this, this->size-len+count); - - return this; -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@000@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@000@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@000@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@000@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 36) -basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end, - String_iterator_wchar res_beg, String_iterator_wchar res_end) -{ - String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) }; - return basic_string_wchar_replace_cstr_len(this, - MSVCP_basic_string_wchar_Pdif(beg, begin), MSVCP_basic_string_wchar_Pdif(end, beg), - res_beg.pos, MSVCP_basic_string_wchar_Pdif(res_end, res_beg)); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0ABV12@@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0AEBV12@@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0ABV12@@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0AEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 24) -basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end, const basic_string_wchar *str) -{ - String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) }; - return basic_string_wchar_replace(this, MSVCP_basic_string_wchar_Pdif(beg, begin), - MSVCP_basic_string_wchar_Pdif(end, beg), str); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0I_W@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0_K_W@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0IG@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0_KG@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_ch, 28) -basic_string_wchar* __thiscall basic_string_wchar_replace_iter_ch(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end, MSVCP_size_t count, wchar_t ch) -{ - String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) }; - return basic_string_wchar_replace_ch(this, MSVCP_basic_string_wchar_Pdif(beg, begin), - MSVCP_basic_string_wchar_Pdif(end, beg), count, ch); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PB_W1@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PEB_W1@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0PBG1@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0PEBG1@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_ptr_ptr, 28) -basic_string_wchar* __thiscall basic_string_wchar_replace_iter_ptr_ptr(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end, - const wchar_t *res_beg, const wchar_t *res_end) -{ - String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) }; - return basic_string_wchar_replace_cstr_len(this, MSVCP_basic_string_wchar_Pdif(beg, begin), - MSVCP_basic_string_wchar_Pdif(end, beg), res_beg, res_end-res_beg); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PB_W@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PEB_W@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0PBG@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0PEBG@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 24) -basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end, const wchar_t *str) -{ - String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) }; - return basic_string_wchar_replace_cstr(this, MSVCP_basic_string_wchar_Pdif(beg, begin), - MSVCP_basic_string_wchar_Pdif(end, beg), str); -} - -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PB_WI@Z */ -/* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PEB_W_K@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0PBGI@Z */ -/* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0PEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 28) -basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this, - String_iterator_wchar beg, String_iterator_wchar end, const wchar_t *str, MSVCP_size_t len) -{ - String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) }; - return basic_string_wchar_replace_cstr_len(this, MSVCP_basic_string_wchar_Pdif(beg, begin), - MSVCP_basic_string_wchar_Pdif(end, beg), str, len); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IABV12@@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_KAEBV12@@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12) -basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this, - MSVCP_size_t off, const basic_string_wchar *str) -{ - return basic_string_wchar_replace(this, off, 0, str); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IABV12@II@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20) -basic_string_wchar* __thiscall basic_string_wchar_insert_substr( - basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str, - MSVCP_size_t str_off, MSVCP_size_t str_count) -{ - return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IPB_W@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_KPEB_W@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12) -basic_string_wchar* __thiscall basic_string_wchar_insert_cstr( - basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str) -{ - return basic_string_wchar_replace_cstr(this, off, 0, str); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IPB_WI@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_KPEB_W0@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16) -basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this, - MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len) -{ - return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@II_W@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0_W@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16) -basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this, - MSVCP_size_t off, MSVCP_size_t count, wchar_t ch) -{ - return basic_string_wchar_replace_ch(this, off, 0, count, ch); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@I_W@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@_K_W@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@IG@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@_KG@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 20) -void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this, - String_iterator_wchar where, MSVCP_size_t count, wchar_t ch) -{ - String_iterator_wchar iter = { this, basic_string_wchar_ptr(this) }; - MSVCP_size_t off = MSVCP_basic_string_wchar_Pdif(where, iter); - - basic_string_wchar_insert_chn(this, off, count, ch); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@_W@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@_W@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@G@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@G@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 20) -String_iterator_wchar* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, - String_iterator_wchar *ret, String_iterator_wchar where, wchar_t ch) -{ - MSVCP_size_t off; - - ret->bstr = this; - ret->pos = basic_string_wchar_ptr(this); - off = MSVCP_basic_string_wchar_Pdif(where, *ret); - - basic_string_wchar_insert_chn(this, off, 1, ch); - ret->pos = basic_string_wchar_ptr(this)+off; - return ret; -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_null, 16) -String_iterator_wchar* __thiscall basic_string_wchar_insert_iter_null(basic_string_wchar *this, - String_iterator_wchar *ret, String_iterator_wchar where) -{ - return basic_string_wchar_insert_iter_ch(this, ret, where, 0); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@00@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@00@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@00@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@00@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_beg_end, 28) -void __thiscall basic_string_wchar_insert_iter_beg_end(basic_string_wchar *this, - String_iterator_wchar where, String_iterator_wchar beg, String_iterator_wchar end) -{ - basic_string_wchar_replace_iter_iter(this, where, where, beg, end); -} - -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W1@Z */ -/* ?insert@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W1@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG1@Z */ -/* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG1@Z */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ptr_ptr, 20) -void __thiscall basic_string_wchar_insert_iter_ptr_ptr(basic_string_wchar *this, - String_iterator_wchar where, const wchar_t *beg, const wchar_t *end) -{ - basic_string_wchar_replace_iter_ptr_ptr(this, where, where, beg, end); -} - -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WI@Z */ -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_W_K@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at, 8) -wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at( - basic_string_wchar *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - assert(this->size >= pos); - return basic_string_wchar_ptr(this)+pos; -} - -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WI@Z */ -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_W_K@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_const_operator_at, 8) -const wchar_t* __thiscall MSVCP_basic_string_wchar_const_operator_at( - const basic_string_wchar *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - assert(this->size >= pos); - return basic_string_wchar_const_ptr(this)+pos; -} - -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_WU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAGU_Size_type_nosscl@01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at_noverify, 8) -wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at_noverify( - basic_string_wchar *this, size_t_noverify pos) -{ - TRACE("%p %lu\n", this, pos.val); - return basic_string_wchar_ptr(this)+pos.val; -} - -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_WU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGU_Size_type_nosscl@01@@Z */ -/* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBGU_Size_type_nosscl@01@@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_const_at_noverify, 8) -const wchar_t* __thiscall MSVCP_basic_string_wchar_operator_const_at_noverify( - const basic_string_wchar *this, size_t_noverify pos) -{ - TRACE("%p %lu\n", this, pos.val); - return basic_string_wchar_const_ptr(this)+pos.val; -} - -/* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WI@Z */ -/* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_W_K@Z */ -/* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */ -/* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_at, 8) -wchar_t* __thiscall MSVCP_basic_string_wchar_at( - basic_string_wchar *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - if(this->size <= pos) - MSVCP__String_base_Xran(); - - return basic_string_wchar_ptr(this)+pos; -} - -/* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WI@Z */ -/* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_W_K@Z */ -/* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */ -/* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_const_at, 8) -const wchar_t* __thiscall MSVCP_basic_string_wchar_const_at( - const basic_string_wchar *this, MSVCP_size_t pos) -{ - TRACE("%p %lu\n", this, pos); - - if(this->size <= pos) - MSVCP__String_base_Xran(); - - return basic_string_wchar_const_ptr(this)+pos; -} - -/* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI_W@Z */ -/* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K_W@Z */ -/* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */ -/* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize_ch, 12) -void __thiscall MSVCP_basic_string_wchar_resize_ch( - basic_string_wchar *this, MSVCP_size_t size, wchar_t ch) -{ - TRACE("%p %lu %c\n", this, size, ch); - - if(size <= this->size) - MSVCP_basic_string_wchar_erase(this, size, this->size); - else - MSVCP_basic_string_wchar_append_len_ch(this, size-this->size, ch); -} - -/* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI@Z */ -/* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K@Z */ -/* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */ -/* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize, 8) -void __thiscall MSVCP_basic_string_wchar_resize( - basic_string_wchar *this, MSVCP_size_t size) -{ - MSVCP_basic_string_wchar_resize_ch(this, size, '\0'); -} - -/* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */ -/* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */ -/* ?clear@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */ -/* ?clear@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_clear, 4) -void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar *this) -{ - basic_string_wchar_eos(this, 0); -} - -/* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_begin, 8) -String_iterator_wchar* __thiscall MSVCP_basic_string_wchar_begin( - basic_string_wchar *this, String_iterator_wchar *ret) -{ - TRACE("%p\n", this); - - ret->bstr = this; - ret->pos = basic_string_wchar_const_ptr(this); - return ret; -} - -/* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */ -/* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -/* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */ -DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_end, 8) -String_iterator_wchar* __thiscall MSVCP_basic_string_wchar_end( - basic_string_wchar *this, String_iterator_wchar *ret) -{ - TRACE("%p\n", this); - - ret->bstr = this; - ret->pos = basic_string_wchar_const_ptr(this)+this->size; - return ret; -} - -/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8) -basic_string_wchar_reverse_iter* __thiscall basic_string_wchar_rbegin(const basic_string_wchar *this, basic_string_wchar_reverse_iter *ret) -{ - ret->cont = NULL; - ret->bstr = this; - ret->pos = basic_string_wchar_const_ptr(this)+this->size; - return ret; -} - -/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ -DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8) -basic_string_wchar_reverse_iter* __thiscall basic_string_wchar_rend(const basic_string_wchar *this, basic_string_wchar_reverse_iter *ret) -{ - ret->cont = NULL; - ret->bstr = this; - ret->pos = basic_string_wchar_const_ptr(this); - return ret; -} - -/* _String_val class */ -/* ??_F?$_String_val@DV?$allocator@D@std@@@std@@QAEXXZ */ -/* ??_F?$_String_val@DV?$allocator@D@std@@@std@@QEAAXXZ */ -/* ??_F?$_String_val@GV?$allocator@G@std@@@std@@QAEXXZ */ -/* ??_F?$_String_val@GV?$allocator@G@std@@@std@@QEAAXXZ */ -/* ??_F?$_String_val@_WV?$allocator@_W@std@@@std@@QAEXXZ */ -/* ??_F?$_String_val@_WV?$allocator@_W@std@@@std@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(_String_val_ctor, 4) -void* __thiscall _String_val_ctor(void *this) -{ - TRACE("%p\n", this); - return this; -} - -/* ??0?$_String_val@DV?$allocator@D@std@@@std@@IAE@V?$allocator@D@1@@Z */ -/* ??0?$_String_val@DV?$allocator@D@std@@@std@@IEAA@V?$allocator@D@1@@Z */ -/* ??0?$_String_val@GV?$allocator@G@std@@@std@@IAE@V?$allocator@G@1@@Z */ -/* ??0?$_String_val@GV?$allocator@G@std@@@std@@IEAA@V?$allocator@G@1@@Z */ -/* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@IAE@V?$allocator@_W@1@@Z */ -/* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@IEAA@V?$allocator@_W@1@@Z */ -/* ??0?$_String_val@DV?$allocator@D@std@@@std@@QAE@ABV01@@Z */ -/* ??0?$_String_val@DV?$allocator@D@std@@@std@@QEAA@AEBV01@@Z */ -/* ??0?$_String_val@GV?$allocator@G@std@@@std@@QAE@ABV01@@Z */ -/* ??0?$_String_val@GV?$allocator@G@std@@@std@@QEAA@AEBV01@@Z */ -/* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@QAE@ABV01@@Z */ -/* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@QEAA@AEBV01@@Z */ -/* ??4?$_String_val@DV?$allocator@D@std@@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$_String_val@DV?$allocator@D@std@@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??4?$_String_val@GV?$allocator@G@std@@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$_String_val@GV?$allocator@G@std@@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??4?$_String_val@_WV?$allocator@_W@std@@@std@@QAEAAV01@ABV01@@Z */ -/* ??4?$_String_val@_WV?$allocator@_W@std@@@std@@QEAAAEAV01@AEBV01@@Z */ -/* ??4?$_String_val@DV?$allocator@D@std@@@std@@QAEAAV01@ABV01@@Z */ -DEFINE_THISCALL_WRAPPER(_String_val_null_ctor, 8) -void* __thiscall _String_val_null_ctor(void *this, const void *misc) -{ - TRACE("%p %p\n", this, misc); - return this; -} diff --git a/dlls/msvcp90/Makefile.in b/dlls/msvcp90/Makefile.in index 2f96e607781..25b5e6f686c 100644 --- a/dlls/msvcp90/Makefile.in +++ b/dlls/msvcp90/Makefile.in @@ -2,6 +2,7 @@ MODULE = msvcp90.dll IMPORTS = msvcrt MODCFLAGS = @BUILTINFLAG@ EXTRAINCL = -I$(top_srcdir)/include/msvcrt +EXTRADEFS = -D_MSVCP_VER=90 C_SRCS = \ exception.c \ @@ -10,7 +11,7 @@ C_SRCS = \ math.c \ memory.c \ misc.c \ - msvcp90_main.c \ + msvcp_main.c \ string.c @MAKE_DLL_RULES@ diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index a07b9d152a8..ba63a63deb0 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -46,6 +46,7 @@ LCID* __cdecl ___lc_handle_func(void); const locale_facet* __thiscall locale__Getfacet(const locale*, MSVCP_size_t); MSVCP_size_t __cdecl _Strftime(char*, MSVCP_size_t, const char*, const struct tm*, struct __lc_time_data*); +const locale* __cdecl locale_classic(void); typedef int category; @@ -842,6 +843,13 @@ MSVCP_size_t __cdecl collate_char__Getcat(const locale_facet **facet, const loca return LC_COLLATE; } +/* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl collate_char__Getcat_old(const locale_facet **facet) +{ + return collate_char__Getcat(facet, locale_classic()); +} + static collate* collate_char_use_facet(const locale *loc) { static collate *obj = NULL; @@ -1113,6 +1121,13 @@ MSVCP_size_t __cdecl collate_wchar__Getcat(const locale_facet **facet, const loc return LC_COLLATE; } +/* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl collate_wchar__Getcat_old(const locale_facet **facet) +{ + return collate_wchar__Getcat(facet, locale_classic()); +} + static collate* collate_wchar_use_facet(const locale *loc) { static collate *obj = NULL; @@ -1153,6 +1168,13 @@ MSVCP_size_t __cdecl collate_short__Getcat(const locale_facet **facet, const loc return LC_COLLATE; } +/* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl collate_short__Getcat_old(const locale_facet **facet) +{ + return collate_short__Getcat(facet, locale_classic()); +} + static collate* collate_short_use_facet(const locale *loc) { static collate *obj = NULL; @@ -1617,6 +1639,13 @@ MSVCP_size_t __cdecl ctype_char__Getcat(const locale_facet **facet, const locale return LC_CTYPE; } +/* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl ctype_char__Getcat_old(const locale_facet **facet) +{ + return ctype_char__Getcat(facet, locale_classic()); +} + ctype_char* ctype_char_use_facet(const locale *loc) { static ctype_char *obj = NULL; @@ -2349,6 +2378,13 @@ MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const local return LC_CTYPE; } +/* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl ctype_wchar__Getcat_old(const locale_facet **facet) +{ + return ctype_wchar__Getcat(facet, locale_classic()); +} + /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ MSVCP_size_t __cdecl ctype_short__Getcat(const locale_facet **facet, const locale *loc) @@ -2361,6 +2397,13 @@ MSVCP_size_t __cdecl ctype_short__Getcat(const locale_facet **facet, const local return LC_CTYPE; } +/* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl ctype_short__Getcat_old(const locale_facet **facet) +{ + return ctype_short__Getcat(facet, locale_classic()); +} + /* _Towlower */ wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype) { @@ -2863,6 +2906,13 @@ MSVCP_size_t __cdecl codecvt_char__Getcat(const locale_facet **facet, const loca return LC_CTYPE; } +/* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl codecvt_char__Getcat_old(const locale_facet **facet) +{ + return codecvt_char__Getcat(facet, locale_classic()); +} + codecvt_char* codecvt_char_use_facet(const locale *loc) { static codecvt_char *obj = NULL; @@ -3162,6 +3212,13 @@ MSVCP_size_t __cdecl codecvt_wchar__Getcat(const locale_facet **facet, const loc return LC_CTYPE; } +/* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl codecvt_wchar__Getcat_old(const locale_facet **facet) +{ + return codecvt_wchar__Getcat(facet, locale_classic()); +} + codecvt_wchar* codecvt_wchar_use_facet(const locale *loc) { static codecvt_wchar *obj = NULL; @@ -3214,6 +3271,13 @@ MSVCP_size_t __cdecl codecvt_short__Getcat(const locale_facet **facet, const loc return LC_CTYPE; } +/* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl codecvt_short__Getcat_old(const locale_facet **facet) +{ + return codecvt_short__Getcat(facet, locale_classic()); +} + codecvt_wchar* codecvt_short_use_facet(const locale *loc) { static codecvt_wchar *obj = NULL; @@ -3628,6 +3692,13 @@ MSVCP_size_t __cdecl numpunct_char__Getcat(const locale_facet **facet, const loc return LC_NUMERIC; } +/* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl numpunct_char__Getcat_old(const locale_facet **facet) +{ + return numpunct_char__Getcat(facet, locale_classic()); +} + static numpunct_char* numpunct_char_use_facet(const locale *loc) { static numpunct_char *obj = NULL; @@ -3981,6 +4052,13 @@ MSVCP_size_t __cdecl numpunct_wchar__Getcat(const locale_facet **facet, const lo return LC_NUMERIC; } +/* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl numpunct_wchar__Getcat_old(const locale_facet **facet) +{ + return numpunct_wchar__Getcat(facet, locale_classic()); +} + static numpunct_wchar* numpunct_wchar_use_facet(const locale *loc) { static numpunct_wchar *obj = NULL; @@ -4029,6 +4107,13 @@ MSVCP_size_t __cdecl numpunct_short__Getcat(const locale_facet **facet, const lo return LC_NUMERIC; } +/* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl numpunct_short__Getcat_old(const locale_facet **facet) +{ + return numpunct_short__Getcat(facet, locale_classic()); +} + static numpunct_wchar* numpunct_short_use_facet(const locale *loc) { static numpunct_wchar *obj = NULL; @@ -4422,6 +4507,13 @@ MSVCP_size_t __cdecl num_get_wchar__Getcat(const locale_facet **facet, const loc return LC_NUMERIC; } +/* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl num_get_wchar__Getcat_old(const locale_facet **facet) +{ + return num_get_wchar__Getcat(facet, locale_classic()); +} + num_get* num_get_wchar_use_facet(const locale *loc) { static num_get *obj = NULL; @@ -4462,6 +4554,13 @@ MSVCP_size_t __cdecl num_get_short__Getcat(const locale_facet **facet, const loc return LC_NUMERIC; } +/* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl num_get_short__Getcat_old(const locale_facet **facet) +{ + return num_get_short__Getcat(facet, locale_classic()); +} + num_get* num_get_short_use_facet(const locale *loc) { static num_get *obj = NULL; @@ -5579,6 +5678,13 @@ MSVCP_size_t __cdecl num_get_char__Getcat(const locale_facet **facet, const loca return LC_NUMERIC; } +/* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl num_get_char__Getcat_old(const locale_facet **facet) +{ + return num_get_char__Getcat(facet, locale_classic()); +} + num_get* num_get_char_use_facet(const locale *loc) { static num_get *obj = NULL; @@ -6450,6 +6556,13 @@ MSVCP_size_t __cdecl num_put_char__Getcat(const locale_facet **facet, const loca return LC_NUMERIC; } +/* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl num_put_char__Getcat_old(const locale_facet **facet) +{ + return num_put_char__Getcat(facet, locale_classic()); +} + num_put* num_put_char_use_facet(const locale *loc) { static num_put *obj = NULL; @@ -7104,6 +7217,13 @@ MSVCP_size_t __cdecl num_put_wchar__Getcat(const locale_facet **facet, const loc return LC_NUMERIC; } +/* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl num_put_wchar__Getcat_old(const locale_facet **facet) +{ + return num_put_wchar__Getcat(facet, locale_classic()); +} + /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */ /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */ MSVCP_size_t __cdecl num_put_short__Getcat(const locale_facet **facet, const locale *loc) @@ -7128,6 +7248,13 @@ MSVCP_size_t __cdecl num_put_short__Getcat(const locale_facet **facet, const loc return LC_NUMERIC; } +/* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl num_put_short__Getcat_old(const locale_facet **facet) +{ + return num_put_short__Getcat(facet, locale_classic()); +} + num_put* num_put_wchar_use_facet(const locale *loc) { static num_put *obj = NULL; @@ -7982,6 +8109,13 @@ MSVCP_size_t __cdecl time_put_char__Getcat(const locale_facet **facet, const loc return LC_TIME; } +/* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl time_put_char__Getcat_old(const locale_facet **facet) +{ + return time_put_char__Getcat(facet, locale_classic()); +} + static time_put* time_put_char_use_facet(const locale *loc) { static time_put *obj = NULL; @@ -8245,6 +8379,13 @@ MSVCP_size_t __cdecl time_put_wchar__Getcat(const locale_facet **facet, const lo return LC_TIME; } +/* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl time_put_wchar__Getcat_old(const locale_facet **facet) +{ + return time_put_wchar__Getcat(facet, locale_classic()); +} + static time_put* time_put_wchar_use_facet(const locale *loc) { static time_put *obj = NULL; @@ -8293,6 +8434,13 @@ MSVCP_size_t __cdecl time_put_short__Getcat(const locale_facet **facet, const lo return LC_TIME; } +/* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */ +/* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */ +MSVCP_size_t __cdecl time_put_short__Getcat_old(const locale_facet **facet) +{ + return time_put_short__Getcat(facet, locale_classic()); +} + static time_put* time_put_short_use_facet(const locale *loc) { static time_put *obj = NULL; diff --git a/dlls/msvcp90/msvcp90_main.c b/dlls/msvcp90/msvcp_main.c similarity index 100% rename from dlls/msvcp90/msvcp90_main.c rename to dlls/msvcp90/msvcp_main.c diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index 055150c4a37..23322fe8afb 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -34,13 +34,27 @@ typedef struct { basic_string_char *bstr; const char *pos; } String_iterator_char; -typedef String_iterator_char String_reverse_iterator_char; + +typedef struct { +#if _MSVCP_VER == 80 + void *cont; +#endif + const basic_string_char *bstr; + const char *pos; +} String_reverse_iterator_char; typedef struct { basic_string_wchar *bstr; const wchar_t *pos; } String_iterator_wchar; -typedef String_iterator_wchar String_reverse_iterator_wchar; + +typedef struct { +#if _MSVCP_VER == 80 + void *cont; +#endif + const basic_string_wchar *bstr; + const wchar_t *pos; +} String_reverse_iterator_wchar; /* size_t_noverify structure */ typedef struct { @@ -2302,6 +2316,9 @@ String_reverse_iterator_char* __thiscall MSVCP_basic_string_char_rbegin( { TRACE("%p\n", this); +#if _MSVCP_VER == 80 + ret->cont = NULL; +#endif ret->bstr = this; ret->pos = basic_string_char_const_ptr(this)+this->size; return ret; @@ -2317,6 +2334,9 @@ String_reverse_iterator_char* __thiscall MSVCP_basic_string_char_rend( { TRACE("%p\n", this); +#if _MSVCP_VER == 80 + ret->cont = NULL; +#endif ret->bstr = this; ret->pos = basic_string_char_const_ptr(this); return ret; @@ -4386,6 +4406,8 @@ String_iterator_wchar* __thiscall MSVCP_basic_string_wchar_end( /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ +/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ +/* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ @@ -4398,6 +4420,9 @@ String_reverse_iterator_wchar* __thiscall MSVCP_basic_string_wchar_rbegin( { TRACE("%p\n", this); +#if _MSVCP_VER == 80 + ret->cont = NULL; +#endif ret->bstr = this; ret->pos = basic_string_wchar_const_ptr(this)+this->size; return ret; @@ -4405,6 +4430,8 @@ String_reverse_iterator_wchar* __thiscall MSVCP_basic_string_wchar_rbegin( /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ +/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ +/* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */ /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@2@XZ */ @@ -4417,6 +4444,9 @@ String_reverse_iterator_wchar* __thiscall MSVCP_basic_string_wchar_rend( { TRACE("%p\n", this); +#if _MSVCP_VER == 80 + ret->cont = NULL; +#endif ret->bstr = this; ret->pos = basic_string_wchar_const_ptr(this); return ret;