Commit 65db238d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Added locale::global implementation.

parent 9c83b6ee
......@@ -4614,6 +4614,33 @@ basic_string_char* __thiscall locale_name(const locale *this, basic_string_char
return ret;
}
/* ?global@locale@std@@SA?AV12@ABV12@@Z */
/* ?global@locale@std@@SA?AV12@AEBV12@@Z */
locale* __cdecl locale_global(locale *ret, const locale *loc)
{
_Lockit lock;
int i;
TRACE("(%p %p)\n", loc, ret);
_Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
locale_ctor(ret);
if(loc->ptr != global_locale) {
locale_facet__Decref(&global_locale->facet);
global_locale = loc->ptr;
locale_facet__Incref(&global_locale->facet);
for(i=LC_ALL+1; i<=LC_MAX; i++) {
if((global_locale->catmask & (1<<(i-1))) == 0)
continue;
setlocale(i, MSVCP_basic_string_char_c_str(&global_locale->name));
}
}
_Lockit_dtor(&lock);
return ret;
}
DEFINE_RTTI_DATA(locale_facet, 0, 0, NULL, NULL, NULL, ".?AVfacet@locale@std@@");
DEFINE_RTTI_DATA(collate_char, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@D@std@@");
DEFINE_RTTI_DATA(collate_wchar, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@_W@std@@");
......
......@@ -4155,8 +4155,8 @@
@ cdecl -arch=win64 ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ(ptr ptr) basic_streambuf_wchar_getloc
@ thiscall -arch=win32 ?getloc@ios_base@std@@QBE?AVlocale@2@XZ(ptr ptr) ios_base_getloc
@ cdecl -arch=win64 ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ(ptr ptr) ios_base_getloc
@ stub -arch=win32 ?global@locale@std@@SA?AV12@ABV12@@Z
@ stub -arch=win64 ?global@locale@std@@SA?AV12@AEBV12@@Z
@ cdecl -arch=win32 ?global@locale@std@@SA?AV12@ABV12@@Z(ptr ptr) locale_global
@ cdecl -arch=win64 ?global@locale@std@@SA?AV12@AEBV12@@Z(ptr ptr) locale_global
@ thiscall -arch=win32 ?good@ios_base@std@@QBE_NXZ(ptr) ios_base_good
@ cdecl -arch=win64 ?good@ios_base@std@@QEBA_NXZ(ptr) ios_base_good
@ thiscall -arch=win32 ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ(ptr) basic_streambuf_char_gptr
......
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