Commit 8a15e426 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Fix __cdecl functions definitions that returns structures.

parent c4001170
......@@ -2808,9 +2808,9 @@
@ extern _FSnan msvcp90._FSnan
# extern _FXbig
@ stub _GetLocaleForCP
@ cdecl _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype() msvcp90._Getctype
@ cdecl _Getcvt() msvcp90._Getcvt
@ cdecl -ret64 _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype(ptr) msvcp90._Getctype
@ cdecl -ret64 _Getcvt() msvcp90._Getcvt
@ stub _Getdateorder
@ cdecl _Getwctype(long ptr) msvcp90._Getwctype
@ cdecl _Getwctypes(ptr ptr ptr ptr) msvcp90._Getwctypes
......
......@@ -4274,9 +4274,9 @@
@ stub _FSinh
@ extern _FSnan msvcp90._FSnan
# extern _FXbig
@ cdecl _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype() msvcp90._Getctype
@ cdecl _Getcvt() msvcp90._Getcvt
@ cdecl -ret64 _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype(ptr) msvcp90._Getctype
@ cdecl -ret64 _Getcvt() msvcp90._Getcvt
@ extern _Hugeval msvcp90._Hugeval
@ extern _Inf msvcp90._Inf
@ stub _LCosh
......
......@@ -5061,9 +5061,9 @@
@ extern _FSnan msvcp90._FSnan
# extern _FXbig
# extern _FZero
@ cdecl _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype() msvcp90._Getctype
@ cdecl _Getcvt() msvcp90._Getcvt
@ cdecl -ret64 _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype(ptr) msvcp90._Getctype
@ cdecl -ret64 _Getcvt() msvcp90._Getcvt
@ extern _Hugeval msvcp90._Hugeval
@ extern _Inf msvcp90._Inf
@ stub _LCosh
......
......@@ -5115,9 +5115,9 @@
@ extern _FSnan msvcp90._FSnan
# extern _FXbig
# extern _FZero
@ cdecl _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype() msvcp90._Getctype
@ cdecl _Getcvt() msvcp90._Getcvt
@ cdecl -ret64 _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype(ptr) msvcp90._Getctype
@ cdecl -ret64 _Getcvt() msvcp90._Getcvt
@ cdecl _Getwctype(long ptr) msvcp90._Getwctype
@ cdecl _Getwctypes(ptr ptr ptr ptr) msvcp90._Getwctypes
@ extern _Hugeval msvcp90._Hugeval
......
......@@ -5724,9 +5724,9 @@
@ stub _FSinh
@ extern _FSnan msvcp90._FSnan
# extern _FXbig
@ cdecl _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype() msvcp90._Getctype
@ cdecl _Getcvt() msvcp90._Getcvt
@ cdecl -ret64 _Getcoll() msvcp90._Getcoll
@ cdecl _Getctype(ptr) msvcp90._Getctype
@ cdecl -ret64 _Getcvt() msvcp90._Getcvt
@ stub _Getdateorder
@ cdecl _Getwctype(long ptr) msvcp90._Getwctype
@ cdecl _Getwctypes(ptr ptr ptr ptr) msvcp90._Getwctypes
......
......@@ -542,17 +542,20 @@ _Locinfo* __thiscall _Locinfo__Addcats(_Locinfo *this, int category, const char
}
/* _Getcoll */
_Collvec __cdecl _Getcoll(void)
ULONGLONG __cdecl _Getcoll(void)
{
_Collvec ret;
union {
_Collvec collvec;
ULONGLONG ull;
} ret;
_locale_t locale = _get_current_locale();
TRACE("\n");
ret.page = locale->locinfo->lc_collate_cp;
ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
ret.collvec.page = locale->locinfo->lc_collate_cp;
ret.collvec.handle = locale->locinfo->lc_handle[LC_COLLATE];
_free_locale(locale);
return ret;
return ret.ull;
}
/* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
......@@ -560,29 +563,29 @@ _Collvec __cdecl _Getcoll(void)
DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll, 8)
_Collvec* __thiscall _Locinfo__Getcoll(const _Locinfo *this, _Collvec *ret)
{
*ret = _Getcoll();
ULONGLONG ull = _Getcoll();
memcpy(ret, &ull, sizeof(ull));
return ret;
}
/* _Getctype */
_Ctypevec __cdecl _Getctype(void)
_Ctypevec* __cdecl _Getctype(_Ctypevec *ret)
{
_Ctypevec ret;
_locale_t locale = _get_current_locale();
short *table;
TRACE("\n");
ret.page = locale->locinfo->lc_codepage;
ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
ret.delfl = TRUE;
ret->page = locale->locinfo->lc_codepage;
ret->handle = locale->locinfo->lc_handle[LC_COLLATE];
ret->delfl = TRUE;
table = malloc(sizeof(short[256]));
if(!table) {
_free_locale(locale);
throw_exception(EXCEPTION_BAD_ALLOC, NULL);
}
memcpy(table, locale->locinfo->pctype, sizeof(short[256]));
ret.table = table;
ret->table = table;
_free_locale(locale);
return ret;
}
......@@ -592,22 +595,24 @@ _Ctypevec __cdecl _Getctype(void)
DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype, 8)
_Ctypevec* __thiscall _Locinfo__Getctype(const _Locinfo *this, _Ctypevec *ret)
{
*ret = _Getctype();
return ret;
return _Getctype(ret);
}
/* _Getcvt */
_Cvtvec __cdecl _Getcvt(void)
ULONGLONG __cdecl _Getcvt(void)
{
_Cvtvec ret;
_locale_t locale = _get_current_locale();
union {
_Cvtvec cvtvec;
ULONGLONG ull;
} ret;
TRACE("\n");
ret.page = locale->locinfo->lc_codepage;
ret.handle = locale->locinfo->lc_handle[LC_CTYPE];
ret.cvtvec.page = locale->locinfo->lc_codepage;
ret.cvtvec.handle = locale->locinfo->lc_handle[LC_CTYPE];
_free_locale(locale);
return ret;
return ret.ull;
}
/* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
......@@ -615,7 +620,8 @@ _Cvtvec __cdecl _Getcvt(void)
DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt, 8)
_Cvtvec* __thiscall _Locinfo__Getcvt(const _Locinfo *this, _Cvtvec *ret)
{
*ret = _Getcvt();
ULONGLONG ull = _Getcvt();
memcpy(ret, &ull, sizeof(ull));
return ret;
}
......
......@@ -5750,9 +5750,9 @@
@ stub _FSinh
@ extern _FSnan
# extern _FXbig
@ cdecl _Getcoll()
@ cdecl _Getctype()
@ cdecl _Getcvt()
@ cdecl -ret64 _Getcoll()
@ cdecl _Getctype(ptr)
@ cdecl -ret64 _Getcvt()
@ stub _Getdateorder
@ cdecl _Getwctype(long ptr)
@ cdecl _Getwctypes(ptr ptr ptr ptr)
......
......@@ -3218,15 +3218,13 @@ basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate(basic_string_wc
/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@_W@Z */
/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
basic_string_wchar __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch(
const basic_string_wchar *left, wchar_t right)
basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch(
basic_string_wchar *ret, const basic_string_wchar *left, wchar_t right)
{
basic_string_wchar ret = { 0 };
TRACE("%p %c\n", left, right);
MSVCP_basic_string_wchar_copy_ctor(&ret, left);
MSVCP_basic_string_wchar_append_ch(&ret, right);
MSVCP_basic_string_wchar_copy_ctor(ret, left);
MSVCP_basic_string_wchar_append_ch(ret, right);
return ret;
}
......@@ -3234,15 +3232,13 @@ basic_string_wchar __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch(
/* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WAEBV10@@Z */
/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
/* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
basic_string_wchar __cdecl MSVCP_basic_string_wchar_concatenate_ch_bstr(
wchar_t left, const basic_string_wchar *right)
basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_ch_bstr(
basic_string_wchar* ret, wchar_t left, const basic_string_wchar *right)
{
basic_string_wchar ret = { 0 };
TRACE("%c %p\n", left, right);
MSVCP_basic_string_wchar_ctor_cstr_len(&ret, &left, 1);
MSVCP_basic_string_wchar_append(&ret, right);
MSVCP_basic_string_wchar_ctor_cstr_len(ret, &left, 1);
MSVCP_basic_string_wchar_append(ret, right);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment