msvcp110: Add tr2_sys__Read_dir implementation.

Signed-off-by: YongHao Hu <christopherwuy@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
YongHao Hu 2015-12-21 12:15:34 +08:00 committed by Alexandre Julliard
parent a981d37380
commit 2ed5d0afc1
4 changed files with 32 additions and 6 deletions

View File

@ -1711,8 +1711,8 @@
@ stub -arch=win32 ?_Raise_handler@std@@3P6AXABVexception@stdext@@@ZA
@ stub -arch=win64 ?_Raise_handler@std@@3P6AXAEBVexception@stdext@@@ZEA
@ cdecl ?_Random_device@std@@YAIXZ() _Random_device
@ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPADPADPAXAAW4file_type@123@@Z
@ stub -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEADPEADPEAXAEAW4file_type@123@@Z
@ cdecl -arch=win32 ?_Read_dir@sys@tr2@std@@YAPADPADPAXAAW4file_type@123@@Z(ptr ptr ptr) tr2_sys__Read_dir
@ cdecl -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEADPEADPEAXAEAW4file_type@123@@Z(ptr ptr ptr) tr2_sys__Read_dir
@ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPA_WPA_WPAXAAW4file_type@123@@Z
@ stub -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEA_WPEA_WPEAXAEAW4file_type@123@@Z
@ stub -arch=arm ?_Release@_Pad@std@@QAAXXZ

View File

@ -1672,8 +1672,8 @@
@ stub -arch=win32 ?_Raise_handler@std@@3P6AXABVexception@stdext@@@ZA
@ stub -arch=win64 ?_Raise_handler@std@@3P6AXAEBVexception@stdext@@@ZEA
@ cdecl ?_Random_device@std@@YAIXZ() _Random_device
@ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPADAAY0BAE@DPAXAAW4file_type@123@@Z
@ stub -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEADAEAY0BAE@DPEAXAEAW4file_type@123@@Z
@ cdecl -arch=win32 ?_Read_dir@sys@tr2@std@@YAPADAAY0BAE@DPAXAAW4file_type@123@@Z(ptr ptr ptr) tr2_sys__Read_dir
@ cdecl -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEADAEAY0BAE@DPEAXAEAW4file_type@123@@Z(ptr ptr ptr) tr2_sys__Read_dir
@ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPA_WAAY0BAE@_WPAXAAW4file_type@123@@Z
@ stub -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEA_WAEAY0BAE@_WPEAXAEAW4file_type@123@@Z
@ stub -arch=arm ?_Release@_Pad@std@@QAAXXZ

View File

@ -1672,8 +1672,8 @@
@ stub -arch=win32 ?_Raise_handler@std@@3P6AXABVexception@stdext@@@ZA
@ stub -arch=win64 ?_Raise_handler@std@@3P6AXAEBVexception@stdext@@@ZEA
@ cdecl ?_Random_device@std@@YAIXZ() msvcp120.?_Random_device@std@@YAIXZ
@ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPADAAY0BAE@DPAXAAW4file_type@123@@Z
@ stub -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEADAEAY0BAE@DPEAXAEAW4file_type@123@@Z
@ cdecl -arch=win32 ?_Read_dir@sys@tr2@std@@YAPADAAY0BAE@DPAXAAW4file_type@123@@Z(ptr ptr ptr) msvcp120.?_Read_dir@sys@tr2@std@@YAPADAAY0BAE@DPAXAAW4file_type@123@@Z
@ cdecl -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEADAEAY0BAE@DPEAXAEAW4file_type@123@@Z(ptr ptr ptr) msvcp120.?_Read_dir@sys@tr2@std@@YAPEADAEAY0BAE@DPEAXAEAW4file_type@123@@Z
@ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPA_WAAY0BAE@_WPAXAAW4file_type@123@@Z
@ stub -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEA_WAEAY0BAE@_WPEAXAEAW4file_type@123@@Z
@ stub -arch=arm ?_Release@_Pad@std@@QAAXXZ

View File

@ -14478,6 +14478,32 @@ void* __cdecl tr2_sys__Open_dir(char* target, char const* dest, int* err_code, e
return handle;
}
/* ?_Read_dir@sys@tr2@std@@YAPADAAY0BAE@DPAXAAW4file_type@123@@Z */
/* ?_Read_dir@sys@tr2@std@@YAPEADAEAY0BAE@DPEAXAEAW4file_type@123@@Z */
char* __cdecl tr2_sys__Read_dir(char* target, void* handle, enum file_type* type)
{
WIN32_FIND_DATAA data;
TRACE("(%p %p %p)\n", target, handle, type);
if(!FindNextFileA(handle, &data)) {
*type = status_unknown;
*target = '\0';
return target;
}
while(!strcmp(data.cFileName, ".") || !strcmp(data.cFileName, "..")) {
if(!FindNextFileA(handle, &data)) {
*type = status_unknown;
return NULL;
}
}
strcpy(target, data.cFileName);
if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
*type = directory_file;
else
*type = regular_file;
return target;
}
/* ??0strstream@std@@QAE@PADHH@Z */
/* ??0strstream@std@@QEAA@PEAD_JH@Z */
#if STREAMSIZE_BITS == 64