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
26 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90
);
31 typedef struct _locale_id
{
35 typedef struct _locale_facet
{
36 const vtable_ptr
*vtable
;
40 typedef struct _locale__Locimp
{
42 locale_facet
**facetvec
;
43 MSVCP_size_t facet_cnt
;
45 MSVCP_bool transparent
;
46 basic_string_char name
;
49 /* ?_Id_cnt@id@locale@std@@0HA */
50 int locale_id__Id_cnt
= 0;
52 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
53 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
54 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
56 static const vtable_ptr MSVCP_locale_facet_vtable
[];
58 /* ??0id@locale@std@@QAE@I@Z */
59 /* ??0id@locale@std@@QEAA@_K@Z */
60 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
61 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
63 FIXME("(%p %lu) stub\n", this, id
);
67 /* ??_Fid@locale@std@@QAEXXZ */
68 /* ??_Fid@locale@std@@QEAAXXZ */
69 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
70 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
72 FIXME("(%p) stub\n", this);
76 /* ??Bid@locale@std@@QAEIXZ */
77 /* ??Bid@locale@std@@QEAA_KXZ */
78 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
79 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
81 FIXME("(%p) stub\n", this);
85 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
86 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
87 int* __cdecl
locale_id__Id_cnt_func(void)
93 /* ??_Ffacet@locale@std@@QAEXXZ */
94 /* ??_Ffacet@locale@std@@QEAAXXZ */
95 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
96 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
98 FIXME("(%p) stub\n", this);
99 this->vtable
= MSVCP_locale_facet_vtable
;
103 /* ??0facet@locale@std@@IAE@I@Z */
104 /* ??0facet@locale@std@@IEAA@_K@Z */
105 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
106 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
108 FIXME("(%p %lu) stub\n", this, refs
);
112 /* ??1facet@locale@std@@UAE@XZ */
113 /* ??1facet@locale@std@@UEAA@XZ */
114 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
115 void __thiscall
locale_facet_dtor(locale_facet
*this)
117 FIXME("(%p) stub\n", this);
120 DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor
, 8)
121 locale_facet
* __thiscall
MSVCP_locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
123 TRACE("(%p %x) stub\n", this, flags
);
125 /* we have an array, with the number of elements stored before the first object */
126 int i
, *ptr
= (int *)this-1;
128 for(i
=*ptr
-1; i
>=0; i
--)
129 locale_facet_dtor(this+i
);
130 MSVCRT_operator_delete(ptr
);
132 locale_facet_dtor(this);
134 MSVCRT_operator_delete(this);
140 /* ?_Incref@facet@locale@std@@QAEXXZ */
141 /* ?_Incref@facet@locale@std@@QEAAXXZ */
142 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
143 void __thiscall
locale_facet__Incref(locale_facet
*this)
145 FIXME("(%p) stub\n", this);
148 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
149 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
150 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
151 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
153 FIXME("(%p) stub\n", this);
157 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
158 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
159 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
161 FIXME("(%p %p) stub\n", facet
, loc
);
165 static const vtable_ptr MSVCP_locale_facet_vtable
[] = {
166 (vtable_ptr
)THISCALL_NAME(MSVCP_locale_facet_vector_dtor
)
169 /* ??_F_Locimp@locale@std@@QAEXXZ */
170 /* ??_F_Locimp@locale@std@@QEAAXXZ */
171 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
172 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
174 FIXME("(%p) stub\n", this);
178 /* ??0_Locimp@locale@std@@AAE@_N@Z */
179 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
180 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
181 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
183 FIXME("(%p %d) stub\n", this, transparent
);
187 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
188 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
189 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
190 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
191 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
192 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
194 FIXME("(%p %p) stub\n", this, copy
);
198 /* ??1_Locimp@locale@std@@MAE@XZ */
199 /* ??1_Locimp@locale@std@@MEAA@XZ */
200 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
201 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
202 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
203 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
205 FIXME("(%p) stub\n", this);
208 DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor
, 8)
209 locale__Locimp
* __thiscall
MSVCP_locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
211 TRACE("(%p %x) stub\n", this, flags
);
213 /* we have an array, with the number of elements stored before the first object */
214 int i
, *ptr
= (int *)this-1;
216 for(i
=*ptr
-1; i
>=0; i
--)
217 locale__Locimp_dtor(this+i
);
218 MSVCRT_operator_delete(ptr
);
220 locale__Locimp_dtor(this);
222 MSVCRT_operator_delete(this);
228 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
229 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
230 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
232 FIXME("(%p %p %lu) stub\n", locimp
, facet
, id
);
235 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
236 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
237 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
238 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
240 FIXME("(%p %p %lu) stub\n", this, facet
, id
);
243 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
244 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
245 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
251 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
252 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
253 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const /*_Locinfo*/void *locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
255 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
259 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
260 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
261 void __cdecl
locale__Locimp__Makeushloc(const /*_Locinfo*/void *locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
263 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
266 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
267 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
268 void __cdecl
locale__Locimp__Makewloc(const /*_Locinfo*/void *locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
270 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
273 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
274 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
275 void __cdecl
locale__Locimp__Makexloc(const /*_Locinfo*/void *locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
277 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
280 /* ??_7_Locimp@locale@std@@6B@ */
281 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
282 (vtable_ptr
)THISCALL_NAME(MSVCP_locale__Locimp_vector_dtor
)
285 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
286 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
287 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
288 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
290 FIXME("(%p %p) stub\n", this, locimp
);
294 /* ??0locale@std@@QAE@ABV01@0H@Z */
295 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
296 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
297 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
299 FIXME("(%p %p %p %d) stub\n", this, loc
, other
, cat
);
303 /* ??0locale@std@@QAE@ABV01@@Z */
304 /* ??0locale@std@@QEAA@AEBV01@@Z */
305 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
306 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
308 FIXME("(%p %p) stub\n", this, copy
);
312 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
313 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
314 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
315 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
317 FIXME("(%p %p %s %d) stub\n", this, loc
, locname
, cat
);
321 /* ??0locale@std@@QAE@PBDH@Z */
322 /* ??0locale@std@@QEAA@PEBDH@Z */
323 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
324 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
326 FIXME("(%p %s %d) stub\n", this, locname
, cat
);
330 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
331 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
332 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
333 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
335 FIXME("(%p %d) stub\n", this, uninitialized
);
339 /* ??0locale@std@@QAE@XZ */
340 /* ??0locale@std@@QEAA@XZ */
341 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
342 locale
* __thiscall
locale_ctor(locale
*this)
344 FIXME("(%p) stub\n", this);
348 /* ??1locale@std@@QAE@XZ */
349 /* ??1locale@std@@QEAA@XZ */
350 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
351 void __thiscall
locale_dtor(locale
*this)
353 FIXME("(%p) stub\n", this);
356 DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor
, 8)
357 locale
* __thiscall
MSVCP_locale_vector_dtor(locale
*this, unsigned int flags
)
359 TRACE("(%p %x) stub\n", this, flags
);
361 /* we have an array, with the number of elements stored before the first object */
362 int i
, *ptr
= (int *)this-1;
364 for(i
=*ptr
-1; i
>=0; i
--)
366 MSVCRT_operator_delete(ptr
);
370 MSVCRT_operator_delete(this);
376 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
377 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
378 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
379 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
381 FIXME("(%p %p) stub\n", this, loc
);
385 /* ??8locale@std@@QBE_NABV01@@Z */
386 /* ??8locale@std@@QEBA_NAEBV01@@Z */
387 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
388 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
390 FIXME("(%p %p) stub\n", this, loc
);
394 /* ??9locale@std@@QBE_NABV01@@Z */
395 /* ??9locale@std@@QEBA_NAEBV01@@Z */
396 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
397 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
399 FIXME("(%p %p) stub\n", this, loc
);
403 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
404 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
405 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
406 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
408 FIXME("(%p %p %lu %lu) stub\n", this, facet
, id
, catmask
);
412 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
413 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
414 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
415 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
417 FIXME("(%p %lu) stub\n", this, id
);
421 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
422 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
423 locale__Locimp
* __cdecl
locale__Init(void)
429 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
430 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
431 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
437 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
438 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
439 void __cdecl
locale__Setgloballocale(void *locimp
)
441 FIXME("(%p) stub\n", locimp
);
444 /* ?classic@locale@std@@SAABV12@XZ */
445 /* ?classic@locale@std@@SAAEBV12@XZ */
446 const locale
* __cdecl
locale_classic(void)
452 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
453 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
454 DEFINE_THISCALL_WRAPPER_RETPTR(locale_name
, 4)
455 basic_string_char __thiscall
locale_name(const locale
*this)
457 basic_string_char ret
= { 0 }; /* FIXME */
458 FIXME( "(%p) stub\n", this);