Commit e55149f8 authored by YongHao Hu's avatar YongHao Hu Committed by Alexandre Julliard

msvcp110: Add tr2_sys__Current_set_wchar implementation and test.

parent ee77fc3b
......@@ -1173,8 +1173,8 @@
@ cdecl -arch=win64 ?_Current_get@sys@tr2@std@@YAPEA_WPEA_W@Z(ptr) tr2_sys__Current_get_wchar
@ cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z(str) tr2_sys__Current_set
@ cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z(str) tr2_sys__Current_set
@ stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z
@ stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z
@ cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z(wstr) tr2_sys__Current_set_wchar
@ cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z(wstr) tr2_sys__Current_set_wchar
@ cdecl -arch=arm ?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ(ptr) locale_facet__Decref
@ thiscall -arch=i386 ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ(ptr) locale_facet__Decref
@ cdecl -arch=win64 ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ(ptr) locale_facet__Decref
......
......@@ -1138,8 +1138,8 @@
@ cdecl -arch=win64 ?_Current_get@sys@tr2@std@@YAPEA_WAEAY0BAE@_W@Z(ptr) tr2_sys__Current_get_wchar
@ cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z(str) tr2_sys__Current_set
@ cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z(str) tr2_sys__Current_set
@ stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z
@ stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z
@ cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z(wstr) tr2_sys__Current_set_wchar
@ cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z(wstr) tr2_sys__Current_set_wchar
@ cdecl -arch=arm ?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ(ptr) locale_facet__Decref
@ thiscall -arch=i386 ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ(ptr) locale_facet__Decref
@ cdecl -arch=win64 ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ(ptr) locale_facet__Decref
......
......@@ -79,6 +79,7 @@ static int (__cdecl *p_tr2_sys__Equivalent_wchar)(WCHAR const*, WCHAR const*);
static char* (__cdecl *p_tr2_sys__Current_get)(char *);
static WCHAR* (__cdecl *p_tr2_sys__Current_get_wchar)(WCHAR *);
static MSVCP_bool (__cdecl *p_tr2_sys__Current_set)(char const*);
static MSVCP_bool (__cdecl *p_tr2_sys__Current_set_wchar)(WCHAR const*);
static int (__cdecl *p_tr2_sys__Make_dir)(char const*);
static MSVCP_bool (__cdecl *p_tr2_sys__Remove_dir)(char const*);
static int (__cdecl *p_tr2_sys__Copy_file)(char const*, char const*, MSVCP_bool);
......@@ -128,6 +129,8 @@ static BOOL init(void)
"?_Current_get@sys@tr2@std@@YAPEA_WAEAY0BAE@_W@Z");
SET(p_tr2_sys__Current_set,
"?_Current_set@sys@tr2@std@@YA_NPEBD@Z");
SET(p_tr2_sys__Current_set_wchar,
"?_Current_set@sys@tr2@std@@YA_NPEB_W@Z");
SET(p_tr2_sys__Make_dir,
"?_Make_dir@sys@tr2@std@@YAHPEBD@Z");
SET(p_tr2_sys__Remove_dir,
......@@ -157,6 +160,8 @@ static BOOL init(void)
"?_Current_get@sys@tr2@std@@YAPA_WAAY0BAE@_W@Z");
SET(p_tr2_sys__Current_set,
"?_Current_set@sys@tr2@std@@YA_NPBD@Z");
SET(p_tr2_sys__Current_set_wchar,
"?_Current_set@sys@tr2@std@@YA_NPB_W@Z");
SET(p_tr2_sys__Make_dir,
"?_Make_dir@sys@tr2@std@@YAHPBD@Z");
SET(p_tr2_sys__Remove_dir,
......@@ -516,6 +521,7 @@ static void test_tr2_sys__Current_set(void)
{
char temp_path[MAX_PATH], current_path[MAX_PATH], origin_path[MAX_PATH];
char *temp;
WCHAR testW[] = {'.','/',0};
memset(temp_path, 0, MAX_PATH);
GetTempPathA(MAX_PATH, temp_path);
memset(origin_path, 0, MAX_PATH);
......@@ -530,7 +536,7 @@ static void test_tr2_sys__Current_set(void)
temp[strlen(temp)] = '\\';
ok(!strcmp(temp_path, current_path), "test_tr2_sys__Current_get(): expect: %s, got %s\n", temp_path, current_path);
ok(p_tr2_sys__Current_set("./"), "p_tr2_sys__Current_set to temp_path failed\n");
ok(p_tr2_sys__Current_set_wchar(testW), "p_tr2_sys__Current_set_wchar to temp_path failed\n");
memset(current_path, 0, MAX_PATH);
temp = p_tr2_sys__Current_get(current_path);
ok(temp == current_path, "p_tr2_sys__Current_get returned different buffer\n");
......
......@@ -1138,8 +1138,8 @@
@ cdecl -arch=win64 ?_Current_get@sys@tr2@std@@YAPEA_WAEAY0BAE@_W@Z(ptr) msvcp120.?_Current_get@sys@tr2@std@@YAPEA_WAEAY0BAE@_W@Z
@ cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPBD@Z(str) msvcp120.?_Current_set@sys@tr2@std@@YA_NPBD@Z
@ cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEBD@Z(str) msvcp120.?_Current_set@sys@tr2@std@@YA_NPEBD@Z
@ stub -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z
@ stub -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z
@ cdecl -arch=win32 ?_Current_set@sys@tr2@std@@YA_NPB_W@Z(wstr) msvcp120.?_Current_set@sys@tr2@std@@YA_NPB_W@Z
@ cdecl -arch=win64 ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z(wstr) msvcp120.?_Current_set@sys@tr2@std@@YA_NPEB_W@Z
@ cdecl -arch=arm ?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ(ptr) msvcp120.?_Decref@facet@locale@std@@UAAPAV_Facet_base@3@XZ
@ thiscall -arch=i386 ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ(ptr) msvcp120.?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ
@ cdecl -arch=win64 ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ(ptr) msvcp120.?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ
......
......@@ -14801,6 +14801,14 @@ WCHAR* __cdecl tr2_sys__Current_get_wchar(WCHAR *current_path)
return current_path;
}
/* ?_Current_set@sys@tr2@std@@YA_NPB_W@Z */
/* ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z */
MSVCP_bool __cdecl tr2_sys__Current_set_wchar(WCHAR const* path)
{
TRACE("(%s)\n", debugstr_w(path));
return SetCurrentDirectoryW(path) != 0;
}
/* ??1_Winit@std@@QAE@XZ */
/* ??1_Winit@std@@QAE@XZ */
DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
......
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