Fixed typos and compiler warnings.

svn path=/trunk/; revision=427
This commit is contained in:
Eric Kohl 1999-05-05 21:05:00 +00:00
parent 73d37669c4
commit bc291ce04e
3 changed files with 15 additions and 26 deletions

View file

@ -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;
}
@ -656,8 +656,6 @@ DWORD STDCALL SearchPathW(LPCWSTR lpPath,
wcscpy(FileAndExtensionW,lpFileName);
lstrcatW(BufferW,L"\\??\\");
lstrcatW(BufferW,lpPath);
@ -699,19 +697,17 @@ DWORD STDCALL SearchPathW(LPCWSTR lpPath,
);
if ( !NT_SUCCESS(errCode) ) {
return 0;
}
else {
NtClose(FileHandle);
wcscpy(lpBuffer,&BufferW[4]);
lpFilePart = wcsrchr(lpBuffer,'\\')+1;
*lpFilePart = wcsrchr(lpBuffer,'\\')+1;
}
}
return lstrlenW(lpBuffer);
}

View file

@ -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))

View file

@ -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;