mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
Fixed typos and compiler warnings.
svn path=/trunk/; revision=427
This commit is contained in:
parent
73d37669c4
commit
bc291ce04e
3 changed files with 15 additions and 26 deletions
|
@ -524,7 +524,7 @@ SearchPathA(
|
|||
for(i=0;i<nBufferLength;i++)
|
||||
lpBuffer[i] = (char)BufferW[i];
|
||||
|
||||
lpFilePart = strrchr(lpBuffer,'\\')+1;
|
||||
*lpFilePart = strrchr(lpBuffer,'\\')+1;
|
||||
return RetValue;
|
||||
}
|
||||
|
||||
|
@ -654,9 +654,7 @@ DWORD STDCALL SearchPathW(LPCWSTR lpPath,
|
|||
}
|
||||
else
|
||||
wcscpy(FileAndExtensionW,lpFileName);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
lstrcatW(BufferW,L"\\??\\");
|
||||
lstrcatW(BufferW,lpPath);
|
||||
|
@ -697,7 +695,6 @@ DWORD STDCALL SearchPathW(LPCWSTR lpPath,
|
|||
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
|
||||
0
|
||||
);
|
||||
|
||||
|
||||
|
||||
if ( !NT_SUCCESS(errCode) ) {
|
||||
|
@ -706,12 +703,11 @@ DWORD STDCALL SearchPathW(LPCWSTR lpPath,
|
|||
else {
|
||||
NtClose(FileHandle);
|
||||
wcscpy(lpBuffer,&BufferW[4]);
|
||||
lpFilePart = wcsrchr(lpBuffer,'\\')+1;
|
||||
*lpFilePart = wcsrchr(lpBuffer,'\\')+1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return lstrlenW(lpBuffer);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -54,8 +53,17 @@ typedef struct _WIN32_FIND_DATA_ASCII {
|
|||
CHAR cAlternateFileName[ 14 ];
|
||||
} WIN32_FIND_DATA_ASCII, *PWIN32_FIND_DATA_ASCII;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
static void FileDataToWin32Data(LPWIN32_FIND_DATA lpFindFileData, PKERNEL32_FIND_FILE_DATA IData)
|
||||
{
|
||||
lpFindFileData->dwFileAttributes = IData->FileInfo.FileAttributes;
|
||||
// memcpy(&lpFindFileData->ftCreationTime,&IData->FileInfo.CreationTime,sizeof(FILETIME));
|
||||
// memcpy(&lpFindFileData->ftLastAccessTime,&IData->FileInfo.LastAccessTime,sizeof(FILETIME));
|
||||
// memcpy(&lpFindFileData->ftLastWriteTime,&IData->FileInfo.LastWriteTime,sizeof(FILETIME));
|
||||
lpFindFileData->nFileSizeHigh = IData->FileInfo.EndOfFile.HighPart;
|
||||
lpFindFileData->nFileSizeLow = IData->FileInfo.EndOfFile.LowPart;
|
||||
}
|
||||
|
||||
WINBOOL STDCALL InternalFindNextFile(HANDLE hFindFile,
|
||||
LPWIN32_FIND_DATA lpFindFileData)
|
||||
|
@ -89,18 +97,6 @@ WINBOOL STDCALL InternalFindNextFile(HANDLE hFindFile,
|
|||
return(TRUE);
|
||||
}
|
||||
|
||||
static FileDataToWin32Data(LPWIN32_FIND_DATA lpFindFileData, PKERNEL32_FIND_FILE_DATA IData)
|
||||
{
|
||||
int i;
|
||||
lpFindFileData->dwFileAttributes = IData->FileInfo.FileAttributes;
|
||||
// memcpy(&lpFindFileData->ftCreationTime,&IData->FileInfo.CreationTime,sizeof(FILETIME));
|
||||
// memcpy(&lpFindFileData->ftLastAccessTime,&IData->FileInfo.LastAccessTime,sizeof(FILETIME));
|
||||
// memcpy(&lpFindFileData->ftLastWriteTime,&IData->FileInfo.LastWriteTime,sizeof(FILETIME));
|
||||
lpFindFileData->nFileSizeHigh = IData->FileInfo.EndOfFile.HighPart;
|
||||
lpFindFileData->nFileSizeLow = IData->FileInfo.EndOfFile.LowPart;
|
||||
|
||||
}
|
||||
|
||||
HANDLE STDCALL InternalFindFirstFile(LPCWSTR lpFileName,
|
||||
LPWIN32_FIND_DATA lpFindFileData)
|
||||
{
|
||||
|
@ -289,17 +285,15 @@ HANDLE STDCALL FindFirstFileW(LPCWSTR lpFileName,
|
|||
{
|
||||
PWIN32_FIND_DATA_UNICODE Ret;
|
||||
PKERNEL32_FIND_FILE_DATA IData;
|
||||
int i;
|
||||
|
||||
IData = InternalFindFirstFile(lpFileName,lpFindFileData);
|
||||
Ret = (PWIN32_FIND_DATA_UNICODE)lpFindFileData;
|
||||
|
||||
memcpy(Ret->cFileName, IData->FileInfo.FileName,
|
||||
IData->FileInfo.FileNameLength);
|
||||
memset(Ret->cAlternateFileName, IData->FileInfo.ShortName,
|
||||
memcpy(Ret->cAlternateFileName, IData->FileInfo.ShortName,
|
||||
IData->FileInfo.ShortNameLength);
|
||||
|
||||
|
||||
return(IData);
|
||||
}
|
||||
|
||||
|
@ -308,7 +302,6 @@ WINBOOL STDCALL FindNextFileW(HANDLE hFindFile,
|
|||
{
|
||||
PWIN32_FIND_DATA_UNICODE Ret;
|
||||
PKERNEL32_FIND_FILE_DATA IData;
|
||||
int i;
|
||||
|
||||
IData = (PKERNEL32_FIND_FILE_DATA)hFindFile;
|
||||
if (!InternalFindNextFile(hFindFile, lpFindFileData))
|
||||
|
|
|
@ -40,7 +40,7 @@ int DRIVE_IsValid( int drive )
|
|||
|
||||
Drives[0] = 'A' + drive -1;
|
||||
if ((drive < 0) || (drive >= MAX_DOS_DRIVES)) return 0;
|
||||
if ( CreateFileA(Drives,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_FLAG_BACKUP_SEMANTICS|FILE_ATTRIBUTE_DIRECTORY,NULL) == -1 ) {
|
||||
if ( CreateFileA(Drives,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_FLAG_BACKUP_SEMANTICS|FILE_ATTRIBUTE_DIRECTORY,NULL) == INVALID_HANDLE_VALUE ) {
|
||||
return 0;
|
||||
}
|
||||
return drive;
|
||||
|
|
Loading…
Reference in a new issue