strip whitespace from end of lines Modified: trunk/reactos/lib/kernel32/debug/break.c Modified: trunk/reactos/lib/kernel32/debug/output.c Modified: trunk/reactos/lib/kernel32/except/except.c Modified: trunk/reactos/lib/kernel32/file/bintype.c Modified: trunk/reactos/lib/kernel32/file/cnotify.c Modified: trunk/reactos/lib/kernel32/file/copy.c Modified: trunk/reactos/lib/kernel32/file/create.c Modified: trunk/reactos/lib/kernel32/file/curdir.c Modified: trunk/reactos/lib/kernel32/file/delete.c Modified: trunk/reactos/lib/kernel32/file/deviceio.c Modified: trunk/reactos/lib/kernel32/file/dir.c Modified: trunk/reactos/lib/kernel32/file/file.c Modified: trunk/reactos/lib/kernel32/file/find.c Modified: trunk/reactos/lib/kernel32/file/hardlink.c Modified: trunk/reactos/lib/kernel32/file/iocompl.c Modified: trunk/reactos/lib/kernel32/file/lfile.c Modified: trunk/reactos/lib/kernel32/file/lock.c Modified: trunk/reactos/lib/kernel32/file/mailslot.c Modified: trunk/reactos/lib/kernel32/file/move.c Modified: trunk/reactos/lib/kernel32/file/npipe.c Modified: trunk/reactos/lib/kernel32/file/rw.c Modified: trunk/reactos/lib/kernel32/file/volume.c Modified: trunk/reactos/lib/kernel32/include/kernel32.h Modified: trunk/reactos/lib/kernel32/mem/global.c Modified: trunk/reactos/lib/kernel32/mem/isbad.c Modified: trunk/reactos/lib/kernel32/mem/local.c Modified: trunk/reactos/lib/kernel32/mem/procmem.c Modified: trunk/reactos/lib/kernel32/mem/resnotify.c Modified: trunk/reactos/lib/kernel32/mem/section.c Modified: trunk/reactos/lib/kernel32/misc/atom.c Modified: trunk/reactos/lib/kernel32/misc/chartype.c Modified: trunk/reactos/lib/kernel32/misc/comm.c Modified: trunk/reactos/lib/kernel32/misc/computername.c Modified: trunk/reactos/lib/kernel32/misc/console.c Modified: trunk/reactos/lib/kernel32/misc/dllmain.c Modified: trunk/reactos/lib/kernel32/misc/errormsg.c Modified: trunk/reactos/lib/kernel32/misc/handle.c Modified: trunk/reactos/lib/kernel32/misc/lang.c Modified: trunk/reactos/lib/kernel32/misc/lcformat.c Modified: trunk/reactos/lib/kernel32/misc/ldr.c Modified: trunk/reactos/lib/kernel32/misc/lzexpand_main.c Modified: trunk/reactos/lib/kernel32/misc/nls.c Modified: trunk/reactos/lib/kernel32/misc/profile.c Modified: trunk/reactos/lib/kernel32/misc/stubs.c Modified: trunk/reactos/lib/kernel32/misc/sysinfo.c Modified: trunk/reactos/lib/kernel32/misc/time.c Modified: trunk/reactos/lib/kernel32/misc/timerqueue.c Modified: trunk/reactos/lib/kernel32/misc/toolhelp.c Modified: trunk/reactos/lib/kernel32/misc/version.c Modified: trunk/reactos/lib/kernel32/process/cmdline.c Modified: trunk/reactos/lib/kernel32/process/create.c Modified: trunk/reactos/lib/kernel32/process/job.c Modified: trunk/reactos/lib/kernel32/process/proc.c Modified: trunk/reactos/lib/kernel32/process/session.c Modified: trunk/reactos/lib/kernel32/string/lstring.c Modified: trunk/reactos/lib/kernel32/synch/critical.c Modified: trunk/reactos/lib/kernel32/synch/intrlck.c Modified: trunk/reactos/lib/kernel32/synch/timer.c Modified: trunk/reactos/lib/kernel32/synch/wait.c Modified: trunk/reactos/lib/kernel32/thread/fiber.c Modified: trunk/reactos/lib/kernel32/thread/fls.c Modified: trunk/reactos/lib/kernel32/thread/thread.c Modified: trunk/reactos/lib/kernel32/thread/tls.c _____
Modified: trunk/reactos/lib/kernel32/debug/break.c --- trunk/reactos/lib/kernel32/debug/break.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/debug/break.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -19,7 +19,7 @@
BOOL WINAPI DebugBreakProcess(HANDLE Process) { NTSTATUS nErrCode = DbgUiIssueRemoteBreakin(Process); - + if(!NT_SUCCESS(nErrCode)) { SetLastErrorByStatus(nErrCode); _____
Modified: trunk/reactos/lib/kernel32/debug/output.c --- trunk/reactos/lib/kernel32/debug/output.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/debug/output.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -25,7 +25,7 @@
PSID psidSystem = NULL; PSID psidAdministrators = NULL; PSID psidEveryone = NULL; - + /* buffer for the DACL */ PVOID pDaclBuf = NULL;
@@ -42,7 +42,7 @@
/* security descriptor of the mutex */ SECURITY_DESCRIPTOR sdMutexSecurity; - + /* attributes of the mutex object we'll create */ SECURITY_ATTRIBUTES saMutexAttribs = { @@ -115,7 +115,7 @@ 0, &psidAdministrators ); - + /* failure */ if(!NT_SUCCESS(nErrCode)) __leave;
@@ -134,7 +134,7 @@ 0, &psidEveryone ); - + /* failure */ if(!NT_SUCCESS(nErrCode)) __leave;
@@ -193,7 +193,7 @@
/* create the security descriptor */ nErrCode = RtlCreateSecurityDescriptor - ( + ( &sdMutexSecurity, SECURITY_DESCRIPTOR_REVISION ); @@ -230,7 +230,7 @@ #if 0 } #endif - + return hMutex; }
@@ -311,13 +311,13 @@ { /* synchronize with other invocations of OutputDebugString */ WaitForSingleObject(hDBMonMutex, INFINITE); - + /* buffer of the system-wide debug message monitor */ hDBMonBuffer = OpenFileMappingW(SECTION_MAP_WRITE, FALSE, L"DBWIN_BUFFER"); - + /* couldn't open the buffer: send the string to the kernel debugger */ if(hDBMonBuffer == NULL) break; - + /* map the buffer */ pDBMonBuffer = MapViewOfFile ( @@ -327,16 +327,16 @@ 0, 0 ); - + /* couldn't map the buffer: send the string to the kernel debugger */ if(pDBMonBuffer == NULL) break; - + /* open the event signaling that the buffer can be accessed */ hDBMonBufferReady = OpenEventW(SYNCHRONIZE, FALSE, L"DBWIN_BUFFER_READY"); - + /* couldn't open the event: send the string to the kernel debugger */ if(hDBMonBufferReady == NULL) break; - + /* open the event to be signaled when the buffer has been filled */ hDBMonDataReady = OpenEventW(EVENT_MODIFY_STATE, FALSE, L"DBWIN_DATA_READY"); @@ -395,13 +395,13 @@ nRoundLen = PAGE_SIZE - sizeof(DWORD) - 1; else nRoundLen = nOutputStringLen; - + /* copy the current block into the buffer */ memcpy(pDBMonBuffer->Buffer, _OutputString, nOutputStringLen); - + /* null-terminate the current block */ pDBMonBuffer->Buffer[nOutputStringLen] = 0; - + /* signal that the data contains meaningful data and can be read */ SetEvent(hDBMonDataReady); } @@ -410,19 +410,19 @@ { /* output in blocks of 512 characters */ CHAR a_cBuffer[512]; - + /* write a maximum of 511 bytes */ if(nOutputStringLen > (sizeof(a_cBuffer) - 1)) nRoundLen = sizeof(a_cBuffer) - 1; else nRoundLen = nOutputStringLen; - + /* copy the current block */ memcpy(a_cBuffer, _OutputString, nRoundLen); - + /* null-terminate the current block */ a_cBuffer[nRoundLen] = 0; - + /* send the current block to the kernel debugger */ DbgPrint("%s", a_cBuffer); } @@ -490,7 +490,7 @@ { /* output the converted string */ OutputDebugStringA(strOut.Buffer); - + /* free the converted string */ RtlFreeAnsiString(&strOut); } _____
Modified: trunk/reactos/lib/kernel32/except/except.c --- trunk/reactos/lib/kernel32/except/except.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/except/except.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -23,7 +23,7 @@
{ NTSTATUS Status; UINT ErrMode; - + Status = NtQueryInformationProcess(NtCurrentProcess(), ProcessDefaultHardErrorMode, (PVOID)&ErrMode, @@ -34,22 +34,22 @@ SetLastErrorByStatus(Status); return 0; } - + return ErrMode; }
/* * @implemented */ -UINT +UINT STDCALL SetErrorMode(UINT uMode) { UINT PrevErrMode; NTSTATUS Status; - + PrevErrMode = GetErrorMode(); - + Status = NtSetInformationProcess(NtCurrentProcess(), ProcessDefaultHardErrorMode, (PVOID)&uMode, @@ -83,7 +83,7 @@ * The address can point to anywhere within the module. */ static const char* -_module_name_from_addr(const void* addr, void **module_start_addr, +_module_name_from_addr(const void* addr, void **module_start_addr, char* psz, size_t nChars) { MEMORY_BASIC_INFORMATION mbi; @@ -200,12 +200,12 @@ }
/* - * Returning EXCEPTION_EXECUTE_HANDLER means that the code in + * Returning EXCEPTION_EXECUTE_HANDLER means that the code in * the __except block will be executed. Normally this will end up in a * Terminate process. */
- return EXCEPTION_EXECUTE_HANDLER; + return EXCEPTION_EXECUTE_HANDLER; }
@@ -252,7 +252,7 @@ { ExceptionRecord.NumberParameters = nNumberOfArguments; for ( nNumberOfArguments = 0; - (nNumberOfArguments < ExceptionRecord.NumberParameters); + (nNumberOfArguments < ExceptionRecord.NumberParameters); nNumberOfArguments ++ ) { _____
Modified: trunk/reactos/lib/kernel32/file/bintype.c --- trunk/reactos/lib/kernel32/file/bintype.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/bintype.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -34,10 +34,10 @@
LPSTR nametab = NULL; DWORD Read, Ret; int i; - + Ret = BINARY_OS216; CurPos = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); - + /* read modref table */ if((SetFilePointer(hFile, mz->e_lfanew + ne->ne_modtab, NULL, FILE_BEGIN) == -1) || (!(modtab = HeapAlloc(GetProcessHeap(), 0, ne->ne_cmod * sizeof(WORD)))) || @@ -46,7 +46,7 @@ { goto broken; } - + /* read imported names table */ if((SetFilePointer(hFile, mz->e_lfanew + ne->ne_imptab, NULL, FILE_BEGIN) == -1) || (!(nametab = HeapAlloc(GetProcessHeap(), 0, ne->ne_enttab - ne->ne_imptab))) || @@ -55,7 +55,7 @@ { goto broken; } - + for(i = 0; i < ne->ne_cmod; i++) { LPSTR module; @@ -67,10 +67,10 @@ goto done; } } - + broken: DPRINT("InternalIsOS2OrOldWin(): Binary file seems to be broken\n"); - + done: HeapFree(GetProcessHeap(), 0, modtab); HeapFree(GetProcessHeap(), 0, nametab); @@ -100,14 +100,14 @@ } Header; char magic[4]; DWORD Read; - + if((SetFilePointer(hFile, 0, NULL, FILE_BEGIN) == -1) || (!ReadFile(hFile, &Header, sizeof(Header), &Read, NULL) || (Read != sizeof(Header)))) { return BINARY_UNKNOWN; } - + if(!memcmp(Header.elf.magic, "\177ELF", sizeof(Header.elf.magic))) { /* FIXME: we don't bother to check byte order, architecture, etc. */ @@ -120,7 +120,7 @@ } return BINARY_UNKNOWN; } - + /* Mach-o File with Endian set to Big Endian or Little Endian*/ if(Header.macho.magic == 0xFEEDFACE || Header.macho.magic == 0xECAFDEEF) @@ -133,7 +133,7 @@ } return BINARY_UNKNOWN; } - + /* Not ELF, try DOS */ if(Header.mz.e_magic == IMAGE_DOS_SIGNATURE) { @@ -150,7 +150,7 @@ { return BINARY_DOS; } - + /* Reading the magic field succeeded so * we will try to determine what type it is. */ @@ -162,14 +162,14 @@ { return BINARY_DOS; } - + /* FIXME - detect 32/64 bit */ - + if(FileHeader.Characteristics & IMAGE_FILE_DLL) return BINARY_PE_DLL32; return BINARY_PE_EXE32; } - + if(!memcmp(magic, "NE", 1)) { /* This is a Windows executable (NE) header. This can @@ -185,7 +185,7 @@ /* Couldn't read header, so abort. */ return BINARY_DOS; } - + switch(ne.ne_exetyp) { case 2: @@ -213,29 +213,29 @@ { HANDLE hFile; DWORD BinType; - + if(!lpApplicationName || !lpBinaryType) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - + hFile = CreateFileW(lpApplicationName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); if(hFile == INVALID_HANDLE_VALUE) { return FALSE; } - + BinType = InternalGetBinaryType(hFile); CloseHandle(hFile); - + switch(BinType) { case BINARY_UNKNOWN: { WCHAR *dot; - + /* * guess from filename */ @@ -288,7 +288,7 @@ return FALSE; } } - + DPRINT1("Invalid binary type returned!\n", BinType); return FALSE; } @@ -305,16 +305,16 @@ ) { PWCHAR ApplicationNameW; - + if(!lpApplicationName || !lpBinaryType) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - + if (!(ApplicationNameW = FilenameA2W(lpApplicationName, FALSE))) return FALSE; - + return GetBinaryTypeW(ApplicationNameW, lpBinaryType); }
_____
Modified: trunk/reactos/lib/kernel32/file/cnotify.c --- trunk/reactos/lib/kernel32/file/cnotify.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/cnotify.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -26,7 +26,7 @@
SetLastErrorByStatus(Status); return FALSE; } - + return TRUE; }
@@ -101,16 +101,16 @@
- /* FIXME: We free the string alloced by RtlDosPathNameToNtPathName_U, but what + /* FIXME: We free the string alloced by RtlDosPathNameToNtPathName_U, but what * about the special case where the user can pass a \?\ path? We must not free * the users buffer!. But should we even call RtlDosPathNameToNtPathName_U in that * case??? -Gunnar */
RtlFreeUnicodeString( &NtPathU); - -
+ + if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); @@ -156,9 +156,9 @@ NULL,//Buffer, 0,//BufferLength, FILE_NOTIFY_CHANGE_SECURITY,//meaningless/ignored for subsequent calls, but must contain a valid flag - 0 //meaningless/ignored for subsequent calls + 0 //meaningless/ignored for subsequent calls ); - + if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); @@ -170,8 +170,8 @@
extern VOID STDCALL -(ApcRoutine)(PVOID ApcContext, - struct _IO_STATUS_BLOCK* IoStatusBlock, +(ApcRoutine)(PVOID ApcContext, + struct _IO_STATUS_BLOCK* IoStatusBlock, ULONG Reserved);
@@ -193,10 +193,10 @@ { NTSTATUS Status; IO_STATUS_BLOCK IoStatus; - + if (lpOverlapped ) lpOverlapped->Internal = STATUS_PENDING; - + Status = NtNotifyChangeDirectoryFile( hDirectory, lpOverlapped ? lpOverlapped->hEvent : NULL, @@ -207,18 +207,18 @@ nBufferLength, dwNotifyFilter, bWatchSubtree - ); - + ); + if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); return FALSE; }
- + /* NOTE: lpBytesReturned is undefined for asynch. operations */ *lpBytesReturned = IoStatus.Information; - + return TRUE; }
_____
Modified: trunk/reactos/lib/kernel32/file/copy.c --- trunk/reactos/lib/kernel32/file/copy.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/copy.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -7,7 +7,7 @@
* PROGRAMMER: Ariadne (ariadne@xs4all.nl) * UPDATE HISTORY: * 01/11/98 Created - * 07/02/99 Moved to seperate file + * 07/02/99 Moved to seperate file */
/* INCLUDES ****************************************************************/ @@ -53,7 +53,7 @@ { BytesCopied.QuadPart = 0; EndOfFileFound = FALSE; - CallbackReason = CALLBACK_STREAM_SWITCH; + CallbackReason = CALLBACK_STREAM_SWITCH; while (! EndOfFileFound && NT_SUCCESS(errCode) && (NULL == pbCancel || ! *pbCancel)) _____
Modified: trunk/reactos/lib/kernel32/file/create.c --- trunk/reactos/lib/kernel32/file/create.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/create.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -36,9 +36,9 @@
{ PWCHAR FileNameW; HANDLE FileHandle; - + DPRINT("CreateFileA(lpFileName %s)\n",lpFileName); - + if (!(FileNameW = FilenameA2W(lpFileName, FALSE))) return INVALID_HANDLE_VALUE;
@@ -49,7 +49,7 @@ dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); - + return FileHandle; }
@@ -84,15 +84,15 @@ case CREATE_NEW: dwCreationDisposition = FILE_CREATE; break; - + case CREATE_ALWAYS: dwCreationDisposition = FILE_OVERWRITE_IF; break; - + case OPEN_EXISTING: dwCreationDisposition = FILE_OPEN; break; - + case OPEN_ALWAYS: dwCreationDisposition = FILE_OPEN_IF; break; @@ -100,7 +100,7 @@ case TRUNCATE_EXISTING: dwCreationDisposition = FILE_OVERWRITE; break; - + default: SetLastError(ERROR_INVALID_PARAMETER); return (INVALID_HANDLE_VALUE); @@ -116,7 +116,7 @@ SetLastError(ERROR_PATH_NOT_FOUND); return INVALID_HANDLE_VALUE; } - + DPRINT("NtPathU '%S'\n", NtPathU.Buffer);
/* validate & translate the flags */ @@ -128,7 +128,7 @@ while waiting for file io to complete */ Flags |= FILE_SYNCHRONOUS_IO_NONALERT; } - + if(dwFlagsAndAttributes & FILE_FLAG_WRITE_THROUGH) Flags |= FILE_WRITE_THROUGH;
@@ -137,13 +137,13 @@
if(dwFlagsAndAttributes & FILE_FLAG_RANDOM_ACCESS) Flags |= FILE_RANDOM_ACCESS; - + if(dwFlagsAndAttributes & FILE_FLAG_SEQUENTIAL_SCAN) Flags |= FILE_SEQUENTIAL_ONLY; - + if(dwFlagsAndAttributes & FILE_FLAG_DELETE_ON_CLOSE) Flags |= FILE_DELETE_ON_CLOSE; - + if(dwFlagsAndAttributes & FILE_FLAG_BACKUP_SEMANTICS) { if(dwDesiredAccess & GENERIC_ALL) @@ -167,7 +167,7 @@ Flags |= FILE_OPEN_NO_RECALL;
FileAttributes = (dwFlagsAndAttributes & (FILE_ATTRIBUTE_VALID_FLAGS & ~FILE_ATTRIBUTE_DIRECTORY)); - + /* handle may allways be waited on and querying attributes are allways allowed */ dwDesiredAccess |= SYNCHRONIZE | FILE_READ_ATTRIBUTES;
@@ -212,7 +212,7 @@ return Reply.Data.GetInputHandleReply.InputHandle; } } - + if (hTemplateFile != NULL) { FILE_EA_INFORMATION EaInformation; @@ -239,7 +239,7 @@ SetLastError(ERROR_NOT_ENOUGH_MEMORY); return INVALID_HANDLE_VALUE; } - + Status = NtQueryEaFile(hTemplateFile, &IoStatusBlock, EaBuffer, @@ -249,7 +249,7 @@ 0, NULL, TRUE); - + if (NT_SUCCESS(Status)) { /* we successfully read the extended attributes, break the loop @@ -263,7 +263,7 @@ 0, EaBuffer); EaBuffer = NULL; - + if (Status != STATUS_BUFFER_TOO_SMALL) { /* unless we just allocated not enough memory, break the loop @@ -296,7 +296,7 @@
ObjectAttributes.SecurityDescriptor = lpSecurityAttributes->lpSecurityDescriptor; } - + if(!(dwFlagsAndAttributes & FILE_FLAG_POSIX_SEMANTICS)) ObjectAttributes.Attributes |= OBJ_CASE_INSENSITIVE;
@@ -314,7 +314,7 @@ EaLength);
RtlFreeUnicodeString(&NtPathU); - + /* free the extended attributes buffer if allocated */ if (EaBuffer != NULL) { @@ -340,14 +340,14 @@ { SetLastErrorByStatus (Status); } - + return INVALID_HANDLE_VALUE; } - + /* create with OPEN_ALWAYS (FILE_OPEN_IF) returns info = FILE_OPENED or FILE_CREATED create with CREATE_ALWAYS (FILE_OVERWRITE_IF) returns info = FILE_OVERWRITTEN or FILE_CREATED - */ + */ if (dwCreationDisposition == FILE_OPEN_IF) { SetLastError(IoStatusBlock.Information == FILE_OPENED ? ERROR_ALREADY_EXISTS : 0); _____
Modified: trunk/reactos/lib/kernel32/file/curdir.c --- trunk/reactos/lib/kernel32/file/curdir.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/curdir.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -49,7 +49,7 @@
SetLastError(ERROR_FILENAME_EXCED_RANGE); return 0; } - + return FilenameW2A_FitOrFail(lpBuffer, nBufferLength, BufferW, ret+1); }
@@ -123,7 +123,7 @@ /* * @implemented * - * NOTE: Windows returns a dos/short (8.3) path + * NOTE: Windows returns a dos/short (8.3) path */ DWORD STDCALL @@ -221,7 +221,7 @@ UINT uSize ) { - return FilenameU2A_FitOrFail(lpBuffer, uSize, &SystemDirectory); + return FilenameU2A_FitOrFail(lpBuffer, uSize, &SystemDirectory); }
@@ -264,7 +264,7 @@ UINT uSize ) { - return FilenameU2A_FitOrFail(lpBuffer, uSize, &WindowsDirectory); + return FilenameU2A_FitOrFail(lpBuffer, uSize, &WindowsDirectory); }
_____
Modified: trunk/reactos/lib/kernel32/file/delete.c --- trunk/reactos/lib/kernel32/file/delete.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/delete.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -29,7 +29,7 @@
) { PWCHAR FileNameW; - + if (!(FileNameW = FilenameA2W(lpFileName, FALSE))) return FALSE;
_____
Modified: trunk/reactos/lib/kernel32/file/deviceio.c --- trunk/reactos/lib/kernel32/file/deviceio.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/deviceio.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -31,7 +31,7 @@
{ BOOL FsIoCtl; NTSTATUS Status; - + FsIoCtl = ((dwIoControlCode >> 16) == FILE_DEVICE_FILE_SYSTEM);
if (lpBytesReturned != NULL) @@ -42,7 +42,7 @@ if (lpOverlapped != NULL) { PVOID ApcContext; - + lpOverlapped->Internal = STATUS_PENDING; ApcContext = (((ULONG_PTR)lpOverlapped->hEvent & 0x1) ? NULL : lpOverlapped);
@@ -88,7 +88,7 @@ else { IO_STATUS_BLOCK Iosb; - + if (FsIoCtl) { Status = NtFsControlFile(hDevice, @@ -165,18 +165,18 @@ { if (!bWait) { - /* can't use SetLastErrorByStatus(STATUS_PENDING) here, + /* can't use SetLastErrorByStatus(STATUS_PENDING) here, since STATUS_PENDING translates to ERROR_IO_PENDING */ SetLastError(ERROR_IO_INCOMPLETE); return FALSE; } - + hObject = lpOverlapped->hEvent ? lpOverlapped->hEvent : hFile;
/* Wine delivers pending APC's while waiting, but Windows does not, nor do we... */ WaitStatus = WaitForSingleObject(hObject, INFINITE); - + if (WaitStatus == WAIT_FAILED) { DPRINT("Wait failed!\n"); @@ -186,7 +186,7 @@ }
*lpNumberOfBytesTransferred = lpOverlapped->InternalHigh; - + if (!NT_SUCCESS(lpOverlapped->Internal)) { SetLastErrorByStatus(lpOverlapped->Internal); _____
Modified: trunk/reactos/lib/kernel32/file/dir.c --- trunk/reactos/lib/kernel32/file/dir.c 2005-05-09 01:46:46 UTC (rev 15171) +++ trunk/reactos/lib/kernel32/file/dir.c 2005-05-09 01:46:57 UTC (rev 15172) @@ -35,7 +35,7 @@
) { PWCHAR PathNameW; - + if (!(PathNameW = FilenameA2W(lpPathName, FALSE))) return FALSE;
@@ -60,7 +60,7 @@
if (!(TemplateDirectoryW = FilenameA2W(lpTemplateDirectory, TRUE))) return FALSE; - + if (!(NewDirectoryW = FilenameA2W(lpNewDirectory, FALSE))) { RtlFreeHeap (RtlGetProcessHeap (), @@ -68,7 +68,7 @@ TemplateDirectoryW); return FALSE; } - + ret = CreateDirectoryExW (TemplateDirectoryW, NewDirectoryW, lpSecurityAttributes); @@ -178,7 +178,7 @@ SetLastError(ERROR_PATH_NOT_FOUND); return FALSE; } - + InitializeObjectAttributes(&ObjectAttributes, &NtTemplatePathU, OBJ_CASE_INSENSITIVE, @@ -204,7 +204,7 @@ SetLastErrorByStatus (Status); return FALSE; } - + for (;;) { Status = NtQueryInformationFile(TemplateHandle, @@ -222,7 +222,7 @@ Status = STATUS_INSUFFICIENT_RESOURCES; break; } - + Status = NtQueryEaFile(TemplateHandle, &IoStatusBlock, EaBuffer, @@ -260,13 +260,13 @@ break; } } - + NtClose(TemplateHandle); - + RtlFreeHeap (RtlGetProcessHeap (), 0, NtTemplatePathU.Buffer); - + if (!NT_SUCCESS(Status)) { /* free the he extended attributes buffer */ @@ -298,7 +298,7 @@ 0, EaBuffer); } - + SetLastError(ERROR_PATH_NOT_FOUND); return FALSE; } @@ -355,7 +355,7 @@ ) { PWCHAR PathNameW; - + DPRINT("RemoveDirectoryA(%s)\n",lpPathName);
if (!(PathNameW = FilenameA2W(lpPathName, FALSE))) @@ -428,7 +428,7 @@
sizeof(FILE_DISPOSITION_INFORMATION), FileDispositionInformation); NtClose(DirectoryHandle); - + if (!NT_SUCCESS(Status)) { SetLastErrorByStatus (Status); @@ -469,27 +469,27 @@ return 0;
ret = GetFullPathNameW(FileNameW, MAX_PATH, BufferW, &FilePartW); - + if (!ret) return 0; - + if (ret > MAX_PATH) { SetLastError(ERROR_FILENAME_EXCED_RANGE); return 0; } - + ret = FilenameW2A_FitOrFail(lpBuffer, nBufferLength, BufferW, ret+1); - + if (ret < nBufferLength && lpFilePart) { /* if the path closed with '', FilePart is NULL */ - if (!FilePartW) + if (!FilePartW) *lpFilePart=NULL; else *lpFilePart = (FilePartW - BufferW) + lpBuffer; } - + DPRINT("GetFullPathNameA ret: lpBuffer %s lpFilePart %s\n", lpBuffer, (lpFilePart == NULL) ? "NULL" : *lpFilePart);
@@ -555,13 +555,13 @@
if (!ret) return 0; - + if (ret > MAX_PATH) { SetLastError(ERROR_FILENAME_EXCED_RANGE); return 0; } - + return FilenameW2A_FitOrFail(shortpath, shortlen, ShortPathW, ret+1); }
@@ -861,7 +861,7 @@ } else { - Name = RtlAllocateHeap(GetProcessHeap(), + Name = RtlAllocateHeap(GetProcessHeap(),
HEAP_GENERATE_EXCEPTIONS, (wcslen(lpFileName) + wcslen(lpExtension) + 1) * sizeof(WCHAR)); @@ -965,9 +965,9 @@ ) { UNICODE_STRING PathName; - + RtlInitUnicodeString(&PathName, lpPathName); - + RtlEnterCriticalSection(&DllLock); if(PathName.Length > 0) { @@ -988,7 +988,7 @@ } DllDirectory.Length = 0; DllDirectory.MaximumLength = PathName.Length + sizeof(WCHAR); - + RtlCopyUnicodeString(&DllDirectory, &PathName); } } @@ -1011,13 +1011,13 @@ ) { PWCHAR PathNameW=NULL; - [truncated at 1000 lines; 5947 more skipped]