2011-06-22 12:02:58 +00:00
|
|
|
/*
|
|
|
|
* 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 "msvcp90.h"
|
2011-07-29 10:29:32 +00:00
|
|
|
#include "locale.h"
|
|
|
|
|
2011-06-22 12:02:58 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wine/debug.h"
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
|
|
|
|
|
2011-12-08 11:09:54 +00:00
|
|
|
char* __cdecl _Getdays(void);
|
2011-12-08 11:10:12 +00:00
|
|
|
char* __cdecl _Getmonths(void);
|
2011-12-08 11:10:26 +00:00
|
|
|
void* __cdecl _Gettnames(void);
|
2011-12-08 11:09:54 +00:00
|
|
|
|
2011-06-22 12:03:24 +00:00
|
|
|
typedef int category;
|
|
|
|
|
2011-12-15 09:16:48 +00:00
|
|
|
typedef struct {
|
2011-06-22 12:03:09 +00:00
|
|
|
MSVCP_size_t id;
|
|
|
|
} locale_id;
|
|
|
|
|
2011-12-15 09:16:48 +00:00
|
|
|
typedef struct {
|
2011-06-22 12:02:58 +00:00
|
|
|
const vtable_ptr *vtable;
|
|
|
|
MSVCP_size_t refs;
|
|
|
|
} locale_facet;
|
|
|
|
|
2011-06-22 12:03:24 +00:00
|
|
|
typedef struct _locale__Locimp {
|
|
|
|
locale_facet facet;
|
|
|
|
locale_facet **facetvec;
|
|
|
|
MSVCP_size_t facet_cnt;
|
|
|
|
category catmask;
|
|
|
|
MSVCP_bool transparent;
|
|
|
|
basic_string_char name;
|
|
|
|
} locale__Locimp;
|
|
|
|
|
2011-07-29 10:29:32 +00:00
|
|
|
typedef struct {
|
|
|
|
void *timeptr;
|
|
|
|
} _Timevec;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
_Lockit lock;
|
|
|
|
basic_string_char days;
|
|
|
|
basic_string_char months;
|
|
|
|
basic_string_char oldlocname;
|
|
|
|
basic_string_char newlocname;
|
|
|
|
} _Locinfo;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
LCID handle;
|
|
|
|
unsigned page;
|
|
|
|
} _Collvec;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
LCID handle;
|
|
|
|
unsigned page;
|
2011-12-06 11:49:52 +00:00
|
|
|
short *table;
|
2011-07-29 10:29:32 +00:00
|
|
|
int delfl;
|
|
|
|
} _Ctypevec;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
LCID handle;
|
|
|
|
unsigned page;
|
|
|
|
} _Cvtvec;
|
|
|
|
|
2011-12-15 09:16:48 +00:00
|
|
|
typedef struct {
|
|
|
|
locale_facet facet;
|
|
|
|
_Collvec coll;
|
|
|
|
} collate;
|
|
|
|
|
2011-12-16 10:31:45 +00:00
|
|
|
typedef struct {
|
|
|
|
locale_facet facet;
|
|
|
|
} ctype_base;
|
|
|
|
|
2011-06-22 12:03:09 +00:00
|
|
|
/* ?_Id_cnt@id@locale@std@@0HA */
|
|
|
|
int locale_id__Id_cnt = 0;
|
|
|
|
|
2011-06-22 12:03:24 +00:00
|
|
|
/* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
|
|
|
|
/* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
|
2011-06-27 20:07:30 +00:00
|
|
|
locale__Locimp *locale__Locimp__Clocptr = NULL;
|
2011-06-22 12:03:24 +00:00
|
|
|
|
2011-08-31 21:04:17 +00:00
|
|
|
/* ??1facet@locale@std@@UAE@XZ */
|
|
|
|
/* ??1facet@locale@std@@UEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4)
|
|
|
|
void __thiscall locale_facet_dtor(locale_facet *this)
|
|
|
|
{
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8)
|
|
|
|
locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
|
|
|
|
{
|
|
|
|
TRACE("(%p %x)\n", this, flags);
|
|
|
|
if(flags & 2) {
|
|
|
|
/* we have an array, with the number of elements stored before the first object */
|
|
|
|
int i, *ptr = (int *)this-1;
|
|
|
|
|
|
|
|
for(i=*ptr-1; i>=0; i--)
|
|
|
|
locale_facet_dtor(this+i);
|
|
|
|
MSVCRT_operator_delete(ptr);
|
|
|
|
} else {
|
|
|
|
locale_facet_dtor(this);
|
|
|
|
if(flags & 1)
|
|
|
|
MSVCRT_operator_delete(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:16:48 +00:00
|
|
|
const vtable_ptr MSVCP_locale_facet_vtable[] = {
|
2011-08-31 21:04:17 +00:00
|
|
|
(vtable_ptr)THISCALL_NAME(MSVCP_locale_facet_vector_dtor)
|
|
|
|
};
|
2011-11-23 15:13:46 +00:00
|
|
|
#ifdef __i386__
|
|
|
|
static inline locale_facet* call_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
|
|
|
|
{
|
|
|
|
locale_facet *ret;
|
|
|
|
void *dummy;
|
|
|
|
|
|
|
|
__asm__ __volatile__ ("pushl %3\n\tcall *%2"
|
|
|
|
: "=a" (ret), "=c" (dummy)
|
|
|
|
: "r" (this->vtable[0]), "r" (flags), "1" (this)
|
|
|
|
: "edx", "memory" );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
static inline locale_facet* call_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
|
|
|
|
{
|
|
|
|
locale_facet * (__thiscall *dtor)(locale_facet *, unsigned int) = (void *)this->vtable[0];
|
|
|
|
return dtor(this, flags);
|
|
|
|
}
|
|
|
|
#endif
|
2011-06-22 12:02:58 +00:00
|
|
|
|
2011-06-22 12:03:09 +00:00
|
|
|
/* ??0id@locale@std@@QAE@I@Z */
|
|
|
|
/* ??0id@locale@std@@QEAA@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8)
|
|
|
|
locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
|
|
|
|
{
|
2011-08-24 12:38:35 +00:00
|
|
|
TRACE("(%p %lu)\n", this, id);
|
|
|
|
|
|
|
|
this->id = id;
|
|
|
|
return this;
|
2011-06-22 12:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??_Fid@locale@std@@QAEXXZ */
|
|
|
|
/* ??_Fid@locale@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4)
|
|
|
|
locale_id* __thiscall locale_id_ctor(locale_id *this)
|
|
|
|
{
|
2011-08-24 12:38:35 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
this->id = 0;
|
|
|
|
return this;
|
2011-06-22 12:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??Bid@locale@std@@QAEIXZ */
|
|
|
|
/* ??Bid@locale@std@@QEAA_KXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4)
|
|
|
|
MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this)
|
|
|
|
{
|
2011-08-24 12:38:35 +00:00
|
|
|
_Lockit lock;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
if(!this->id) {
|
|
|
|
_Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
|
|
|
|
this->id = ++locale_id__Id_cnt;
|
|
|
|
_Lockit_dtor(&lock);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this->id;
|
2011-06-22 12:03:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
|
|
|
|
/* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
|
|
|
|
int* __cdecl locale_id__Id_cnt_func(void)
|
|
|
|
{
|
2011-08-24 12:38:35 +00:00
|
|
|
TRACE("\n");
|
|
|
|
return &locale_id__Id_cnt;
|
2011-06-22 12:03:09 +00:00
|
|
|
}
|
|
|
|
|
2011-06-22 12:02:58 +00:00
|
|
|
/* ??_Ffacet@locale@std@@QAEXXZ */
|
|
|
|
/* ??_Ffacet@locale@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4)
|
|
|
|
locale_facet* __thiscall locale_facet_ctor(locale_facet *this)
|
|
|
|
{
|
2011-08-24 12:38:44 +00:00
|
|
|
TRACE("(%p)\n", this);
|
2011-06-22 12:02:58 +00:00
|
|
|
this->vtable = MSVCP_locale_facet_vtable;
|
2011-08-24 12:38:44 +00:00
|
|
|
this->refs = 0;
|
|
|
|
return this;
|
2011-06-22 12:02:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0facet@locale@std@@IAE@I@Z */
|
|
|
|
/* ??0facet@locale@std@@IEAA@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8)
|
|
|
|
locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs)
|
|
|
|
{
|
2011-08-24 12:38:44 +00:00
|
|
|
TRACE("(%p %lu)\n", this, refs);
|
|
|
|
this->vtable = MSVCP_locale_facet_vtable;
|
|
|
|
this->refs = refs;
|
|
|
|
return this;
|
2011-06-22 12:02:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Incref@facet@locale@std@@QAEXXZ */
|
|
|
|
/* ?_Incref@facet@locale@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4)
|
|
|
|
void __thiscall locale_facet__Incref(locale_facet *this)
|
|
|
|
{
|
2011-08-24 12:38:44 +00:00
|
|
|
_Lockit lock;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
_Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
|
|
|
|
this->refs++;
|
|
|
|
_Lockit_dtor(&lock);
|
2011-06-22 12:02:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
|
|
|
|
/* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_facet__Decref, 4)
|
|
|
|
locale_facet* __thiscall locale_facet__Decref(locale_facet *this)
|
|
|
|
{
|
2011-08-24 12:38:44 +00:00
|
|
|
_Lockit lock;
|
|
|
|
locale_facet *ret;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
_Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
|
|
|
|
if(this->refs)
|
|
|
|
this->refs--;
|
|
|
|
|
2011-11-23 15:13:46 +00:00
|
|
|
ret = this->refs ? NULL : this;
|
2011-08-24 12:38:44 +00:00
|
|
|
_Lockit_dtor(&lock);
|
|
|
|
|
|
|
|
return ret;
|
2011-06-22 12:02:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
|
|
|
|
/* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
|
2011-06-22 12:03:39 +00:00
|
|
|
MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const locale *loc)
|
2011-06-22 12:02:58 +00:00
|
|
|
{
|
2011-08-24 12:38:44 +00:00
|
|
|
TRACE("(%p %p)\n", facet, loc);
|
|
|
|
return -1;
|
2011-06-22 12:02:58 +00:00
|
|
|
}
|
|
|
|
|
2011-12-15 09:16:48 +00:00
|
|
|
/* ?id@?$collate@D@std@@2V0locale@2@A */
|
|
|
|
locale_id collate_char_id = {0};
|
|
|
|
|
|
|
|
/* ??_7?$collate@D@std@@6B@ */
|
|
|
|
extern const vtable_ptr MSVCP_collate_char_vtable;
|
|
|
|
|
|
|
|
/* ??0?$collate@D@std@@IAE@PBDI@Z */
|
|
|
|
/* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_ctor_name, 12)
|
|
|
|
collate* __thiscall collate_char_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
FIXME("(%p %s %lu) stub\n", this, name, refs);
|
|
|
|
this->facet.vtable = &MSVCP_collate_char_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
|
|
|
|
/* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo, 12)
|
|
|
|
collate* __thiscall collate_char_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
|
|
|
|
this->facet.vtable = &MSVCP_collate_char_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0?$collate@D@std@@QAE@I@Z */
|
|
|
|
/* ??0?$collate@D@std@@QEAA@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs, 8)
|
|
|
|
collate* __thiscall collate_char_ctor_refs(collate *this, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
FIXME("(%p %lu) stub\n", this, refs);
|
|
|
|
this->facet.vtable = &MSVCP_collate_char_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??1?$collate@D@std@@MAE@XZ */
|
|
|
|
/* ??1?$collate@D@std@@MEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_dtor, 4)
|
|
|
|
void __thiscall collate_char_dtor(collate *this)
|
|
|
|
{
|
|
|
|
FIXME("(%p) stub\n", this);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_THISCALL_WRAPPER(MSVCP_collate_char_vector_dtor, 8)
|
|
|
|
collate* __thiscall MSVCP_collate_char_vector_dtor(collate *this, unsigned int flags)
|
|
|
|
{
|
|
|
|
TRACE("(%p %x)\n", this, flags);
|
|
|
|
if(flags & 2) {
|
|
|
|
/* we have an array, with the number of elements stored before the first object */
|
|
|
|
int i, *ptr = (int *)this-1;
|
|
|
|
|
|
|
|
for(i=*ptr-1; i>=0; i--)
|
|
|
|
collate_char_dtor(this+i);
|
|
|
|
MSVCRT_operator_delete(ptr);
|
|
|
|
} else {
|
|
|
|
collate_char_dtor(this);
|
|
|
|
if(flags & 1)
|
|
|
|
MSVCRT_operator_delete(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??_F?$collate@D@std@@QAEXXZ */
|
|
|
|
/* ??_F?$collate@D@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_ctor, 4)
|
|
|
|
collate* __thiscall collate_char_ctor(collate *this)
|
|
|
|
{
|
|
|
|
FIXME("(%p) stub\n", this);
|
|
|
|
this->facet.vtable = &MSVCP_collate_char_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
|
|
|
|
/* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
|
|
|
|
MSVCP_size_t __cdecl collate_char__Getcat(const locale_facet **facet, const locale_facet *loc)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p) stub\n", facet, loc);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
|
|
|
|
/* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char__Init, 8)
|
|
|
|
void __thiscall collate_char__Init(collate *this, const _Locinfo *locinfo)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p) stub\n", this, locinfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
|
|
|
|
/* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_do_compare, 20)
|
|
|
|
int __thiscall collate_char_do_compare(const collate *this, const char *first1,
|
|
|
|
const char *last1, const char *first2, const char *last2)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p %p %p) stub\n", this, first1, last1, first2, last2);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?compare@?$collate@D@std@@QBEHPBD000@Z */
|
|
|
|
/* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_compare, 20)
|
|
|
|
int __thiscall collate_char_compare(const collate *this, const char *first1,
|
|
|
|
const char *last1, const char *first2, const char *last2)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p %p %p) stub\n", this, first1, last1, first2, last2);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
|
|
|
|
/* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_do_hash, 12)
|
|
|
|
LONG __thiscall collate_char_do_hash(const collate *this,
|
|
|
|
const char *first, const char *last)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?hash@?$collate@D@std@@QBEJPBD0@Z */
|
|
|
|
/* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_char_hash, 12)
|
|
|
|
LONG __thiscall collate_char_hash(const collate *this,
|
|
|
|
const char *first, const char *last)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
|
|
|
|
/* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER_RETPTR(collate_char_do_transform, 12)
|
|
|
|
basic_string_char __thiscall collate_char_do_transform(const collate *this,
|
|
|
|
const char *first, const char *last)
|
|
|
|
{
|
|
|
|
basic_string_char ret = {0}; /* FIXME */
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
|
|
|
|
/* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER_RETPTR(collate_char_transform, 12)
|
|
|
|
basic_string_char __thiscall collate_char_transform(const collate *this,
|
|
|
|
const char *first, const char *last)
|
|
|
|
{
|
|
|
|
basic_string_char ret = {0}; /* FIXME */
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:08 +00:00
|
|
|
/* ?id@?$collate@_W@std@@2V0locale@2@A */
|
|
|
|
locale_id collate_wchar_id = {0};
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?id@?$collate@G@std@@2V0locale@2@A */
|
|
|
|
locale_id collate_short_id = {0};
|
2011-12-15 09:17:08 +00:00
|
|
|
|
|
|
|
/* ??_7?$collate@_W@std@@6B@ */
|
|
|
|
extern const vtable_ptr MSVCP_collate_wchar_vtable;
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ??_7?$collate@G@std@@6B@ */
|
|
|
|
extern const vtable_ptr MSVCP_collate_short_vtable;
|
2011-12-15 09:17:08 +00:00
|
|
|
|
|
|
|
/* ??0?$collate@_W@std@@IAE@PBDI@Z */
|
|
|
|
/* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name, 12)
|
|
|
|
collate* __thiscall collate_wchar_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
FIXME("(%p %s %lu) stub\n", this, name, refs);
|
|
|
|
this->facet.vtable = &MSVCP_collate_wchar_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ??0?$collate@G@std@@IAE@PBDI@Z */
|
|
|
|
/* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_short_ctor_name, 12)
|
|
|
|
collate* __thiscall collate_short_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
collate *ret = collate_wchar_ctor_name(this, name, refs);
|
|
|
|
ret->facet.vtable = &MSVCP_collate_short_vtable;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:08 +00:00
|
|
|
/* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
|
|
|
|
/* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo, 12)
|
|
|
|
collate* __thiscall collate_wchar_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
|
|
|
|
this->facet.vtable = &MSVCP_collate_wchar_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
|
|
|
|
/* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo, 12)
|
|
|
|
collate* __thiscall collate_short_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
collate *ret = collate_wchar_ctor_locinfo(this, locinfo, refs);
|
|
|
|
ret->facet.vtable = &MSVCP_collate_short_vtable;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:08 +00:00
|
|
|
/* ??0?$collate@_W@std@@QAE@I@Z */
|
|
|
|
/* ??0?$collate@_W@std@@QEAA@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs, 8)
|
|
|
|
collate* __thiscall collate_wchar_ctor_refs(collate *this, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
FIXME("(%p %lu) stub\n", this, refs);
|
|
|
|
this->facet.vtable = &MSVCP_collate_wchar_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ??0?$collate@G@std@@QAE@I@Z */
|
|
|
|
/* ??0?$collate@G@std@@QEAA@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs, 8)
|
|
|
|
collate* __thiscall collate_short_ctor_refs(collate *this, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
collate *ret = collate_wchar_ctor_refs(this, refs);
|
|
|
|
ret->facet.vtable = &MSVCP_collate_short_vtable;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:08 +00:00
|
|
|
/* ??1?$collate@_W@std@@MAE@XZ */
|
|
|
|
/* ??1?$collate@_W@std@@MEAA@XZ */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ??1?$collate@G@std@@MAE@XZ */
|
|
|
|
/* ??1?$collate@G@std@@MEAA@XZ */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_dtor, 4)
|
|
|
|
void __thiscall collate_wchar_dtor(collate *this)
|
|
|
|
{
|
|
|
|
FIXME("(%p) stub\n", this);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_THISCALL_WRAPPER(MSVCP_collate_wchar_vector_dtor, 8)
|
|
|
|
collate* __thiscall MSVCP_collate_wchar_vector_dtor(collate *this, unsigned int flags)
|
|
|
|
{
|
|
|
|
TRACE("(%p %x)\n", this, flags);
|
|
|
|
if(flags & 2) {
|
|
|
|
/* we have an array, with the number of elements stored before the first object */
|
|
|
|
int i, *ptr = (int *)this-1;
|
|
|
|
|
|
|
|
for(i=*ptr-1; i>=0; i--)
|
|
|
|
collate_wchar_dtor(this+i);
|
|
|
|
MSVCRT_operator_delete(ptr);
|
|
|
|
} else {
|
|
|
|
collate_wchar_dtor(this);
|
|
|
|
if(flags & 1)
|
|
|
|
MSVCRT_operator_delete(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:28 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(MSVCP_collate_short_vector_dtor, 8)
|
|
|
|
collate* __thiscall MSVCP_collate_short_vector_dtor(collate *this, unsigned int flags)
|
|
|
|
{
|
|
|
|
return MSVCP_collate_wchar_vector_dtor(this, flags);
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:08 +00:00
|
|
|
/* ??_F?$collate@_W@std@@QAEXXZ */
|
|
|
|
/* ??_F?$collate@_W@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_ctor, 4)
|
|
|
|
collate* __thiscall collate_wchar_ctor(collate *this)
|
|
|
|
{
|
|
|
|
FIXME("(%p) stub\n", this);
|
|
|
|
this->facet.vtable = &MSVCP_collate_wchar_vtable;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ??_F?$collate@G@std@@QAEXXZ */
|
|
|
|
/* ??_F?$collate@G@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(collate_short_ctor, 4)
|
|
|
|
collate* __thiscall collate_short_ctor(collate *this)
|
|
|
|
{
|
|
|
|
collate *ret = collate_wchar_ctor(this);
|
|
|
|
ret->facet.vtable = &MSVCP_collate_short_vtable;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-12-15 09:17:08 +00:00
|
|
|
/* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
|
|
|
|
/* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
|
|
|
|
/* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
MSVCP_size_t __cdecl collate_wchar__Getcat(const locale_facet **facet, const locale_facet *loc)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p) stub\n", facet, loc);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
|
|
|
|
/* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
|
|
|
|
/* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar__Init, 8)
|
|
|
|
void __thiscall collate_wchar__Init(collate *this, const _Locinfo *locinfo)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p) stub\n", this, locinfo);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
|
|
|
|
/* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
|
|
|
|
/* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare, 20)
|
|
|
|
int __thiscall collate_wchar_do_compare(const collate *this, const wchar_t *first1,
|
|
|
|
const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p %p %p) stub\n", this, first1, last1, first2, last2);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
|
|
|
|
/* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?compare@?$collate@G@std@@QBEHPBG000@Z */
|
|
|
|
/* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_compare, 20)
|
|
|
|
int __thiscall collate_wchar_compare(const collate *this, const wchar_t *first1,
|
|
|
|
const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p %p %p) stub\n", this, first1, last1, first2, last2);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
|
|
|
|
/* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
|
|
|
|
/* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash, 12)
|
|
|
|
LONG __thiscall collate_wchar_do_hash(const collate *this,
|
|
|
|
const wchar_t *first, const wchar_t *last)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
|
|
|
|
/* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?hash@?$collate@G@std@@QBEJPBG0@Z */
|
|
|
|
/* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(collate_wchar_hash, 12)
|
|
|
|
LONG __thiscall collate_wchar_hash(const collate *this,
|
|
|
|
const wchar_t *first, const wchar_t *last)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
|
|
|
|
/* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
|
|
|
|
/* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER_RETPTR(collate_wchar_do_transform, 12)
|
|
|
|
basic_string_wchar __thiscall collate_wchar_do_transform(const collate *this,
|
|
|
|
const wchar_t *first, const wchar_t *last)
|
|
|
|
{
|
|
|
|
basic_string_wchar ret = {0}; /* FIXME */
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
|
|
|
|
/* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
|
2011-12-15 09:17:28 +00:00
|
|
|
/* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
|
|
|
|
/* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
|
2011-12-15 09:17:08 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER_RETPTR(collate_wchar_transform, 12)
|
|
|
|
basic_string_wchar __thiscall collate_wchar_transform(const collate *this,
|
|
|
|
const wchar_t *first, const wchar_t *last)
|
|
|
|
{
|
|
|
|
basic_string_wchar ret = {0}; /* FIXME */
|
|
|
|
FIXME("(%p %p %p) stub\n", this, first, last);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-12-16 10:31:45 +00:00
|
|
|
/* ??_7ctype_base@std@@6B@ */
|
|
|
|
extern const vtable_ptr MSVCP_ctype_base_vtable;
|
|
|
|
|
|
|
|
/* ??0ctype_base@std@@QAE@I@Z */
|
|
|
|
/* ??0ctype_base@std@@QEAA@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs, 8)
|
|
|
|
ctype_base* __thiscall ctype_base_ctor_refs(ctype_base *this, MSVCP_size_t refs)
|
|
|
|
{
|
|
|
|
TRACE("(%p %lu)\n", this, refs);
|
|
|
|
locale_facet_ctor_refs(&this->facet, refs);
|
|
|
|
this->facet.vtable = &MSVCP_ctype_base_vtable;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??_Fctype_base@std@@QAEXXZ */
|
|
|
|
/* ??_Fctype_base@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(ctype_base_ctor, 4)
|
|
|
|
ctype_base* __thiscall ctype_base_ctor(ctype_base *this)
|
|
|
|
{
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
locale_facet_ctor_refs(&this->facet, 0);
|
|
|
|
this->facet.vtable = &MSVCP_ctype_base_vtable;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??1ctype_base@std@@UAE@XZ */
|
|
|
|
/* ??1ctype_base@std@@UEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(ctype_base_dtor, 4)
|
|
|
|
void __thiscall ctype_base_dtor(ctype_base *this)
|
|
|
|
{
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_THISCALL_WRAPPER(MSVCP_ctype_base_vector_dtor, 8)
|
|
|
|
ctype_base* __thiscall MSVCP_ctype_base_vector_dtor(ctype_base *this, unsigned int flags)
|
|
|
|
{
|
|
|
|
TRACE("(%p %x)\n", this, flags);
|
|
|
|
if(flags & 2) {
|
|
|
|
/* we have an array, with the number of elements stored before the first object */
|
|
|
|
int i, *ptr = (int *)this-1;
|
|
|
|
|
|
|
|
for(i=*ptr-1; i>=0; i--)
|
|
|
|
ctype_base_dtor(this+i);
|
|
|
|
MSVCRT_operator_delete(ptr);
|
|
|
|
} else {
|
|
|
|
ctype_base_dtor(this);
|
|
|
|
if(flags & 1)
|
|
|
|
MSVCRT_operator_delete(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Xran@ctype_base@std@@KAXXZ */
|
|
|
|
void __cdecl ctype_base__Xran(void)
|
|
|
|
{
|
|
|
|
throw_exception(EXCEPTION_OUT_OF_RANGE, "out of range in ctype<T>");
|
|
|
|
}
|
|
|
|
|
2011-06-22 12:03:24 +00:00
|
|
|
/* ??0_Locimp@locale@std@@AAE@_N@Z */
|
|
|
|
/* ??0_Locimp@locale@std@@AEAA@_N@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8)
|
|
|
|
locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, MSVCP_bool transparent)
|
|
|
|
{
|
2011-11-23 15:13:46 +00:00
|
|
|
TRACE("(%p %d)\n", this, transparent);
|
|
|
|
|
|
|
|
memset(this, 0, sizeof(locale__Locimp));
|
|
|
|
locale_facet_ctor_refs(&this->facet, 1);
|
|
|
|
this->transparent = transparent;
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&this->name, "*");
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??_F_Locimp@locale@std@@QAEXXZ */
|
|
|
|
/* ??_F_Locimp@locale@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4)
|
|
|
|
locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this)
|
|
|
|
{
|
|
|
|
return locale__Locimp_ctor_transparent(this, FALSE);
|
2011-06-22 12:03:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
|
|
|
|
/* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor, 8)
|
|
|
|
locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const locale__Locimp *copy)
|
|
|
|
{
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit lock;
|
2011-11-23 15:13:46 +00:00
|
|
|
MSVCP_size_t i;
|
|
|
|
|
|
|
|
TRACE("(%p %p)\n", this, copy);
|
|
|
|
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
|
2011-11-23 15:13:46 +00:00
|
|
|
memcpy(this, copy, sizeof(locale__Locimp));
|
|
|
|
locale_facet_ctor_refs(&this->facet, 1);
|
|
|
|
if(copy->facetvec) {
|
|
|
|
this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*));
|
|
|
|
if(!this->facetvec) {
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit_dtor(&lock);
|
2011-11-23 15:13:46 +00:00
|
|
|
ERR("Out of memory\n");
|
|
|
|
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
for(i=0; i<this->facet_cnt; i++)
|
|
|
|
if(this->facetvec[i])
|
|
|
|
locale_facet__Incref(this->facetvec[i]);
|
|
|
|
}
|
|
|
|
MSVCP_basic_string_char_copy_ctor(&this->name, ©->name);
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit_dtor(&lock);
|
2011-11-23 15:13:46 +00:00
|
|
|
return this;
|
2011-06-22 12:03:24 +00:00
|
|
|
}
|
|
|
|
|
2011-08-24 17:33:30 +00:00
|
|
|
/* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
|
|
|
|
/* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
|
|
|
|
locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const locale__Locimp *copy)
|
|
|
|
{
|
2011-11-23 15:13:46 +00:00
|
|
|
return locale__Locimp_copy_ctor(this, copy);
|
2011-08-24 17:33:30 +00:00
|
|
|
}
|
|
|
|
|
2011-06-22 12:03:24 +00:00
|
|
|
/* ??1_Locimp@locale@std@@MAE@XZ */
|
|
|
|
/* ??1_Locimp@locale@std@@MEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor, 4)
|
|
|
|
void __thiscall locale__Locimp_dtor(locale__Locimp *this)
|
|
|
|
{
|
2011-11-23 15:13:46 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
if(locale_facet__Decref(&this->facet)) {
|
|
|
|
MSVCP_size_t i;
|
|
|
|
for(i=0; i<this->facet_cnt; i++)
|
|
|
|
if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i]))
|
|
|
|
call_locale_facet_vector_dtor(this->facetvec[i], 0);
|
|
|
|
|
|
|
|
MSVCRT_operator_delete(this->facetvec);
|
|
|
|
MSVCP_basic_string_char_dtor(&this->name);
|
|
|
|
}
|
2011-06-22 12:03:24 +00:00
|
|
|
}
|
|
|
|
|
2011-08-24 17:33:30 +00:00
|
|
|
/* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
|
|
|
|
/* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
|
|
|
|
void __cdecl locale__Locimp__Locimp_dtor(locale__Locimp *this)
|
|
|
|
{
|
2011-11-23 15:13:46 +00:00
|
|
|
locale__Locimp_dtor(this);
|
2011-08-24 17:33:30 +00:00
|
|
|
}
|
|
|
|
|
2011-06-22 12:03:24 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor, 8)
|
|
|
|
locale__Locimp* __thiscall MSVCP_locale__Locimp_vector_dtor(locale__Locimp *this, unsigned int flags)
|
|
|
|
{
|
2011-11-23 15:13:46 +00:00
|
|
|
TRACE("(%p %x)\n", this, flags);
|
2011-06-22 12:03:24 +00:00
|
|
|
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--)
|
|
|
|
locale__Locimp_dtor(this+i);
|
|
|
|
MSVCRT_operator_delete(ptr);
|
|
|
|
} else {
|
|
|
|
locale__Locimp_dtor(this);
|
|
|
|
if(flags & 1)
|
|
|
|
MSVCRT_operator_delete(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
|
|
|
|
/* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
|
|
|
|
void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet *facet, MSVCP_size_t id)
|
|
|
|
{
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit lock;
|
|
|
|
|
2011-11-23 15:13:46 +00:00
|
|
|
TRACE("(%p %p %lu)\n", locimp, facet, id);
|
|
|
|
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
|
2011-11-23 15:13:46 +00:00
|
|
|
if(id >= locimp->facet_cnt) {
|
|
|
|
MSVCP_size_t new_size = id+1;
|
|
|
|
locale_facet **new_facetvec;
|
|
|
|
|
|
|
|
if(new_size < locale_id__Id_cnt+1)
|
|
|
|
new_size = locale_id__Id_cnt+1;
|
|
|
|
|
|
|
|
new_facetvec = MSVCRT_operator_new(sizeof(locale_facet*)*new_size);
|
|
|
|
if(!new_facetvec) {
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit_dtor(&lock);
|
2011-11-23 15:13:46 +00:00
|
|
|
ERR("Out of memory\n");
|
|
|
|
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
memset(new_facetvec, 0, sizeof(locale_facet*)*new_size);
|
|
|
|
memcpy(new_facetvec, locimp->facetvec, sizeof(locale_facet*)*locimp->facet_cnt);
|
|
|
|
MSVCRT_operator_delete(locimp->facetvec);
|
|
|
|
locimp->facetvec = new_facetvec;
|
|
|
|
locimp->facet_cnt = new_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(locimp->facetvec[id] && locale_facet__Decref(locimp->facetvec[id]))
|
|
|
|
call_locale_facet_vector_dtor(locimp->facetvec[id], 0);
|
|
|
|
|
|
|
|
locimp->facetvec[id] = facet;
|
|
|
|
if(facet)
|
|
|
|
locale_facet__Incref(facet);
|
2011-11-25 09:45:41 +00:00
|
|
|
_Lockit_dtor(&lock);
|
2011-06-22 12:03:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
|
|
|
|
/* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac, 12)
|
|
|
|
void __thiscall locale__Locimp__Addfac(locale__Locimp *this, locale_facet *facet, MSVCP_size_t id)
|
|
|
|
{
|
2011-11-23 15:13:46 +00:00
|
|
|
locale__Locimp__Locimp_Addfac(this, facet, id);
|
2011-06-22 12:03:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
|
|
|
|
/* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
|
|
|
|
locale__Locimp** __cdecl locale__Locimp__Clocptr_func(void)
|
|
|
|
{
|
|
|
|
FIXME("stub\n");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
|
|
|
|
/* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
|
2011-07-29 10:29:32 +00:00
|
|
|
locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
|
2011-06-22 12:03:24 +00:00
|
|
|
{
|
|
|
|
FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
|
|
|
|
/* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
|
2011-07-29 10:29:32 +00:00
|
|
|
void __cdecl locale__Locimp__Makeushloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
|
2011-06-22 12:03:24 +00:00
|
|
|
{
|
|
|
|
FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
|
|
|
|
/* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
|
2011-07-29 10:29:32 +00:00
|
|
|
void __cdecl locale__Locimp__Makewloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
|
2011-06-22 12:03:24 +00:00
|
|
|
{
|
|
|
|
FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
|
|
|
|
/* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
|
2011-07-29 10:29:32 +00:00
|
|
|
void __cdecl locale__Locimp__Makexloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
|
2011-06-22 12:03:24 +00:00
|
|
|
{
|
|
|
|
FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??_7_Locimp@locale@std@@6B@ */
|
|
|
|
const vtable_ptr MSVCP_locale__Locimp_vtable[] = {
|
|
|
|
(vtable_ptr)THISCALL_NAME(MSVCP_locale__Locimp_vector_dtor)
|
|
|
|
};
|
2011-06-22 12:03:39 +00:00
|
|
|
|
|
|
|
/* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
|
|
|
|
/* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_ctor_locimp, 8)
|
|
|
|
locale* __thiscall locale_ctor_locimp(locale *this, locale__Locimp *locimp)
|
|
|
|
{
|
2011-11-25 09:45:41 +00:00
|
|
|
TRACE("(%p %p)\n", this, locimp);
|
|
|
|
/* Don't change locimp reference counter */
|
|
|
|
this->ptr = locimp;
|
|
|
|
return this;
|
2011-06-22 12:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0locale@std@@QAE@ABV01@0H@Z */
|
|
|
|
/* ??0locale@std@@QEAA@AEBV01@0H@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16)
|
|
|
|
locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %p %d) stub\n", this, loc, other, cat);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0locale@std@@QAE@ABV01@@Z */
|
|
|
|
/* ??0locale@std@@QEAA@AEBV01@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_copy_ctor, 8)
|
|
|
|
locale* __thiscall locale_copy_ctor(locale *this, const locale *copy)
|
|
|
|
{
|
2011-11-25 09:45:41 +00:00
|
|
|
TRACE("(%p %p)\n", this, copy);
|
|
|
|
this->ptr = copy->ptr;
|
|
|
|
locale_facet__Incref(&this->ptr->facet);
|
|
|
|
return this;
|
2011-06-22 12:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0locale@std@@QAE@ABV01@PBDH@Z */
|
|
|
|
/* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr, 16)
|
|
|
|
locale* __thiscall locale_ctor_locale_cstr(locale *this, const locale *loc, const char *locname, category cat)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p %s %d) stub\n", this, loc, locname, cat);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0locale@std@@QAE@PBDH@Z */
|
|
|
|
/* ??0locale@std@@QEAA@PEBDH@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_ctor_cstr, 12)
|
|
|
|
locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category cat)
|
|
|
|
{
|
|
|
|
FIXME("(%p %s %d) stub\n", this, locname, cat);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
|
|
|
|
/* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized, 8)
|
|
|
|
locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized)
|
|
|
|
{
|
2011-11-25 09:45:41 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
this->ptr = NULL;
|
|
|
|
return this;
|
2011-06-22 12:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0locale@std@@QAE@XZ */
|
|
|
|
/* ??0locale@std@@QEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_ctor, 4)
|
|
|
|
locale* __thiscall locale_ctor(locale *this)
|
|
|
|
{
|
2011-11-23 15:14:11 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
|
|
|
|
if(!this->ptr) {
|
|
|
|
ERR("Out of memory\n");
|
|
|
|
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
locale__Locimp_ctor(this->ptr);
|
|
|
|
return this;
|
2011-06-22 12:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??1locale@std@@QAE@XZ */
|
|
|
|
/* ??1locale@std@@QEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_dtor, 4)
|
|
|
|
void __thiscall locale_dtor(locale *this)
|
|
|
|
{
|
2011-11-23 15:14:11 +00:00
|
|
|
TRACE("(%p)\n", this);
|
2011-11-25 09:45:41 +00:00
|
|
|
if(this->ptr)
|
|
|
|
locale__Locimp_dtor(this->ptr);
|
2011-06-22 12:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor, 8)
|
|
|
|
locale* __thiscall MSVCP_locale_vector_dtor(locale *this, unsigned int flags)
|
|
|
|
{
|
2011-11-23 15:14:11 +00:00
|
|
|
TRACE("(%p %x)\n", this, flags);
|
2011-06-22 12:03:39 +00:00
|
|
|
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--)
|
|
|
|
locale_dtor(this+i);
|
|
|
|
MSVCRT_operator_delete(ptr);
|
|
|
|
} else {
|
|
|
|
locale_dtor(this);
|
|
|
|
if(flags & 1)
|
|
|
|
MSVCRT_operator_delete(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??4locale@std@@QAEAAV01@ABV01@@Z */
|
|
|
|
/* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_operator_assign, 8)
|
|
|
|
locale* __thiscall locale_operator_assign(locale *this, const locale *loc)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p) stub\n", this, loc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??8locale@std@@QBE_NABV01@@Z */
|
|
|
|
/* ??8locale@std@@QEBA_NAEBV01@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_operator_equal, 8)
|
|
|
|
MSVCP_bool __thiscall locale_operator_equal(const locale *this, const locale *loc)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p) stub\n", this, loc);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??9locale@std@@QBE_NABV01@@Z */
|
|
|
|
/* ??9locale@std@@QEBA_NAEBV01@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale_operator_not_equal, 8)
|
|
|
|
MSVCP_bool __thiscall locale_operator_not_equal(const locale *this, locale const *loc)
|
|
|
|
{
|
|
|
|
FIXME("(%p %p) stub\n", this, loc);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
|
|
|
|
/* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale__Addfac, 16)
|
|
|
|
locale* __thiscall locale__Addfac(locale *this, locale_facet *facet, MSVCP_size_t id, MSVCP_size_t catmask)
|
|
|
|
{
|
2011-11-25 09:45:55 +00:00
|
|
|
TRACE("(%p %p %lu %lu)\n", this, facet, id, catmask);
|
|
|
|
|
|
|
|
if(this->ptr->facet.refs > 1) {
|
|
|
|
locale__Locimp *new_ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
|
|
|
|
if(!new_ptr) {
|
|
|
|
ERR("Out of memory\n");
|
|
|
|
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
locale__Locimp_copy_ctor(new_ptr, this->ptr);
|
|
|
|
locale_facet__Decref(&this->ptr->facet);
|
|
|
|
this->ptr = new_ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
locale__Locimp__Addfac(this->ptr, facet, id);
|
|
|
|
|
|
|
|
if(catmask) {
|
|
|
|
MSVCP_basic_string_char_dtor(&this->ptr->name);
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&this->ptr->name, "*");
|
|
|
|
}
|
|
|
|
return this;
|
2011-06-22 12:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
|
|
|
|
/* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(locale__Getfacet, 8)
|
|
|
|
const locale_facet* __thiscall locale__Getfacet(const locale *this, MSVCP_size_t id)
|
|
|
|
{
|
|
|
|
FIXME("(%p %lu) stub\n", this, id);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
|
|
|
|
/* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
|
|
|
|
locale__Locimp* __cdecl locale__Init(void)
|
|
|
|
{
|
|
|
|
FIXME("stub\n");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
|
|
|
|
/* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
|
|
|
|
locale__Locimp* __cdecl locale__Getgloballocale(void)
|
|
|
|
{
|
|
|
|
FIXME("stub\n");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Setgloballocale@locale@std@@CAXPAX@Z */
|
|
|
|
/* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
|
|
|
|
void __cdecl locale__Setgloballocale(void *locimp)
|
|
|
|
{
|
|
|
|
FIXME("(%p) stub\n", locimp);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?classic@locale@std@@SAABV12@XZ */
|
|
|
|
/* ?classic@locale@std@@SAAEBV12@XZ */
|
|
|
|
const locale* __cdecl locale_classic(void)
|
|
|
|
{
|
|
|
|
FIXME("stub\n");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
|
|
|
|
/* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER_RETPTR(locale_name, 4)
|
|
|
|
basic_string_char __thiscall locale_name(const locale *this)
|
|
|
|
{
|
2011-11-25 09:46:06 +00:00
|
|
|
TRACE( "(%p)\n", this);
|
|
|
|
return this->ptr->name;
|
2011-06-22 12:03:39 +00:00
|
|
|
}
|
2011-07-29 10:29:32 +00:00
|
|
|
|
|
|
|
/* ??0_Timevec@std@@QAE@ABV01@@Z */
|
|
|
|
/* ??0_Timevec@std@@QEAA@AEBV01@@Z */
|
2011-11-25 09:46:18 +00:00
|
|
|
/* This copy constructor modifies copied object */
|
2011-07-29 10:29:32 +00:00
|
|
|
DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor, 8)
|
2011-11-25 09:46:18 +00:00
|
|
|
_Timevec* __thiscall _Timevec_copy_ctor(_Timevec *this, _Timevec *copy)
|
2011-07-29 10:29:32 +00:00
|
|
|
{
|
2011-11-25 09:46:18 +00:00
|
|
|
TRACE("(%p %p)\n", this, copy);
|
|
|
|
this->timeptr = copy->timeptr;
|
|
|
|
copy->timeptr = NULL;
|
|
|
|
return this;
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0_Timevec@std@@QAE@PAX@Z */
|
|
|
|
/* ??0_Timevec@std@@QEAA@PEAX@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr, 8)
|
|
|
|
_Timevec* __thiscall _Timevec_ctor_timeptr(_Timevec *this, void *timeptr)
|
|
|
|
{
|
2011-11-25 09:46:18 +00:00
|
|
|
TRACE("(%p %p)\n", this, timeptr);
|
|
|
|
this->timeptr = timeptr;
|
|
|
|
return this;
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??_F_Timevec@std@@QAEXXZ */
|
|
|
|
/* ??_F_Timevec@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Timevec_ctor, 4)
|
|
|
|
_Timevec* __thiscall _Timevec_ctor(_Timevec *this)
|
|
|
|
{
|
2011-11-25 09:46:18 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
this->timeptr = NULL;
|
|
|
|
return this;
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??1_Timevec@std@@QAE@XZ */
|
|
|
|
/* ??1_Timevec@std@@QEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Timevec_dtor, 4)
|
|
|
|
void __thiscall _Timevec_dtor(_Timevec *this)
|
|
|
|
{
|
2011-11-25 09:46:18 +00:00
|
|
|
TRACE("(%p)\n", this);
|
2011-12-08 11:10:26 +00:00
|
|
|
free(this->timeptr);
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
|
|
|
|
/* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Timevec_op_assign, 8)
|
|
|
|
_Timevec* __thiscall _Timevec_op_assign(_Timevec *this, _Timevec *right)
|
|
|
|
{
|
2011-11-25 09:46:18 +00:00
|
|
|
TRACE("(%p %p)\n", this, right);
|
|
|
|
this->timeptr = right->timeptr;
|
|
|
|
right->timeptr = NULL;
|
|
|
|
return this;
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getptr@_Timevec@std@@QBEPAXXZ */
|
|
|
|
/* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Timevec__Getptr, 4)
|
|
|
|
void* __thiscall _Timevec__Getptr(_Timevec *this)
|
|
|
|
{
|
2011-11-25 09:46:18 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
return this->timeptr;
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
|
|
|
|
/* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
|
|
|
|
_Locinfo* __cdecl _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo *locinfo, int category, const char *locstr)
|
|
|
|
{
|
2011-12-06 11:48:46 +00:00
|
|
|
const char *locale = NULL;
|
|
|
|
|
|
|
|
/* This function is probably modifying more global objects */
|
|
|
|
FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
|
|
|
|
|
|
|
|
if(!locstr)
|
|
|
|
throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
|
|
|
|
|
|
|
|
_Lockit_ctor_locktype(&locinfo->lock, _LOCK_LOCALE);
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&locinfo->days, "");
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&locinfo->months, "");
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&locinfo->oldlocname, setlocale(LC_ALL, NULL));
|
|
|
|
|
|
|
|
if(category)
|
|
|
|
locale = setlocale(LC_ALL, locstr);
|
|
|
|
else
|
|
|
|
locale = setlocale(LC_ALL, NULL);
|
|
|
|
|
|
|
|
if(locale)
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
|
|
|
|
else
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
|
|
|
|
_Lockit_dtor(&locinfo->lock);
|
|
|
|
|
|
|
|
return locinfo;
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0_Locinfo@std@@QAE@HPBD@Z */
|
|
|
|
/* ??0_Locinfo@std@@QEAA@HPEBD@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr, 12)
|
|
|
|
_Locinfo* __thiscall _Locinfo_ctor_cat_cstr(_Locinfo *this, int category, const char *locstr)
|
|
|
|
{
|
2011-12-06 11:48:46 +00:00
|
|
|
return _Locinfo__Locinfo_ctor_cat_cstr(this, category, locstr);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
|
|
|
|
/* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
|
|
|
|
_Locinfo* __cdecl _Locinfo__Locinfo_ctor_bstr(_Locinfo *locinfo, const basic_string_char *locstr)
|
|
|
|
{
|
|
|
|
return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
|
|
|
|
/* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr, 8)
|
|
|
|
_Locinfo* __thiscall _Locinfo_ctor_bstr(_Locinfo *this, const basic_string_char *locstr)
|
|
|
|
{
|
|
|
|
return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
|
|
|
|
/* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
|
|
|
|
_Locinfo* __cdecl _Locinfo__Locinfo_ctor_cstr(_Locinfo *locinfo, const char *locstr)
|
|
|
|
{
|
2011-12-06 11:48:46 +00:00
|
|
|
return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, locstr);
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??0_Locinfo@std@@QAE@PBD@Z */
|
|
|
|
/* ??0_Locinfo@std@@QEAA@PEBD@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr, 8)
|
|
|
|
_Locinfo* __thiscall _Locinfo_ctor_cstr(_Locinfo *this, const char *locstr)
|
|
|
|
{
|
2011-12-06 11:48:46 +00:00
|
|
|
return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr);
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
|
|
|
|
/* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
|
2011-12-06 11:48:46 +00:00
|
|
|
void __cdecl _Locinfo__Locinfo_dtor(_Locinfo *locinfo)
|
2011-07-29 10:29:32 +00:00
|
|
|
{
|
2011-12-06 11:48:46 +00:00
|
|
|
TRACE("(%p)\n", locinfo);
|
|
|
|
|
|
|
|
setlocale(LC_ALL, MSVCP_basic_string_char_c_str(&locinfo->oldlocname));
|
|
|
|
MSVCP_basic_string_char_dtor(&locinfo->days);
|
|
|
|
MSVCP_basic_string_char_dtor(&locinfo->months);
|
|
|
|
MSVCP_basic_string_char_dtor(&locinfo->oldlocname);
|
|
|
|
MSVCP_basic_string_char_dtor(&locinfo->newlocname);
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??_F_Locinfo@std@@QAEXXZ */
|
|
|
|
/* ??_F_Locinfo@std@@QEAAXXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo_ctor, 4)
|
|
|
|
_Locinfo* __thiscall _Locinfo_ctor(_Locinfo *this)
|
|
|
|
{
|
2011-12-06 11:48:46 +00:00
|
|
|
return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ??1_Locinfo@std@@QAE@XZ */
|
|
|
|
/* ??1_Locinfo@std@@QEAA@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo_dtor, 4)
|
|
|
|
void __thiscall _Locinfo_dtor(_Locinfo *this)
|
|
|
|
{
|
2011-12-06 11:48:46 +00:00
|
|
|
_Locinfo__Locinfo_dtor(this);
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
|
|
|
|
/* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
|
|
|
|
_Locinfo* __cdecl _Locinfo__Locinfo_Addcats(_Locinfo *locinfo, int category, const char *locstr)
|
|
|
|
{
|
2011-12-06 11:49:01 +00:00
|
|
|
const char *locale = NULL;
|
|
|
|
|
|
|
|
/* This function is probably modifying more global objects */
|
|
|
|
FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
|
|
|
|
if(!locstr)
|
|
|
|
throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
|
|
|
|
|
|
|
|
_Lockit_ctor_locktype(&locinfo->lock, _LOCK_LOCALE);
|
|
|
|
MSVCP_basic_string_char_dtor(&locinfo->newlocname);
|
|
|
|
|
|
|
|
if(category)
|
|
|
|
locale = setlocale(LC_ALL, locstr);
|
|
|
|
else
|
|
|
|
locale = setlocale(LC_ALL, NULL);
|
|
|
|
|
|
|
|
if(locale)
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
|
|
|
|
else
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
|
|
|
|
_Lockit_dtor(&locinfo->lock);
|
|
|
|
|
|
|
|
return locinfo;
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
|
|
|
|
/* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats, 12)
|
|
|
|
_Locinfo* __thiscall _Locinfo__Addcats(_Locinfo *this, int category, const char *locstr)
|
|
|
|
{
|
2011-12-06 11:49:01 +00:00
|
|
|
return _Locinfo__Locinfo_Addcats(this, category, locstr);
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
2011-12-06 11:49:16 +00:00
|
|
|
/* _Getcoll */
|
|
|
|
_Collvec __cdecl _Getcoll(void)
|
|
|
|
{
|
|
|
|
_Collvec ret;
|
|
|
|
_locale_t locale = _get_current_locale();
|
|
|
|
|
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
ret.page = locale->locinfo->lc_collate_cp;
|
|
|
|
ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
|
|
|
|
_free_locale(locale);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-07-29 10:29:32 +00:00
|
|
|
/* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
|
|
|
|
/* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll, 4)
|
|
|
|
_Collvec __thiscall _Locinfo__Getcoll(const _Locinfo *this)
|
|
|
|
{
|
2011-12-06 11:49:16 +00:00
|
|
|
return _Getcoll();
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
2011-12-06 11:49:52 +00:00
|
|
|
/* _Getctype */
|
|
|
|
_Ctypevec __cdecl _Getctype(void)
|
|
|
|
{
|
|
|
|
_Ctypevec ret;
|
|
|
|
_locale_t locale = _get_current_locale();
|
|
|
|
|
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
ret.page = locale->locinfo->lc_codepage;
|
|
|
|
ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
|
|
|
|
ret.delfl = TRUE;
|
|
|
|
ret.table = malloc(sizeof(short[256]));
|
|
|
|
if(!ret.table) {
|
|
|
|
_free_locale(locale);
|
|
|
|
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
|
|
|
|
}
|
|
|
|
memcpy(ret.table, locale->locinfo->pctype, sizeof(short[256]));
|
|
|
|
_free_locale(locale);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-07-29 10:29:32 +00:00
|
|
|
/* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
|
|
|
|
/* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER_RETPTR(_Locinfo__Getctype, 4)
|
|
|
|
_Ctypevec __thiscall _Locinfo__Getctype(const _Locinfo *this)
|
|
|
|
{
|
2011-12-06 11:49:52 +00:00
|
|
|
return _Getctype();
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
2011-12-08 11:09:05 +00:00
|
|
|
/* _Getcvt */
|
|
|
|
_Cvtvec __cdecl _Getcvt(void)
|
|
|
|
{
|
|
|
|
_Cvtvec ret;
|
|
|
|
_locale_t locale = _get_current_locale();
|
|
|
|
|
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
ret.page = locale->locinfo->lc_codepage;
|
|
|
|
ret.handle = locale->locinfo->lc_handle[LC_CTYPE];
|
|
|
|
_free_locale(locale);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-07-29 10:29:32 +00:00
|
|
|
/* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
|
|
|
|
/* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt, 4)
|
|
|
|
_Cvtvec __thiscall _Locinfo__Getcvt(const _Locinfo *this)
|
|
|
|
{
|
2011-12-08 11:09:05 +00:00
|
|
|
return _Getcvt();
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
|
|
|
|
/* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder, 4)
|
|
|
|
int __thiscall _Locinfo__Getdateorder(const _Locinfo *this)
|
|
|
|
{
|
|
|
|
FIXME("(%p) stub\n", this);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
|
|
|
|
/* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays, 4)
|
2011-12-08 11:09:54 +00:00
|
|
|
const char* __thiscall _Locinfo__Getdays(_Locinfo *this)
|
2011-07-29 10:29:32 +00:00
|
|
|
{
|
2011-12-08 11:09:54 +00:00
|
|
|
char *days = _Getdays();
|
|
|
|
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
if(days) {
|
|
|
|
MSVCP_basic_string_char_dtor(&this->days);
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&this->days, days);
|
|
|
|
free(days);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this->days.size ? MSVCP_basic_string_char_c_str(&this->days) :
|
|
|
|
":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
|
|
|
|
/* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths, 4)
|
2011-12-08 11:10:12 +00:00
|
|
|
const char* __thiscall _Locinfo__Getmonths(_Locinfo *this)
|
2011-07-29 10:29:32 +00:00
|
|
|
{
|
2011-12-08 11:10:12 +00:00
|
|
|
char *months = _Getmonths();
|
|
|
|
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
if(months) {
|
|
|
|
MSVCP_basic_string_char_dtor(&this->months);
|
|
|
|
MSVCP_basic_string_char_ctor_cstr(&this->months, months);
|
|
|
|
free(months);
|
|
|
|
}
|
|
|
|
|
|
|
|
return this->months.size ? MSVCP_basic_string_char_c_str(&this->months) :
|
|
|
|
":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
|
|
|
|
":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
|
|
|
|
/* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse, 4)
|
|
|
|
const char* __thiscall _Locinfo__Getfalse(const _Locinfo *this)
|
|
|
|
{
|
2011-12-08 11:09:15 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
return "false";
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
|
|
|
|
/* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue, 4)
|
|
|
|
const char* __thiscall _Locinfo__Gettrue(const _Locinfo *this)
|
|
|
|
{
|
2011-12-08 11:09:15 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
return "true";
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
|
|
|
|
/* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv, 4)
|
|
|
|
const struct lconv* __thiscall _Locinfo__Getlconv(const _Locinfo *this)
|
|
|
|
{
|
2011-12-08 11:09:28 +00:00
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
return localeconv();
|
2011-07-29 10:29:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
|
|
|
|
/* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER_RETPTR(_Locinfo__Getname, 4)
|
|
|
|
basic_string_char __thiscall _Locinfo__Getname(const _Locinfo *this)
|
|
|
|
{
|
2011-12-08 11:09:41 +00:00
|
|
|
basic_string_char ret;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
MSVCP_basic_string_char_copy_ctor(&ret, &this->newlocname);
|
2011-07-29 10:29:32 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
|
|
|
|
/* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
|
|
|
|
DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames, 4)
|
|
|
|
_Timevec __thiscall _Locinfo__Gettnames(const _Locinfo *this)
|
|
|
|
{
|
2011-12-08 11:10:26 +00:00
|
|
|
_Timevec ret;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", this);
|
|
|
|
|
|
|
|
_Timevec_ctor_timeptr(&ret, _Gettnames());
|
2011-07-29 10:29:32 +00:00
|
|
|
return ret;
|
|
|
|
}
|
2011-12-15 09:16:48 +00:00
|
|
|
|
|
|
|
static const type_info locale_facet_type_info = {
|
|
|
|
MSVCP_locale_facet_vtable,
|
|
|
|
NULL,
|
|
|
|
".?AVfacet@locale@std@@"
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_descriptor locale_facet_rtti_base_descriptor = {
|
|
|
|
&locale_facet_type_info,
|
|
|
|
0,
|
|
|
|
{ 0, -1, 0},
|
|
|
|
64
|
|
|
|
};
|
|
|
|
|
|
|
|
static const type_info collate_char_type_info = {
|
|
|
|
&MSVCP_collate_char_vtable,
|
|
|
|
NULL,
|
|
|
|
".?AV?$collate@D@std@@"
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_descriptor collate_char_rtti_base_descriptor = {
|
|
|
|
&collate_char_type_info,
|
|
|
|
1,
|
|
|
|
{ 0, -1, 0},
|
|
|
|
64
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_array collate_char_rtti_base_array = {
|
|
|
|
{
|
|
|
|
&collate_char_rtti_base_descriptor,
|
|
|
|
&locale_facet_rtti_base_descriptor,
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_object_hierarchy collate_char_hierarchy = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
2,
|
|
|
|
&collate_char_rtti_base_array
|
|
|
|
};
|
|
|
|
|
|
|
|
const rtti_object_locator collate_char_rtti = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
&collate_char_type_info,
|
|
|
|
&collate_char_hierarchy
|
|
|
|
};
|
|
|
|
|
2011-12-15 09:17:08 +00:00
|
|
|
static const type_info collate_wchar_type_info = {
|
|
|
|
&MSVCP_collate_wchar_vtable,
|
|
|
|
NULL,
|
|
|
|
".?AV?$collate@_W@std@@"
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_descriptor collate_wchar_rtti_base_descriptor = {
|
|
|
|
&collate_wchar_type_info,
|
|
|
|
1,
|
|
|
|
{ 0, -1, 0},
|
|
|
|
64
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_array collate_wchar_rtti_base_array = {
|
|
|
|
{
|
|
|
|
&collate_wchar_rtti_base_descriptor,
|
|
|
|
&locale_facet_rtti_base_descriptor,
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_object_hierarchy collate_wchar_hierarchy = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
2,
|
|
|
|
&collate_wchar_rtti_base_array
|
|
|
|
};
|
|
|
|
|
|
|
|
const rtti_object_locator collate_wchar_rtti = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
&collate_wchar_type_info,
|
|
|
|
&collate_wchar_hierarchy
|
|
|
|
};
|
|
|
|
|
2011-12-15 09:17:28 +00:00
|
|
|
static const type_info collate_short_type_info = {
|
|
|
|
&MSVCP_collate_short_vtable,
|
|
|
|
NULL,
|
|
|
|
".?AV?$collate@G@std@@"
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_descriptor collate_short_rtti_base_descriptor = {
|
|
|
|
&collate_short_type_info,
|
|
|
|
1,
|
|
|
|
{ 0, -1, 0},
|
|
|
|
64
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_array collate_short_rtti_base_array = {
|
|
|
|
{
|
|
|
|
&collate_short_rtti_base_descriptor,
|
|
|
|
&locale_facet_rtti_base_descriptor,
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_object_hierarchy collate_short_hierarchy = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
2,
|
|
|
|
&collate_short_rtti_base_array
|
|
|
|
};
|
|
|
|
|
|
|
|
const rtti_object_locator collate_short_rtti = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
&collate_short_type_info,
|
|
|
|
&collate_short_hierarchy
|
|
|
|
};
|
|
|
|
|
2011-12-16 10:31:45 +00:00
|
|
|
static const type_info ctype_base_type_info = {
|
|
|
|
&MSVCP_ctype_base_vtable,
|
|
|
|
NULL,
|
|
|
|
".?AUctype_base@std@@"
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_descriptor ctype_base_rtti_base_descriptor = {
|
|
|
|
&ctype_base_type_info,
|
|
|
|
1,
|
|
|
|
{ 0, -1, 0},
|
|
|
|
64
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_base_array ctype_base_rtti_base_array = {
|
|
|
|
{
|
|
|
|
&ctype_base_rtti_base_descriptor,
|
|
|
|
&locale_facet_rtti_base_descriptor,
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const rtti_object_hierarchy ctype_base_hierarchy = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
2,
|
|
|
|
&ctype_base_rtti_base_array
|
|
|
|
};
|
|
|
|
|
|
|
|
const rtti_object_locator ctype_base_rtti = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
&ctype_base_type_info,
|
|
|
|
&ctype_base_hierarchy
|
|
|
|
};
|
|
|
|
|
2011-12-15 09:16:48 +00:00
|
|
|
#ifndef __GNUC__
|
|
|
|
void __asm_dummy_vtables(void) {
|
|
|
|
#endif
|
|
|
|
__ASM_VTABLE(collate_char,
|
|
|
|
VTABLE_ADD_FUNC(collate_char_do_compare)
|
|
|
|
VTABLE_ADD_FUNC(collate_char_do_transform)
|
|
|
|
VTABLE_ADD_FUNC(collate_char_do_hash));
|
2011-12-15 09:17:08 +00:00
|
|
|
__ASM_VTABLE(collate_wchar,
|
|
|
|
VTABLE_ADD_FUNC(collate_wchar_do_compare)
|
|
|
|
VTABLE_ADD_FUNC(collate_wchar_do_transform)
|
|
|
|
VTABLE_ADD_FUNC(collate_wchar_do_hash));
|
2011-12-15 09:17:28 +00:00
|
|
|
__ASM_VTABLE(collate_short,
|
|
|
|
VTABLE_ADD_FUNC(collate_wchar_do_compare)
|
|
|
|
VTABLE_ADD_FUNC(collate_wchar_do_transform)
|
|
|
|
VTABLE_ADD_FUNC(collate_wchar_do_hash));
|
2011-12-16 10:31:45 +00:00
|
|
|
__ASM_VTABLE(ctype_base, "");
|
2011-12-15 09:16:48 +00:00
|
|
|
#ifndef __GNUC__
|
|
|
|
}
|
|
|
|
#endif
|