msvcp100: Copy source files from msvcp90.

This commit is contained in:
Piotr Caban 2012-08-16 10:35:15 +02:00 committed by Alexandre Julliard
parent b0312eab92
commit 4fe6e58375
11 changed files with 29250 additions and 25 deletions

View File

@ -1,6 +1,16 @@
MODULE = msvcp100.dll MODULE = msvcp100.dll
IMPORTS = msvcrt
MODCFLAGS = @BUILTINFLAG@
EXTRAINCL = -I$(top_srcdir)/include/msvcrt
C_SRCS = \ C_SRCS = \
msvcp100.c exception.c \
ios.c \
locale.c \
math.c \
memory.c \
misc.c \
msvcp100.c \
string.c
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@

224
dlls/msvcp100/cxx.h Normal file
View File

@ -0,0 +1,224 @@
/*
* 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" \
"\t.quad " THISCALL_NAME(MSVCP_ ## name ## _vector_dtor) "\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" \
"\t.long " THISCALL_NAME(MSVCP_ ## name ## _vector_dtor) "\n" \
funcs "\n\t.text")
#endif /* _WIN64 */
#define DEFINE_RTTI_DATA(name, off, base_classes, 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, \
{ 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+1, \
&name ## _rtti_base_array \
}; \
\
const rtti_object_locator name ## _rtti = { \
0, \
off, \
0, \
&name ## _type_info, \
&name ## _hierarchy \
}
#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)
#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;
extern void *vtbl_wrapper_60;
#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;
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;

759
dlls/msvcp100/exception.c Normal file
View File

@ -0,0 +1,759 @@
/*
* 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 <stdarg.h>
#include "msvcp.h"
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
/* dlls/msvcrt/cppexcept.h */
typedef void (*cxx_copy_ctor)(void);
/* complete information about a C++ type */
typedef struct __cxx_type_info
{
UINT flags; /* flags (see CLASS_* flags below) */
const type_info *type_info; /* C++ type info */
this_ptr_offsets offsets; /* offsets for computing the this pointer */
unsigned int size; /* object size */
cxx_copy_ctor copy_ctor; /* copy constructor */
} cxx_type_info;
#define CLASS_IS_SIMPLE_TYPE 1
#define CLASS_HAS_VIRTUAL_BASE_CLASS 4
/* table of C++ types that apply for a given object */
typedef struct __cxx_type_info_table
{
UINT count; /* number of types */
const cxx_type_info *info[3]; /* variable length, we declare it large enough for static RTTI */
} cxx_type_info_table;
/* type information for an exception object */
typedef struct __cxx_exception_type
{
UINT flags; /* TYPE_FLAG flags */
void (*destructor)(void);/* exception object destructor */
void* /*cxx_exc_custom_handler*/ custom_handler; /* custom handler for this exception */
const cxx_type_info_table *type_info_table; /* list of types for this exception object */
} cxx_exception_type;
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 i, *ptr = (int *)_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@@" );
DEFINE_THISCALL_WRAPPER(MSVCP_exception_ctor, 8)
exception* __thiscall 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 i, *ptr = (int *)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@@");
static const cxx_type_info exception_cxx_type_info = {
0,
&exception_type_info,
{ 0, -1, 0 },
sizeof(exception),
(cxx_copy_ctor)THISCALL(MSVCP_exception_dtor)
};
static const cxx_type_info_table exception_cxx_type_table = {
1,
{
&exception_cxx_type_info,
NULL,
NULL
}
};
static const cxx_exception_type exception_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_exception_copy_ctor),
NULL,
&exception_cxx_type_table
};
/* bad_alloc class data */
typedef exception bad_alloc;
DEFINE_THISCALL_WRAPPER(MSVCP_bad_alloc_ctor, 8)
bad_alloc* __thiscall 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 i, *ptr = (int *)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@@");
static const cxx_type_info bad_alloc_cxx_type_info = {
0,
&bad_alloc_type_info,
{ 0, -1, 0 },
sizeof(bad_alloc),
(cxx_copy_ctor)THISCALL(MSVCP_bad_alloc_copy_ctor)
};
static const cxx_type_info_table bad_alloc_cxx_type_table = {
2,
{
&bad_alloc_cxx_type_info,
&exception_cxx_type_info,
NULL
}
};
static const cxx_exception_type bad_alloc_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_bad_alloc_dtor),
NULL,
&bad_alloc_cxx_type_table
};
/* logic_error class data */
typedef struct _logic_error {
exception e;
basic_string_char str;
} logic_error;
DEFINE_THISCALL_WRAPPER(MSVCP_logic_error_ctor, 8)
logic_error* __thiscall 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 i, *ptr = (int *)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@@");
static const cxx_type_info logic_error_cxx_type_info = {
0,
&logic_error_type_info,
{ 0, -1, 0 },
sizeof(logic_error),
(cxx_copy_ctor)THISCALL(MSVCP_logic_error_copy_ctor)
};
static const cxx_type_info_table logic_error_cxx_type_table = {
2,
{
&logic_error_cxx_type_info,
&exception_cxx_type_info,
NULL
}
};
static const cxx_exception_type logic_error_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_logic_error_dtor),
NULL,
&logic_error_cxx_type_table
};
/* length_error class data */
typedef logic_error length_error;
DEFINE_THISCALL_WRAPPER(MSVCP_length_error_ctor, 8)
length_error* __thiscall 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_THISCALL_WRAPPER(MSVCP_length_error_vector_dtor, 8)
void* __thiscall MSVCP_length_error_vector_dtor(
length_error *this, unsigned int flags)
{
TRACE("%p %x\n", this, flags);
return MSVCP_logic_error_vector_dtor(this, flags);
}
DEFINE_RTTI_DATA2(length_error, 0, &logic_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVlength_error@std@@");
static const cxx_type_info length_error_cxx_type_info = {
0,
&length_error_type_info,
{ 0, -1, 0 },
sizeof(length_error),
(cxx_copy_ctor)THISCALL(MSVCP_length_error_copy_ctor)
};
static const cxx_type_info_table length_error_cxx_type_table = {
3,
{
&length_error_cxx_type_info,
&logic_error_cxx_type_info,
&exception_cxx_type_info
}
};
static const cxx_exception_type length_error_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_logic_error_dtor),
NULL,
&length_error_cxx_type_table
};
/* out_of_range class data */
typedef logic_error out_of_range;
DEFINE_THISCALL_WRAPPER(MSVCP_out_of_range_ctor, 8)
out_of_range* __thiscall 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_THISCALL_WRAPPER(MSVCP_out_of_range_vector_dtor, 8)
void* __thiscall MSVCP_out_of_range_vector_dtor(
out_of_range *this, unsigned int flags)
{
TRACE("%p %x\n", this, flags);
return MSVCP_logic_error_vector_dtor(this, flags);
}
DEFINE_RTTI_DATA2(out_of_range, 0, &logic_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVout_of_range@std@@");
static const cxx_type_info out_of_range_cxx_type_info = {
0,
&out_of_range_type_info,
{ 0, -1, 0 },
sizeof(out_of_range),
(cxx_copy_ctor)THISCALL(MSVCP_out_of_range_copy_ctor)
};
static const cxx_type_info_table out_of_range_cxx_type_table = {
3,
{
&out_of_range_cxx_type_info,
&logic_error_cxx_type_info,
&exception_cxx_type_info
}
};
static const cxx_exception_type out_of_range_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_logic_error_dtor),
NULL,
&out_of_range_cxx_type_table
};
/* invalid_argument class data */
typedef logic_error invalid_argument;
DEFINE_THISCALL_WRAPPER(MSVCP_invalid_argument_ctor, 8)
invalid_argument* __thiscall 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_THISCALL_WRAPPER(MSVCP_invalid_argument_vector_dtor, 8)
void* __thiscall MSVCP_invalid_argument_vector_dtor(
invalid_argument *this, unsigned int flags)
{
TRACE("%p %x\n", this, flags);
return MSVCP_logic_error_vector_dtor(this, flags);
}
DEFINE_RTTI_DATA2(invalid_argument, 0, &logic_error_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AVinvalid_argument@std@@");
static const cxx_type_info invalid_argument_cxx_type_info = {
0,
&invalid_argument_type_info,
{ 0, -1, 0 },
sizeof(invalid_argument),
(cxx_copy_ctor)THISCALL(MSVCP_invalid_argument_copy_ctor)
};
static const cxx_type_info_table invalid_argument_cxx_type_table = {
3,
{
&invalid_argument_cxx_type_info,
&logic_error_cxx_type_info,
&exception_cxx_type_info
}
};
static const cxx_exception_type invalid_argument_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_logic_error_dtor),
NULL,
&invalid_argument_cxx_type_table
};
/* runtime_error class data */
typedef struct {
exception e;
basic_string_char str;
} runtime_error;
DEFINE_THISCALL_WRAPPER(MSVCP_runtime_error_ctor, 8)
runtime_error* __thiscall 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 i, *ptr = (int *)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@@");
static const cxx_type_info runtime_error_cxx_type_info = {
0,
&runtime_error_type_info,
{ 0, -1, 0 },
sizeof(runtime_error),
(cxx_copy_ctor)THISCALL(MSVCP_runtime_error_copy_ctor)
};
static const cxx_type_info_table runtime_error_cxx_type_table = {
2,
{
&runtime_error_cxx_type_info,
&exception_cxx_type_info,
NULL
}
};
static const cxx_exception_type runtime_error_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_runtime_error_dtor),
NULL,
&runtime_error_cxx_type_table
};
/* failure class data */
typedef runtime_error failure;
DEFINE_THISCALL_WRAPPER(MSVCP_failure_ctor, 8)
failure* __thiscall 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@@");
static const cxx_type_info failure_cxx_type_info = {
0,
&failure_type_info,
{ 0, -1, 0 },
sizeof(failure),
(cxx_copy_ctor)THISCALL(MSVCP_failure_copy_ctor)
};
static const cxx_type_info_table failure_cxx_type_table = {
3,
{
&failure_cxx_type_info,
&runtime_error_cxx_type_info,
&exception_cxx_type_info
}
};
static const cxx_exception_type failure_cxx_type = {
0,
(cxx_copy_ctor)THISCALL(MSVCP_failure_dtor),
NULL,
&failure_cxx_type_table
};
#ifndef __GNUC__
void __asm_dummy_vtables(void) {
#endif
__ASM_VTABLE(type_info, "");
__ASM_VTABLE(exception, VTABLE_ADD_FUNC(MSVCP_what_exception));
__ASM_VTABLE(bad_alloc, VTABLE_ADD_FUNC(MSVCP_what_exception));
__ASM_VTABLE(logic_error, VTABLE_ADD_FUNC(MSVCP_logic_error_what));
__ASM_VTABLE(length_error, VTABLE_ADD_FUNC(MSVCP_logic_error_what));
__ASM_VTABLE(out_of_range, VTABLE_ADD_FUNC(MSVCP_logic_error_what));
__ASM_VTABLE(invalid_argument, VTABLE_ADD_FUNC(MSVCP_logic_error_what));
__ASM_VTABLE(runtime_error, VTABLE_ADD_FUNC(MSVCP_runtime_error_what));
__ASM_VTABLE(failure, 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);
}
}
}

13037
dlls/msvcp100/ios.c Normal file

File diff suppressed because it is too large Load Diff

8755
dlls/msvcp100/locale.c Normal file

File diff suppressed because it is too large Load Diff

896
dlls/msvcp100/math.c Normal file
View File

@ -0,0 +1,896 @@
/*
* 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 <stdarg.h>
#include <limits.h>
#include <float.h>
#include <math.h>
#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<signed char>::digits10 */
const int std_numeric_limits_signed_char_digits10 = 2;
/* ?digits10@?$numeric_limits@D@std@@2HB -> public: static int const std::numeric_limits<char>::digits10 */
const int std_numeric_limits_char_digits10 = 2;
/* ?digits10@?$numeric_limits@E@std@@2HB -> public: static int const std::numeric_limits<unsigned char>::digits10 */
const int std_numeric_limits_unsigned_char_digits10 = 2;
/* ?digits10@?$numeric_limits@F@std@@2HB -> public: static int const std::numeric_limits<short>::digits10 */
const int std_numeric_limits_short_digits10 = 4;
/* ?digits10@?$numeric_limits@G@std@@2HB -> public: static int const std::numeric_limits<unsigned short>::digits10 */
const int std_numeric_limits_unsigned_short_digits10 = 4;
/* ?digits10@?$numeric_limits@H@std@@2HB -> public: static int const std::numeric_limits<int>::digits10 */
const int std_numeric_limits_int_digits10 = 9;
/* ?digits10@?$numeric_limits@I@std@@2HB -> public: static int const std::numeric_limits<unsigned int>::digits10 */
const int std_numeric_limits_unsigned_int_digits10 = 9;
/* ?digits10@?$numeric_limits@J@std@@2HB -> public: static int const std::numeric_limits<long>::digits10 */
const int std_numeric_limits_long_digits10 = 9;
/* ?digits10@?$numeric_limits@K@std@@2HB -> public: static int const std::numeric_limits<unsigned long>::digits10 */
const int std_numeric_limits_unsigned_long_digits10 = 9;
/* ?digits10@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits<float>::digits10 */
const int std_numeric_limits_float_digits10 = FLT_DIG;
/* ?digits10@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits<double>::digits10 */
const int std_numeric_limits_double_digits10 = DBL_DIG;
/* ?digits10@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits<long double>::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<unsigned __int64>::digits10 */
const int std_numeric_limits_unsigned_int64_digits10 = 18;
/* ?digits10@?$numeric_limits@_N@std@@2HB -> public: static int const std::numeric_limits<bool>::digits10 */
const int std_numeric_limits_bool_digits10 = 0;
/* ?digits10@?$numeric_limits@_W@std@@2HB -> public: static int const std::numeric_limits<wchar_t>::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<signed char>::digits */
const int std_numeric_limits_signed_char_digits = 7;
/* ?digits@?$numeric_limits@D@std@@2HB -> public: static int const std::numeric_limits<char>::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<unsigned char>::digits */
const int std_numeric_limits_unsigned_char_digits = 8;
/* ?digits@?$numeric_limits@F@std@@2HB -> public: static int const std::numeric_limits<short>::digits */
const int std_numeric_limits_short_digits = 15;
/* ?digits@?$numeric_limits@G@std@@2HB -> public: static int const std::numeric_limits<unsigned short>::digits */
const int std_numeric_limits_unsigned_short_digits = 16;
/* ?digits@?$numeric_limits@H@std@@2HB -> public: static int const std::numeric_limits<int>::digits */
const int std_numeric_limits_int_digits = 31;
/* ?digits@?$numeric_limits@I@std@@2HB -> public: static int const std::numeric_limits<unsigned int>::digits */
const int std_numeric_limits_unsigned_int_digits = 32;
/* ?digits@?$numeric_limits@J@std@@2HB -> public: static int const std::numeric_limits<long>::digits */
const int std_numeric_limits_long_digits = 31;
/* ?digits@?$numeric_limits@K@std@@2HB -> public: static int const std::numeric_limits<unsigned long>::digits */
const int std_numeric_limits_unsigned_long_digits = 32;
/* ?digits@?$numeric_limits@M@std@@2HB -> public: static int const std::numeric_limits<float>::digits */
const int std_numeric_limits_float_digits = FLT_MANT_DIG;
/* ?digits@?$numeric_limits@N@std@@2HB -> public: static int const std::numeric_limits<double>::digits */
const int std_numeric_limits_double_digits = DBL_MANT_DIG;
/* ?digits@?$numeric_limits@O@std@@2HB -> public: static int const std::numeric_limits<long double>::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<unsigned __int64>::digits */
const int std_numeric_limits_unsigned_int64_digits = 64;
/* ?digits@?$numeric_limits@_N@std@@2HB -> public: static int const std::numeric_limits<bool>::digits */
const int std_numeric_limits_bool_digits = 1;
/* ?digits@?$numeric_limits@_W@std@@2HB -> public: static int const std::numeric_limits<wchar_t>::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<bool>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<signed char> & __thiscall std::numeric_limits<signed char>::operator=(class std::numeric_limits<signed char> const &) */
/* ??4?$numeric_limits@C@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<signed char> & __ptr64 __cdecl std::numeric_limits<signed char>::operator=(class std::numeric_limits<signed char> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@D@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<char> & __thiscall std::numeric_limits<char>::operator=(class std::numeric_limits<char> const &) */
/* ??4?$numeric_limits@D@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<char> & __ptr64 __cdecl std::numeric_limits<char>::operator=(class std::numeric_limits<char> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@E@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<unsigned char> & __thiscall std::numeric_limits<unsigned char>::operator=(class std::numeric_limits<unsigned char> const &) */
/* ??4?$numeric_limits@E@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<unsigned char> & __ptr64 __cdecl std::numeric_limits<unsigned char>::operator=(class std::numeric_limits<unsigned char> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@F@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<short> & __thiscall std::numeric_limits<short>::operator=(class std::numeric_limits<short> const &) */
/* ??4?$numeric_limits@F@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<short> & __ptr64 __cdecl std::numeric_limits<short>::operator=(class std::numeric_limits<short> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@G@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<unsigned short> & __thiscall std::numeric_limits<unsigned short>::operator=(class std::numeric_limits<unsigned short> const &) */
/* ??4?$numeric_limits@G@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<unsigned short> & __ptr64 __cdecl std::numeric_limits<unsigned short>::operator=(class std::numeric_limits<unsigned short> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@H@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<int> & __thiscall std::numeric_limits<int>::operator=(class std::numeric_limits<int> const &) */
/* ??4?$numeric_limits@H@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<int> & __ptr64 __cdecl std::numeric_limits<int>::operator=(class std::numeric_limits<int> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@I@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<unsigned int> & __thiscall std::numeric_limits<unsigned int>::operator=(class std::numeric_limits<unsigned int> const &) */
/* ??4?$numeric_limits@I@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<unsigned int> & __ptr64 __cdecl std::numeric_limits<unsigned int>::operator=(class std::numeric_limits<unsigned int> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@J@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<long> & __thiscall std::numeric_limits<long>::operator=(class std::numeric_limits<long> const &) */
/* ??4?$numeric_limits@J@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<long> & __ptr64 __cdecl std::numeric_limits<long>::operator=(class std::numeric_limits<long> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@K@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<unsigned long> & __thiscall std::numeric_limits<unsigned long>::operator=(class std::numeric_limits<unsigned long> const &) */
/* ??4?$numeric_limits@K@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<unsigned long> & __ptr64 __cdecl std::numeric_limits<unsigned long>::operator=(class std::numeric_limits<unsigned long> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@M@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<float> & __thiscall std::numeric_limits<float>::operator=(class std::numeric_limits<float> const &) */
/* ??4?$numeric_limits@M@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<float> & __ptr64 __cdecl std::numeric_limits<float>::operator=(class std::numeric_limits<float> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@N@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<double> & __thiscall std::numeric_limits<double>::operator=(class std::numeric_limits<double> const &) */
/* ??4?$numeric_limits@N@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<double> & __ptr64 __cdecl std::numeric_limits<double>::operator=(class std::numeric_limits<double> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@O@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<long double> & __thiscall std::numeric_limits<long double>::operator=(class std::numeric_limits<long double> const &) */
/* ??4?$numeric_limits@O@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<long double> & __ptr64 __cdecl std::numeric_limits<long double>::operator=(class std::numeric_limits<long double> 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<unsigned __int64> & __thiscall std::numeric_limits<unsigned __int64>::operator=(class std::numeric_limits<unsigned __int64> const &) */
/* ??4?$numeric_limits@_K@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<unsigned __int64> & __ptr64 __cdecl std::numeric_limits<unsigned __int64>::operator=(class std::numeric_limits<unsigned __int64> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@_N@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<bool> & __thiscall std::numeric_limits<bool>::operator=(class std::numeric_limits<bool> const &) */
/* ??4?$numeric_limits@_N@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<bool> & __ptr64 __cdecl std::numeric_limits<bool>::operator=(class std::numeric_limits<bool> const & __ptr64) __ptr64 */
/* ??4?$numeric_limits@_W@std@@QAEAAV01@ABV01@@Z -> public: class std::numeric_limits<wchar_t> & __thiscall std::numeric_limits<wchar_t>::operator=(class std::numeric_limits<wchar_t> const &) */
/* ??4?$numeric_limits@_W@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::numeric_limits<wchar_t> & __ptr64 __cdecl std::numeric_limits<wchar_t>::operator=(class std::numeric_limits<wchar_t> 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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<signed char>::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<char>::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<unsigned char>::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<short>::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<unsigned short>::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<int>::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<unsigned int>::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<long>::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<unsigned long>::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<float>::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<double>::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<long double>::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<unsigned __int64>::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<bool>::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<wchar_t>::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<float> & __thiscall std::_Ctraits<float>::operator=(class std::_Ctraits<float> const &) */
/* ??4?$_Ctraits@M@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::_Ctraits<float> & __ptr64 __cdecl std::_Ctraits<float>::operator=(class std::_Ctraits<float> const & __ptr64) __ptr64 */
/* ??4?$_Ctraits@N@std@@QAEAAV01@ABV01@@Z -> public: class std::_Ctraits<double> & __thiscall std::_Ctraits<double>::operator=(class std::_Ctraits<double> const &) */
/* ??4?$_Ctraits@N@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::_Ctraits<double> & __ptr64 __cdecl std::_Ctraits<double>::operator=(class std::_Ctraits<double> const & __ptr64) __ptr64 */
/* ??4?$_Ctraits@O@std@@QAEAAV01@ABV01@@Z -> public: class std::_Ctraits<long double> & __thiscall std::_Ctraits<long double>::operator=(class std::_Ctraits<long double> const &) */
/* ??4?$_Ctraits@O@std@@QEAAAEAV01@AEBV01@@Z -> public: class std::_Ctraits<long double> & __ptr64 __cdecl std::_Ctraits<long double>::operator=(class std::_Ctraits<long double> 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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::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<float>::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<double>::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<long double>::tan(long double) */
LDOUBLE __cdecl std_Ctraits_long_double_tan( LDOUBLE x ) { return tan( x ); }

338
dlls/msvcp100/memory.c Normal file
View File

@ -0,0 +1,338 @@
/*
* 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 <stdarg.h>
#include <limits.h>
#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<wchar_t> */
/* ?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<unsigned short> */
/* ?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<void> */
/* ??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;
}

221
dlls/msvcp100/misc.c Normal file
View File

@ -0,0 +1,221 @@
/*
* 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 <stdarg.h>
#include <limits.h>
#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)
{
this->mutex = CreateMutexW(NULL, FALSE, NULL);
return this;
}
/* ??1_Mutex@std@@QAE@XZ */
/* ??1_Mutex@std@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER(mutex_dtor, 4)
void __thiscall mutex_dtor(mutex *this)
{
CloseHandle(this->mutex);
}
/* ?_Lock@_Mutex@std@@QAEXXZ */
/* ?_Lock@_Mutex@std@@QEAAXXZ */
DEFINE_THISCALL_WRAPPER(mutex_lock, 4)
void __thiscall mutex_lock(mutex *this)
{
WaitForSingleObject(this->mutex, INFINITE);
}
/* ?_Unlock@_Mutex@std@@QAEXXZ */
/* ?_Unlock@_Mutex@std@@QEAAXXZ */
DEFINE_THISCALL_WRAPPER(mutex_unlock, 4)
void __thiscall mutex_unlock(mutex *this)
{
ReleaseMutex(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 }
};
int i;
for(i=0; i<sizeof(properties)/sizeof(properties[0]); i++)
if(!strcmp(property, properties[i].name))
return properties[i].mask;
return 0;
}
typedef void (__cdecl *MSVCP_new_handler_func)(void);
static MSVCP_new_handler_func MSVCP_new_handler;
static int __cdecl new_handler_wrapper(MSVCP_size_t unused)
{
MSVCP_new_handler();
return 1;
}
/* ?set_new_handler@std@@YAP6AXXZP6AXXZ@Z */
MSVCP_new_handler_func __cdecl set_new_handler(MSVCP_new_handler_func new_handler)
{
MSVCP_new_handler_func old_handler = MSVCP_new_handler;
TRACE("%p\n", new_handler);
MSVCP_new_handler = new_handler;
MSVCRT_set_new_handler(new_handler ? new_handler_wrapper : NULL);
return old_handler;
}
/* ?set_new_handler@std@@YAP6AXXZH@Z */
MSVCP_new_handler_func __cdecl set_new_handler_reset(int unused)
{
return set_new_handler(NULL);
}

467
dlls/msvcp100/msvcp.h Normal file
View File

@ -0,0 +1,467 @@
/*
* 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 "stdlib.h"
#include "windef.h"
#include "cxx.h"
typedef unsigned char MSVCP_bool;
typedef SIZE_T MSVCP_size_t;
typedef SSIZE_T streamoff;
typedef SSIZE_T streamsize;
void __cdecl _invalid_parameter(const wchar_t*, const wchar_t*,
const wchar_t*, unsigned int, uintptr_t);
BOOL __cdecl __uncaught_exception(void);
extern void* (__cdecl *MSVCRT_operator_new)(MSVCP_size_t);
extern void (__cdecl *MSVCRT_operator_delete)(void*);
extern void* (__cdecl *MSVCRT_set_new_handler)(void*);
/* basic_string<char, char_traits<char>, allocator<char>> */
#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*);
#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<char> */
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<wchar> */
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<char> */
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<wchar> */
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<char> */
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<wchar> */
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<char> */
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<char> */
/* class num_put<wchar> */
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_io(void);
void free_io(void);

View File

@ -22,33 +22,64 @@
#include <stdarg.h> #include <stdarg.h>
#include "msvcp.h"
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "wine/debug.h"
/* Copied from dlls/msvcrt/cpp.c */ WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
#ifdef __i386__ /* thiscall functions are i386-specific */
#define THISCALL(func) __thiscall_ ## func #ifdef __i386__
#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 DEFINE_VTBL_WRAPPER(off) \
#define THISCALL_NAME(func) __ASM_NAME(#func) __ASM_GLOBAL_FUNC(vtbl_wrapper_ ## off, \
#define __thiscall __cdecl "popl %eax\n\t" \
#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */ "popl %ecx\n\t" \
"pushl %eax\n\t" \
"movl 0(%ecx), %eax\n\t" \
"jmp *" #off "(%eax)\n\t")
#endif /* __i386__ */ 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);
DEFINE_VTBL_WRAPPER(60);
/* ?_BADOFF@std@@3_JB -> __int64 const std::_BADOFF */ #endif
const __int64 std_BADOFF = -1;
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");
}
}
/* _Container_base0 is used by apps compiled without iterator checking /* _Container_base0 is used by apps compiled without iterator checking
* (i.e. with _ITERATOR_DEBUG_LEVEL=0 ). * (i.e. with _ITERATOR_DEBUG_LEVEL=0 ).
@ -72,15 +103,29 @@ void __thiscall Container_base0_Swap_all(void *this, void *that)
{ {
} }
BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
switch (reason) TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{ {
case DLL_WINE_PREATTACH: case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */ return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hdll); init_cxx_funcs();
init_lockit();
init_io();
break;
case DLL_PROCESS_DETACH:
free_io();
free_locale();
free_lockit();
break;
} }
return TRUE; return TRUE;
} }
/* ?_BADOFF@std@@3JB -> long const std::_BADOFF */
/* ?_BADOFF@std@@3_JB -> __int64 const std::_BADOFF */
const streamoff std_BADOFF = -1;

4473
dlls/msvcp100/string.c Normal file

File diff suppressed because it is too large Load Diff