msvcp90: Added std::locale::id class stub.
[wine/wine-gecko.git] / dlls / msvcp90 / locale.c
blob068c8c5e7965a21ec901bd74f251737c1731b84a
1 /*
2 * Copyright 2010 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
21 #include <stdarg.h>
23 #include "msvcp90.h"
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
29 typedef struct _locale_id {
30 MSVCP_size_t id;
31 } locale_id;
33 typedef struct _locale_facet {
34 const vtable_ptr *vtable;
35 MSVCP_size_t refs;
36 } locale_facet;
38 /* ?_Id_cnt@id@locale@std@@0HA */
39 int locale_id__Id_cnt = 0;
41 static const vtable_ptr MSVCP_locale_facet_vtable[];
43 /* ??0id@locale@std@@QAE@I@Z */
44 /* ??0id@locale@std@@QEAA@_K@Z */
45 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8)
46 locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
48 FIXME("(%p %lu) stub\n", this, id);
49 return NULL;
52 /* ??_Fid@locale@std@@QAEXXZ */
53 /* ??_Fid@locale@std@@QEAAXXZ */
54 DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4)
55 locale_id* __thiscall locale_id_ctor(locale_id *this)
57 FIXME("(%p) stub\n", this);
58 return NULL;
61 /* ??Bid@locale@std@@QAEIXZ */
62 /* ??Bid@locale@std@@QEAA_KXZ */
63 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4)
64 MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this)
66 FIXME("(%p) stub\n", this);
67 return 0;
70 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
71 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
72 int* __cdecl locale_id__Id_cnt_func(void)
74 FIXME("stub\n");
75 return NULL;
78 /* ??_Ffacet@locale@std@@QAEXXZ */
79 /* ??_Ffacet@locale@std@@QEAAXXZ */
80 DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4)
81 locale_facet* __thiscall locale_facet_ctor(locale_facet *this)
83 FIXME("(%p) stub\n", this);
84 this->vtable = MSVCP_locale_facet_vtable;
85 return NULL;
88 /* ??0facet@locale@std@@IAE@I@Z */
89 /* ??0facet@locale@std@@IEAA@_K@Z */
90 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8)
91 locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs)
93 FIXME("(%p %lu) stub\n", this, refs);
94 return NULL;
97 /* ??1facet@locale@std@@UAE@XZ */
98 /* ??1facet@locale@std@@UEAA@XZ */
99 DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4)
100 void __thiscall locale_facet_dtor(locale_facet *this)
102 FIXME("(%p) stub\n", this);
105 DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8)
106 locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
108 TRACE("(%p %x) stub\n", this, flags);
109 if(flags & 2) {
110 /* we have an array, with the number of elements stored before the first object */
111 int i, *ptr = (int *)this-1;
113 for(i=*ptr-1; i>=0; i--)
114 locale_facet_dtor(this+i);
115 MSVCRT_operator_delete(ptr);
116 } else {
117 locale_facet_dtor(this);
118 if(flags & 1)
119 MSVCRT_operator_delete(this);
122 return this;
125 /* ?_Incref@facet@locale@std@@QAEXXZ */
126 /* ?_Incref@facet@locale@std@@QEAAXXZ */
127 DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4)
128 void __thiscall locale_facet__Incref(locale_facet *this)
130 FIXME("(%p) stub\n", this);
133 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
134 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
135 DEFINE_THISCALL_WRAPPER(locale_facet__Decref, 4)
136 locale_facet* __thiscall locale_facet__Decref(locale_facet *this)
138 FIXME("(%p) stub\n", this);
139 return NULL;
142 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
143 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
144 MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const /*locale*/void *loc)
146 FIXME("(%p %p) stub\n", facet, loc);
147 return 0;
150 static const vtable_ptr MSVCP_locale_facet_vtable[] = {
151 (vtable_ptr)THISCALL_NAME(MSVCP_locale_facet_vector_dtor)