comctl32/tests: DateTimePicker and MonthCalendar controls only support Gregorian...
[wine] / dlls / msvcp90 / memory.c
1 /*
2  * Copyright 2010 Piotr Caban for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22 #include <limits.h>
23
24 #include "msvcp90.h"
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
30
31 /* ?address@?$allocator@D@std@@QBEPADAAD@Z */
32 /* ?address@?$allocator@D@std@@QEBAPEADAEAD@Z */
33 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_address, 8)
34 char* __stdcall MSVCP_allocator_char_address(void *this, char *ptr)
35 {
36     return ptr;
37 }
38
39 /* ?address@?$allocator@D@std@@QBEPBDABD@Z */
40 /* ?address@?$allocator@D@std@@QEBAPEBDAEBD@Z */
41 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_const_address, 8)
42 const char* __stdcall MSVCP_allocator_char_const_address(void *this, const char *ptr)
43 {
44     return ptr;
45 }
46
47 /* ??0?$allocator@D@std@@QAE@XZ */
48 /* ??0?$allocator@D@std@@QEAA@XZ */
49 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_ctor, 4)
50 void* __stdcall MSVCP_allocator_char_ctor(void *this)
51 {
52     return this;
53 }
54
55 /* ??0?$allocator@D@std@@QAE@ABV01@@Z */
56 /* ??0?$allocator@D@std@@QEAA@AEBV01@@Z */
57 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_copy_ctor, 8)
58 void* __stdcall MSVCP_allocator_char_copy_ctor(void *this, void *copy)
59 {
60     return this;
61 }
62
63 /* ??4?$allocator@D@std@@QAEAAV01@ABV01@@Z */
64 /* ??4?$allocator@D@std@@QEAAAEAV01@AEBV01@@Z */
65 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_assign, 8);
66 void* __stdcall MSVCP_allocator_char_assign(void *this, void *assign)
67 {
68     return this;
69 }
70
71 /* ?deallocate@?$allocator@D@std@@QAEXPADI@Z */
72 /* ?deallocate@?$allocator@D@std@@QEAAXPEAD_K@Z */
73 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_deallocate, 12);
74 void __stdcall MSVCP_allocator_char_deallocate(void *this, char *ptr, size_t size)
75 {
76     MSVCRT_operator_delete(ptr);
77 }
78
79 /* ?allocate@?$allocator@D@std@@QAEPADI@Z */
80 /* ?allocate@?$allocator@D@std@@QEAAPEAD_K@Z */
81 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_allocate, 8);
82 char* __stdcall MSVCP_allocator_char_allocate(void *this, size_t count)
83 {
84     return MSVCRT_operator_new(sizeof(char[count]));
85 }
86
87 /* ?allocate@?$allocator@D@std@@QAEPADIPBX@Z */
88 /* ?allocate@?$allocator@D@std@@QEAAPEAD_KPEBX@Z */
89 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_allocate_hint, 12);
90 char* __stdcall MSVCP_allocator_char_allocate_hint(void *this,
91         size_t count, const void *hint)
92 {
93     /* Native ignores hint */
94     return MSVCP_allocator_char_allocate(this, count);
95 }
96
97 /* ?construct@?$allocator@D@std@@QAEXPADABD@Z */
98 /* ?construct@?$allocator@D@std@@QEAAXPEADAEBD@Z */
99 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_construct, 12);
100 void __stdcall MSVCP_allocator_char_construct(void *this, char *ptr, const char *val)
101 {
102     *ptr = *val;
103 }
104
105 /* ?destroy@?$allocator@D@std@@QAEXPAD@Z */
106 /* ?destroy@?$allocator@D@std@@QEAAXPEAD@Z */
107 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_destroy, 8);
108 void __stdcall MSVCP_allocator_char_destroy(void *this, char *ptr)
109 {
110 }
111
112 /* ?max_size@?$allocator@D@std@@QBEIXZ */
113 /* ?max_size@?$allocator@D@std@@QEBA_KXZ */
114 DEFINE_THISCALL_WRAPPER(MSVCP_allocator_char_max_size, 4);
115 size_t __stdcall MSVCP_allocator_char_max_size(void *this)
116 {
117     return UINT_MAX/sizeof(char);
118 }