remove whitespace from end of lines
authorSteven Edwards <winehacker@gmail.com>
Sun, 8 May 2005 04:07:56 +0000 (04:07 +0000)
committerSteven Edwards <winehacker@gmail.com>
Sun, 8 May 2005 04:07:56 +0000 (04:07 +0000)
svn path=/trunk/; revision=15111

157 files changed:
reactos/subsys/csrss/api/handle.c
reactos/subsys/csrss/api/process.c
reactos/subsys/csrss/api/wapi.c
reactos/subsys/csrss/csrss.c
reactos/subsys/csrss/include/api.h
reactos/subsys/csrss/init.c
reactos/subsys/csrss/print.c
reactos/subsys/csrss/video.c
reactos/subsys/csrss/win32csr/conio.c
reactos/subsys/csrss/win32csr/dllmain.c
reactos/subsys/csrss/win32csr/guiconsole.c
reactos/subsys/csrss/win32csr/tuiconsole.c
reactos/subsys/ntvdm/ntvdm.c
reactos/subsys/smss/init.c
reactos/subsys/smss/smapi.c
reactos/subsys/smss/smss.c
reactos/subsys/smss/smss.h
reactos/subsys/system/autochk/autochk.c
reactos/subsys/system/cmd/alias.c
reactos/subsys/system/cmd/attrib.c
reactos/subsys/system/cmd/batch.c
reactos/subsys/system/cmd/beep.c
reactos/subsys/system/cmd/call.c
reactos/subsys/system/cmd/chcp.c
reactos/subsys/system/cmd/choice.c
reactos/subsys/system/cmd/cls.c
reactos/subsys/system/cmd/cmd.c
reactos/subsys/system/cmd/cmdinput.c
reactos/subsys/system/cmd/cmdtable.c
reactos/subsys/system/cmd/color.c
reactos/subsys/system/cmd/console.c
reactos/subsys/system/cmd/copy.c
reactos/subsys/system/cmd/date.c
reactos/subsys/system/cmd/del.c
reactos/subsys/system/cmd/delay.c
reactos/subsys/system/cmd/dir.c
reactos/subsys/system/cmd/dirstack.c
reactos/subsys/system/cmd/echo.c
reactos/subsys/system/cmd/error.c
reactos/subsys/system/cmd/for.c
reactos/subsys/system/cmd/free.c
reactos/subsys/system/cmd/goto.c
reactos/subsys/system/cmd/history.c
reactos/subsys/system/cmd/if.c
reactos/subsys/system/cmd/internal.c
reactos/subsys/system/cmd/label.c
reactos/subsys/system/cmd/memory.c
reactos/subsys/system/cmd/misc.c
reactos/subsys/system/cmd/move.c
reactos/subsys/system/cmd/msgbox.c
reactos/subsys/system/cmd/path.c
reactos/subsys/system/cmd/pause.c
reactos/subsys/system/cmd/prompt.c
reactos/subsys/system/cmd/ren.c
reactos/subsys/system/cmd/screen.c
reactos/subsys/system/cmd/set.c
reactos/subsys/system/cmd/shift.c
reactos/subsys/system/cmd/start.c
reactos/subsys/system/cmd/strtoclr.c
reactos/subsys/system/cmd/time.c
reactos/subsys/system/cmd/timer.c
reactos/subsys/system/cmd/title.c
reactos/subsys/system/cmd/type.c
reactos/subsys/system/cmd/ver.c
reactos/subsys/system/cmd/verify.c
reactos/subsys/system/cmd/vol.c
reactos/subsys/system/cmd/window.c
reactos/subsys/system/dhcp/adapter.c
reactos/subsys/system/dhcp/api.c
reactos/subsys/system/dhcp/dhclient.c
reactos/subsys/system/dhcp/dhcpmain.c
reactos/subsys/system/dhcp/dispatch.c
reactos/subsys/system/dhcp/memory.c
reactos/subsys/system/dhcp/pipe.c
reactos/subsys/system/dhcp/socket.c
reactos/subsys/system/dhcp/tree.c
reactos/subsys/system/dhcp/util.c
reactos/subsys/system/explorer/explorer_intres.h
reactos/subsys/system/explorer/i386-stub-win32.c
reactos/subsys/system/explorer/shell/pane.h
reactos/subsys/system/explorer/shell/webchild.h
reactos/subsys/system/explorer/taskbar/quicklaunch.h
reactos/subsys/system/explorer/taskbar/taskbar.h
reactos/subsys/system/explorer/utility/dragdropimpl.h
reactos/subsys/system/explorer/utility/shellclasses.h
reactos/subsys/system/explorer/utility/window.h
reactos/subsys/system/format/format.c
reactos/subsys/system/ibrowser/utility/window.h
reactos/subsys/system/ibrowser/webchild.h
reactos/subsys/system/lsass/lsass.c
reactos/subsys/system/notepad/dialog.c
reactos/subsys/system/notepad/main.c
reactos/subsys/system/regedit/childwnd.c
reactos/subsys/system/regedit/edit.c
reactos/subsys/system/regedit/framewnd.c
reactos/subsys/system/regedit/hexedit.c
reactos/subsys/system/regedit/listview.c
reactos/subsys/system/regedit/main.c
reactos/subsys/system/regedit/security.c
reactos/subsys/system/regedit/security.h
reactos/subsys/system/regedit/treeview.c
reactos/subsys/system/rundll32/rundll32.c
reactos/subsys/system/services/database.c
reactos/subsys/system/services/services.c
reactos/subsys/system/sndvol32/mixer.c
reactos/subsys/system/sndvol32/sndvol32.c
reactos/subsys/system/taskmgr/about.c
reactos/subsys/system/taskmgr/about.h
reactos/subsys/system/taskmgr/affinity.c
reactos/subsys/system/taskmgr/affinity.h
reactos/subsys/system/taskmgr/applpage.c
reactos/subsys/system/taskmgr/applpage.h
reactos/subsys/system/taskmgr/column.h
reactos/subsys/system/taskmgr/dbgchnl.c
reactos/subsys/system/taskmgr/debug.h
reactos/subsys/system/taskmgr/endproc.c
reactos/subsys/system/taskmgr/endproc.h
reactos/subsys/system/taskmgr/font.c
reactos/subsys/system/taskmgr/font.h
reactos/subsys/system/taskmgr/graph.c
reactos/subsys/system/taskmgr/graph.h
reactos/subsys/system/taskmgr/graphctl.c
reactos/subsys/system/taskmgr/graphctl.h
reactos/subsys/system/taskmgr/optnmenu.c
reactos/subsys/system/taskmgr/optnmenu.h
reactos/subsys/system/taskmgr/perfdata.c
reactos/subsys/system/taskmgr/perfdata.h
reactos/subsys/system/taskmgr/perfpage.c
reactos/subsys/system/taskmgr/perfpage.h
reactos/subsys/system/taskmgr/priority.c
reactos/subsys/system/taskmgr/priority.h
reactos/subsys/system/taskmgr/proclist.c
reactos/subsys/system/taskmgr/proclist.h
reactos/subsys/system/taskmgr/procpage.c
reactos/subsys/system/taskmgr/procpage.h
reactos/subsys/system/taskmgr/resource.h
reactos/subsys/system/taskmgr/run.c
reactos/subsys/system/taskmgr/run.h
reactos/subsys/system/taskmgr/taskmgr.c
reactos/subsys/system/taskmgr/taskmgr.h
reactos/subsys/system/taskmgr/trayicon.c
reactos/subsys/system/taskmgr/trayicon.h
reactos/subsys/system/userinit/userinit.c
reactos/subsys/system/usetup/bootsup.c
reactos/subsys/system/usetup/cabinet.c
reactos/subsys/system/usetup/console.c
reactos/subsys/system/usetup/filesup.c
reactos/subsys/system/usetup/partlist.c
reactos/subsys/system/usetup/settings.c
reactos/subsys/system/usetup/usetup.c
reactos/subsys/system/vmwinst/vmwinst.c
reactos/subsys/system/welcome/welcome.c
reactos/subsys/system/winefile/winefile.c
reactos/subsys/system/winlogon/sas.c
reactos/subsys/system/winlogon/winlogon.c
reactos/subsys/system/winlogon/winlogon.h
reactos/subsys/system/winlogon/wlx.c

index 1ae1c9e..faa8c3e 100644 (file)
@@ -150,18 +150,18 @@ NTSTATUS STDCALL CsrInsertObject( PCSRSS_PROCESS_DATA ProcessData, PHANDLE Handl
      }
    NewBlock = RtlAllocateHeap(CsrssApiHeap,
                              HEAP_ZERO_MEMORY,
-                             (ProcessData->HandleTableSize + 64) * 
+                             (ProcessData->HandleTableSize + 64) *
                              sizeof(HANDLE));
    if (NewBlock == NULL)
      {
        return(STATUS_UNSUCCESSFUL);
      }
-   RtlCopyMemory(NewBlock, 
+   RtlCopyMemory(NewBlock,
                 ProcessData->HandleTable,
                 ProcessData->HandleTableSize * sizeof(HANDLE));
    RtlFreeHeap( CsrssApiHeap, 0, ProcessData->HandleTable );
    ProcessData->HandleTable = (Object_t **)NewBlock;
-   ProcessData->HandleTable[i] = Object;   
+   ProcessData->HandleTable[i] = Object;
    *Handle = (HANDLE)(((i + 1) << 2) | 0x3);
    InterlockedIncrement( &Object->ReferenceCount );
    ProcessData->HandleTableSize = ProcessData->HandleTableSize + 64;
index 24dacee..0115985 100644 (file)
@@ -42,7 +42,7 @@ PCSRSS_PROCESS_DATA STDCALL CsrGetProcessData(HANDLE ProcessId)
    PCSRSS_PROCESS_DATA pProcessData;
 
    hash = (ULONG_PTR)ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData));
-   
+
    LOCK;
 
    pProcessData = ProcessData[hash];
@@ -64,7 +64,7 @@ PCSRSS_PROCESS_DATA STDCALL CsrCreateProcessData(HANDLE ProcessId)
    NTSTATUS Status;
 
    hash = (ULONG_PTR)ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData));
-   
+
    LOCK;
 
    pProcessData = ProcessData[hash];
@@ -123,9 +123,9 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
   ULONG hash;
   int c;
   PCSRSS_PROCESS_DATA pProcessData, pPrevProcessData = NULL;
-   
+
   hash = (ULONG_PTR)Pid % (sizeof(ProcessData) / sizeof(*ProcessData));
-   
+
   LOCK;
 
   pProcessData = ProcessData[hash];
@@ -304,7 +304,7 @@ CSR_API(CsrGetShutdownParameters)
   {
      return(Reply->Status = STATUS_INVALID_PARAMETER);
   }
-  
+
   Reply->Data.GetShutdownParametersReply.Level = ProcessData->ShutdownLevel;
   Reply->Data.GetShutdownParametersReply.Flags = ProcessData->ShutdownFlags;
 
@@ -322,7 +322,7 @@ CSR_API(CsrSetShutdownParameters)
   {
      return(Reply->Status = STATUS_INVALID_PARAMETER);
   }
-  
+
   ProcessData->ShutdownLevel = Request->Data.SetShutdownParametersRequest.Level;
   ProcessData->ShutdownFlags = Request->Data.SetShutdownParametersRequest.Flags;
 
index 406f5ea..efb189c 100644 (file)
@@ -1,5 +1,5 @@
 /* $Id$
- * 
+ *
  * reactos/subsys/csrss/api/wapi.c
  *
  * CSRSS port message processing
@@ -113,11 +113,11 @@ ClientConnectionThread(HANDLE ServerPort)
   PCSRSS_API_REQUEST Request;
   PCSRSS_PROCESS_DATA ProcessData;
   PCSRSS_API_REPLY Reply;
-   
+
        DPRINT("CSR: %s called", __FUNCTION__);
 
   Reply = NULL;
-   
+
   for (;;)
     {
       Status = NtReplyWaitReceivePort(ServerPort,
@@ -129,7 +129,7 @@ ClientConnectionThread(HANDLE ServerPort)
           DPRINT1("CSR: NtReplyWaitReceivePort failed\n");
           break;
         }
-       
+
       if (LpcRequest.Header.MessageType == LPC_PORT_CLOSED)
         {
           CsrFreeProcessData( LpcRequest.Header.ClientId.UniqueProcess );
@@ -138,14 +138,14 @@ ClientConnectionThread(HANDLE ServerPort)
 
       Request = (PCSRSS_API_REQUEST)&LpcRequest;
       Reply = (PCSRSS_API_REPLY)&LpcReply;
-       
+
       ProcessData = CsrGetProcessData(LpcRequest.Header.ClientId.UniqueProcess);
       if (ProcessData == NULL)
         {
           DPRINT1("CSR: Message %d: Unable to find data for process 0x%x\n",
                  LpcRequest.Header.MessageType, LpcRequest.Header.ClientId.UniqueProcess);
          break;
-        }                
+        }
 
 
       CsrApiCallHandler(ProcessData, Request, Reply);
@@ -171,9 +171,9 @@ ServerApiPortThread (PVOID PortHandle)
    HANDLE ServerPort = (HANDLE) 0;
    HANDLE ServerThread = (HANDLE) 0;
    PCSRSS_PROCESS_DATA ProcessData = NULL;
-   
+
    CsrInitProcessData();
-   
+
        DPRINT("CSR: %s called", __FUNCTION__);
 
    for (;;)
@@ -207,18 +207,18 @@ ServerApiPortThread (PVOID PortHandle)
             Status = STATUS_UNSUCCESSFUL;
             break;
          }
-           
+
 
        ProcessData->CsrSectionViewBase = LpcRead.ViewBase;
        ProcessData->CsrSectionViewSize = LpcRead.ViewSize;
-       
+
        Status = NtCompleteConnectPort(ServerPort);
        if (!NT_SUCCESS(Status))
          {
             DPRINT1("CSR: NtCompleteConnectPort() failed\n");
             break;
          }
-       
+
        Status = RtlCreateUserThread(NtCurrentProcess(),
                                     NULL,
                                     FALSE,
@@ -292,7 +292,7 @@ DPRINT("-- 2\n");
                        } else {
 DPRINT("-- 3\n");
                                PLPC_MESSAGE Reply = NULL;
-                               /* 
+                               /*
                                 * Tell the init thread the SM gave the
                                 * green light for boostrapping.
                                 */
index 9a2abea..307ba19 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
  *
  * csrss.c - Client/Server Runtime subsystem
- * 
+ *
  * ReactOS Operating System
- * 
+ *
  * --------------------------------------------------------------------
  *
  * This software is free software; you can redistribute it and/or
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.LIB. If not, write
  * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- * MA 02139, USA.  
+ * MA 02139, USA.
  *
  * --------------------------------------------------------------------
- * 
+ *
  *     19990417 (Emanuele Aliberti)
  *             Do nothing native application skeleton
  *     19990528 (Emanuele Aliberti)
@@ -64,7 +64,7 @@ CsrpParseCommandLine (HANDLE                       ProcessHeap,
    INT i = 0;
    INT afterlastspace = 0;
 
-   
+
    DPRINT("CSR: %s called\n", __FUNCTION__);
 
    RtlZeroMemory (Argument, sizeof (COMMAND_LINE_ARGUMENT));
@@ -123,20 +123,20 @@ CsrpParseCommandLine (HANDLE                       ProcessHeap,
        Argument->Vector [Argument->Count - 1] = & (Argument->Buffer.Buffer [afterlastspace]);
      }
 
-  return STATUS_SUCCESS; 
+  return STATUS_SUCCESS;
 }
 
 /**********************************************************************
  * NAME                                                        PRIVATE
  *     CsrpFreeCommandLine/2
  */
-                     
+
 static VOID STDCALL
 CsrpFreeCommandLine (HANDLE                 ProcessHeap,
                     PCOMMAND_LINE_ARGUMENT Argument)
 {
        DPRINT("CSR: %s called\n", __FUNCTION__);
-       
+
        RtlFreeHeap (ProcessHeap,
                     0,
                     Argument->Vector);
@@ -177,7 +177,7 @@ VOID STDCALL NtProcessStartup(PPEB Peb)
     *================================================================*/
    if (CsrServerInitialization (CmdLineArg.Count, CmdLineArg.Vector) == TRUE)
      {
-       CsrpFreeCommandLine (Peb->ProcessHeap, & CmdLineArg);   
+       CsrpFreeCommandLine (Peb->ProcessHeap, & CmdLineArg);
        /*
         * Terminate the current thread only.
         */
@@ -187,7 +187,7 @@ VOID STDCALL NtProcessStartup(PPEB Peb)
      {
        DisplayString (L"CSR: CsrServerInitialization failed.\n");
 
-       CsrpFreeCommandLine (Peb->ProcessHeap, & CmdLineArg);   
+       CsrpFreeCommandLine (Peb->ProcessHeap, & CmdLineArg);
        /*
         * Tell the SM we failed.
         */
index 06b358f..520bbc3 100644 (file)
@@ -47,7 +47,7 @@ typedef struct _CSRSS_PROCESS_DATA
   LIST_ENTRY ProcessEntry;
   PCONTROLDISPATCHER CtrlDispatcher;
 } CSRSS_PROCESS_DATA, *PCSRSS_PROCESS_DATA;
-  
+
 typedef VOID (STDCALL *CSR_CLEANUP_OBJECT_PROC)(Object_t *Object);
 
 typedef struct tagCSRSS_OBJECT_DEFINITION
index 43b8ae7..fa85151 100644 (file)
@@ -1,5 +1,5 @@
 /* $Id$
- * 
+ *
  * reactos/subsys/csrss/init.c
  *
  * Initialize the CSRSS subsystem server process.
@@ -397,7 +397,7 @@ CsrpRegisterSubsystem (ULONG argc, PWSTR* argv)
                                        FALSE,
                                        NULL);
        NtClose (hBootstrapOk);
-       return Status;  
+       return Status;
 }
 
 /**********************************************************************
@@ -533,7 +533,7 @@ CsrServerInitialization (
                Status = InitRoutine[i].EntryPoint(ArgumentCount,ArgumentArray);
                if(!NT_SUCCESS(Status))
                {
-                       DPRINT1("CSR: %s: failed to %s (Status=%08lx)\n", 
+                       DPRINT1("CSR: %s: failed to %s (Status=%08lx)\n",
                                __FUNCTION__,
                                InitRoutine[i].ErrorMessage,
                                Status);
index e7637c1..2cef0e4 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
  *
  * smss.c - Session Manager
- * 
+ *
  * ReactOS Operating System
- * 
+ *
  * --------------------------------------------------------------------
  *
  * This software is free software; you can redistribute it and/or
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.LIB. If not, write
  * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- * MA 02139, USA.  
+ * MA 02139, USA.
  *
  * --------------------------------------------------------------------
- * 
+ *
  *     19990529 (Emanuele Aliberti)
  *             Compiled successfully with egcs 1.1.2
  */
@@ -34,7 +34,7 @@
 VOID STDCALL DisplayString(LPCWSTR lpwString)
 {
    UNICODE_STRING us;
-   
+
    RtlInitUnicodeString (&us, lpwString);
    ZwDisplayString (&us);
 }
@@ -45,11 +45,11 @@ VOID STDCALL PrintString (char* fmt, ...)
    va_list ap;
    UNICODE_STRING UnicodeString;
    ANSI_STRING AnsiString;
-   
+
    va_start(ap, fmt);
    vsprintf(buffer, fmt, ap);
    va_end(ap);
-   
+
    RtlInitAnsiString (&AnsiString, buffer);
    RtlAnsiStringToUnicodeString (&UnicodeString,
                                 &AnsiString,
index a40cf69..0649900 100644 (file)
@@ -31,7 +31,7 @@ InitializeVideoAddressSpace(VOID)
                              0,
                              NULL,
                              NULL);
-   Status = ZwOpenSection(&PhysMemHandle, SECTION_ALL_ACCESS, 
+   Status = ZwOpenSection(&PhysMemHandle, SECTION_ALL_ACCESS,
                          &ObjectAttributes);
    if (!NT_SUCCESS(Status))
      {
@@ -102,13 +102,13 @@ InitializeVideoAddressSpace(VOID)
        DbgPrint("NtVdmControl failed (status %x)\n", Status);
        return(0);
      }
-   
+
    /*
     * Copy the real mode IVT into the right place
     */
    NullAddress = (PVOID)0x0; /* Workaround for GCC 3.4 */
    memcpy(NullAddress, IVT, 1024);
-   
+
    /*
     * Get the BDA from the kernel
     */
@@ -118,7 +118,7 @@ InitializeVideoAddressSpace(VOID)
        DbgPrint("NtVdmControl failed (status %x)\n", Status);
        return(0);
      }
-   
+
    /*
     * Copy the BDA into the right place
     */
index da5c7a3..5468951 100644 (file)
@@ -75,7 +75,7 @@ VOID FASTCALL
 ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData)
 {
   HANDLE Thread;
-       
+
   DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n",      ProcessData->ProcessId);
 
   if (ProcessData->CtrlDispatcher)
@@ -105,7 +105,7 @@ ClearLineBuffer(PCSRSS_SCREEN_BUFFER Buff)
 {
   DWORD Offset = 2 * (Buff->CurrentY * Buff->MaxX);
   UINT Pos;
-       
+
   for (Pos = 0; Pos < Buff->MaxX; Pos++)
     {
       /* Fill the cell: Offset is incremented by the macro */
@@ -154,9 +154,9 @@ CsrInitConsole(PCSRSS_CONSOLE Console)
 
   Console->Title.MaximumLength = Console->Title.Length = 0;
   Console->Title.Buffer = NULL;
-  
+
   RtlCreateUnicodeString(&Console->Title, L"Command Prompt");
-  
+
   Console->Header.ReferenceCount = 0;
   Console->WaitingChars = 0;
   Console->WaitingLines = 0;
@@ -302,7 +302,7 @@ CSR_API(CsrAllocConsole)
       return Status;
     }
   ProcessData->CtrlDispatcher = Request->Data.AllocConsoleRequest.CtrlDispatcher;
-  DPRINT("CSRSS:CtrlDispatcher address: %x\n", ProcessData->CtrlDispatcher);      
+  DPRINT("CSRSS:CtrlDispatcher address: %x\n", ProcessData->CtrlDispatcher);
   InsertHeadList(&ProcessData->Console->ProcessList, &ProcessData->ProcessEntry);
 
   return STATUS_SUCCESS;
@@ -329,7 +329,7 @@ CSR_API(CsrFreeConsole)
     {
       ConioDeleteConsole((Object_t *) Console);
     }
-   
+
   return STATUS_SUCCESS;
 }
 
@@ -513,9 +513,9 @@ CSR_API(CsrReadConsole)
   ULONG nNumberOfCharsToRead, CharSize;
   PCSRSS_CONSOLE Console;
   NTSTATUS Status;
-   
+
   DPRINT("CsrReadConsole\n");
-  
+
   CharSize = (Request->Data.ReadConsoleRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR));
 
   /* truncate length to CSRSS_MAX_READ_CONSOLE_REQUEST */
@@ -785,7 +785,7 @@ ConioCopyRegion(PCSRSS_SCREEN_BUFFER ScreenBuffer,
   DstY = (DstRegion->top + ScreenBuffer->ShowY) % ScreenBuffer->MaxY;
   SrcOffset = (SrcY * ScreenBuffer->MaxX + SrcRegion->left + ScreenBuffer->ShowX) * 2;
   DstOffset = (DstY * ScreenBuffer->MaxX + DstRegion->left + ScreenBuffer->ShowX) * 2;
-  
+
   for (i = SrcRegion->top; i <= SrcRegion->bottom; i++)
     {
       RtlCopyMemory(
@@ -827,7 +827,7 @@ ConioFillRegion(PCSRSS_CONSOLE Console,
   DWORD Delta;
   ULONG i;
   CHAR Char;
-  
+
   if(bUnicode)
     ConsoleUnicodeCharToAnsiChar(Console, &Char, &CharInfo->Char.UnicodeChar);
   else
@@ -875,7 +875,7 @@ CSR_API(CsrWriteConsole)
   ULONG CharSize = (Request->Data.WriteConsoleRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR));
 
   DPRINT("CsrWriteConsole\n");
-   
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
@@ -997,7 +997,7 @@ ConioProcessChar(PCSRSS_CONSOLE Console,
   /* process Ctrl-C and Ctrl-Break */
   if (Console->Mode & ENABLE_PROCESSED_INPUT &&
       KeyEventRecord->InputEvent.Event.KeyEvent.bKeyDown &&
-      ((KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) || 
+      ((KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) ||
        (KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode == 'C')) &&
       (KeyEventRecord->InputEvent.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)))
     {
@@ -1043,10 +1043,10 @@ ConioProcessChar(PCSRSS_CONSOLE Console,
          else if (Console->ActiveBuffer->ShowY != Console->ActiveBuffer->CurrentY)
            /* only scroll down if there is room to scroll down into */
             {
-             if (Console->ActiveBuffer->ShowY % Console->ActiveBuffer->MaxY != 
+             if (Console->ActiveBuffer->ShowY % Console->ActiveBuffer->MaxY !=
                  Console->ActiveBuffer->CurrentY)
                 {
-                  if (((Console->ActiveBuffer->CurrentY + 1) % Console->ActiveBuffer->MaxY) != 
+                  if (((Console->ActiveBuffer->CurrentY + 1) % Console->ActiveBuffer->MaxY) !=
                       (Console->ActiveBuffer->ShowY + Console->ActiveBuffer->MaxY) %
                       Console->ActiveBuffer->MaxY)
                     {
@@ -1222,7 +1222,7 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
 
   RepeatCount = 1;
   VirtualScanCode = (msg->lParam >> 16) & 0xff;
-  Down = msg->message == WM_KEYDOWN || msg->message == WM_CHAR || 
+  Down = msg->message == WM_KEYDOWN || msg->message == WM_CHAR ||
     msg->message == WM_SYSKEYDOWN || msg->message == WM_SYSCHAR;
 
   GetKeyboardState(KeyState);
@@ -1232,9 +1232,9 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
     {
       VirtualKeyCode = LastVirtualKey;
       UnicodeChar = msg->wParam;
-    } 
+    }
   else
-    { 
+    {
       WCHAR Chars[2];
       INT RetChars = 0;
 
@@ -1253,7 +1253,7 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
     {
       AsciiChar = 0;
     }
-  
+
   er.EventType = KEY_EVENT;
   er.Event.KeyEvent.bKeyDown = Down;
   er.Event.KeyEvent.wRepeatCount = RepeatCount;
@@ -1263,7 +1263,7 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
   er.Event.KeyEvent.wVirtualScanCode = VirtualScanCode;
 
   if (TextMode)
-    {    
+    {
       if (0 != (ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED))
           && VK_TAB == VirtualKeyCode)
         {
@@ -1283,7 +1283,7 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
         }
     }
 
-  if (NULL == Console) 
+  if (NULL == Console)
     {
       return;
     }
@@ -1294,9 +1294,9 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
     {
       return;
     }
-    
+
   ConInRec->InputEvent = er;
-  ConInRec->Fake = UnicodeChar && 
+  ConInRec->Fake = UnicodeChar &&
     (msg->message != WM_CHAR && msg->message != WM_SYSCHAR &&
      msg->message != WM_KEYUP && msg->message != WM_SYSKEYUP);
   ConInRec->NotChar = (msg->message != WM_CHAR && msg->message != WM_SYSCHAR);
@@ -1314,7 +1314,7 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
           VirtualKeyCode,
           (AsciiChar >= ' ') ? AsciiChar : '.',
           ShiftState);
-    
+
   if (! ConInRec->Fake || ! ConInRec->NotChar)
     {
       /* FIXME - convert to ascii */
@@ -1339,7 +1339,7 @@ Console_Api (PVOID unused)
   PrivateCsrssRegisterPrimitive();
   /* This call turns on the input system in win32k */
   PrivateCsrssAcquireOrReleaseInputOwnership(FALSE);
-  
+
   while (TRUE)
     {
       GetMessageW(&msg, 0, 0, 0);
@@ -1362,7 +1362,7 @@ CSR_API(CsrGetScreenBufferInfo)
   NTSTATUS Status;
   PCSRSS_SCREEN_BUFFER Buff;
   PCONSOLE_SCREEN_BUFFER_INFO pInfo;
-   
+
   DPRINT("CsrGetScreenBufferInfo\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
@@ -1399,7 +1399,7 @@ CSR_API(CsrSetCursor)
   PCSRSS_SCREEN_BUFFER Buff;
   LONG OldCursorX, OldCursorY;
   LONG NewCursorX, NewCursorY;
-   
+
   DPRINT("CsrSetCursor\n");
 
   Status = ConioConsoleFromProcessData(ProcessData, &Console);
@@ -1491,7 +1491,7 @@ CSR_API(CsrWriteConsoleOutputChar)
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
-  
+
   CharSize = (Request->Data.WriteConsoleOutputCharRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR));
 
   if (Request->Header.DataSize
@@ -1576,7 +1576,7 @@ CSR_API(CsrFillOutputChar)
   RECT UpdateRect;
 
   DPRINT("CsrFillOutputChar\n");
-   
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
@@ -1643,13 +1643,13 @@ CSR_API(CsrReadInputEvent)
   NTSTATUS Status;
   BOOLEAN Done = FALSE;
   ConsoleInput *Input;
-   
+
   DPRINT("CsrReadInputEvent\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Reply->Data.ReadInputReply.Event = ProcessData->ConsoleEvent;
-   
+
   Status = ConioLockConsole(ProcessData, Request->Data.ReadInputRequest.ConsoleHandle, &Console);
   if (! NT_SUCCESS(Status))
     {
@@ -1668,7 +1668,7 @@ CSR_API(CsrReadInputEvent)
          Reply->Data.ReadInputReply.MoreEvents = TRUE;
          break;
        }
-      
+
       RemoveEntryList(&Input->ListEntry);
 
       if (!Done && !Input->Fake)
@@ -1693,7 +1693,7 @@ CSR_API(CsrReadInputEvent)
         }
       HeapFree(Win32CsrApiHeap, 0, Input);
     }
-   
+
   if (Done)
     {
       Status = STATUS_SUCCESS;
@@ -1725,7 +1725,7 @@ CSR_API(CsrWriteConsoleOutputAttrib)
   RECT UpdateRect;
 
   DPRINT("CsrWriteConsoleOutputAttrib\n");
-   
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
 
@@ -1812,7 +1812,7 @@ CSR_API(CsrFillOutputAttrib)
     {
       return Reply->Status = Status;
     }
-   
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.FillOutputAttribRequest.ConsoleHandle, &Buff);
@@ -1866,7 +1866,7 @@ CSR_API(CsrGetCursorInfo)
 {
   PCSRSS_SCREEN_BUFFER Buff;
   NTSTATUS Status;
-   
+
   DPRINT("CsrGetCursorInfo\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
@@ -1890,7 +1890,7 @@ CSR_API(CsrSetCursorInfo)
   DWORD Size;
   BOOL Visible;
   NTSTATUS Status;
-   
+
   DPRINT("CsrSetCursorInfo\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
@@ -1951,7 +1951,7 @@ CSR_API(CsrSetTextAttrib)
   NTSTATUS Status;
   PCSRSS_CONSOLE Console;
   PCSRSS_SCREEN_BUFFER Buff;
-  LONG OldCursorX, OldCursorY;   
+  LONG OldCursorX, OldCursorY;
 
   DPRINT("CsrSetTextAttrib\n");
 
@@ -2069,7 +2069,7 @@ CSR_API(CsrCreateScreenBuffer)
   PCSRSS_CONSOLE Console;
   PCSRSS_SCREEN_BUFFER Buff;
   NTSTATUS Status;
-   
+
   DPRINT("CsrCreateScreenBuffer\n");
 
   if (ProcessData == NULL)
@@ -2186,7 +2186,7 @@ CSR_API(CsrSetTitle)
   Status = ConioLockConsole(ProcessData, Request->Data.SetTitleRequest.Console, &Console);
   if(! NT_SUCCESS(Status))
     {
-      Reply->Status = Status;  
+      Reply->Status = Status;
     }
   else
     {
@@ -2211,7 +2211,7 @@ CSR_API(CsrGetTitle)
 {
   NTSTATUS Status;
   PCSRSS_CONSOLE Console;
-  
+
   DPRINT("CsrGetTitle\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
@@ -2224,7 +2224,7 @@ CSR_API(CsrGetTitle)
       DPRINT1("Can't get console\n");
       return Reply->Status = Status;
     }
-               
+
   /* Copy title of the console to the user title buffer */
   RtlZeroMemory(&Reply->Data.GetTitleReply, sizeof(CSRSS_GET_TITLE_REPLY));
   Reply->Data.GetTitleReply.ConsoleHandle = Request->Data.GetTitleRequest.ConsoleHandle;
@@ -2281,7 +2281,7 @@ CSR_API(CsrWriteConsoleOutput)
   BufferCoord = Request->Data.WriteConsoleOutputRequest.BufferCoord;
   CharInfo = Request->Data.WriteConsoleOutputRequest.CharInfo;
   if (((PVOID)CharInfo < ProcessData->CsrSectionViewBase) ||
-      (((PVOID)CharInfo + PSize) > 
+      (((PVOID)CharInfo + PSize) >
        (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
       ConioUnlockScreenBuffer(Buff);
@@ -2510,9 +2510,9 @@ CSR_API(CsrReadConsoleOutputChar)
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = Reply->Header.MessageSize - LPC_MESSAGE_BASE_SIZE;
   ReadBuffer = Reply->Data.ReadConsoleOutputCharReply.String;
-  
+
   CharSize = (Request->Data.ReadConsoleOutputCharRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR));
-  
+
   Status = ConioConsoleFromProcessData(ProcessData, &Console);
   if (! NT_SUCCESS(Status))
     {
@@ -2531,7 +2531,7 @@ CSR_API(CsrReadConsoleOutputChar)
   for (i = 0; i < Request->Data.ReadConsoleOutputCharRequest.NumCharsToRead; ++i)
     {
       Char = Buff->Buffer[(Xpos * 2) + (Ypos * 2 * Buff->MaxX)];
-      
+
       if(Request->Data.ReadConsoleOutputCharRequest.Unicode)
       {
         ConsoleAnsiCharToUnicodeChar(Console, (WCHAR*)ReadBuffer, &Char);
@@ -2566,7 +2566,7 @@ CSR_API(CsrReadConsoleOutputChar)
     {
       ConioUnlockConsole(Console);
     }
-  
+
   Reply->Data.ReadConsoleOutputCharReply.CharsRead = (DWORD)((ULONG_PTR)ReadBuffer - (ULONG_PTR)Reply->Data.ReadConsoleOutputCharReply.String) / CharSize;
 
   return Reply->Status;
@@ -2636,7 +2636,7 @@ CSR_API(CsrGetNumberOfConsoleInputEvents)
   PLIST_ENTRY CurrentItem;
   DWORD NumEvents;
   ConsoleInput *Input;
-  
+
   DPRINT("CsrGetNumberOfConsoleInputEvents\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
@@ -2647,10 +2647,10 @@ CSR_API(CsrGetNumberOfConsoleInputEvents)
     {
       return Reply->Status = Status;
     }
-  
+
   CurrentItem = Console->InputEvents.Flink;
   NumEvents = 0;
-  
+
   /* If there are any events ... */
   while (CurrentItem != &Console->InputEvents)
     {
@@ -2663,10 +2663,10 @@ CSR_API(CsrGetNumberOfConsoleInputEvents)
     }
 
   ConioUnlockConsole(Console);
-  
+
   Reply->Status = STATUS_SUCCESS;
   Reply->Data.GetNumInputEventsReply.NumInputEvents = NumEvents;
-   
+
   return Reply->Status;
 }
 
@@ -2681,22 +2681,22 @@ CSR_API(CsrPeekConsoleInput)
   PINPUT_RECORD InputRecord;
   ConsoleInput* Item;
   UINT NumItems;
-   
+
   DPRINT("CsrPeekConsoleInput\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
-   
+
   Status = ConioLockConsole(ProcessData, Request->Data.GetNumInputEventsRequest.ConsoleHandle, &Console);
   if(! NT_SUCCESS(Status))
     {
       return Reply->Status = Status;
     }
-   
+
   InputRecord = Request->Data.PeekConsoleInputRequest.InputRecord;
   Length = Request->Data.PeekConsoleInputRequest.Length;
   Size = Length * sizeof(INPUT_RECORD);
-   
+
   if (((PVOID)InputRecord < ProcessData->CsrSectionViewBase)
       || (((PVOID)InputRecord + Size) > (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
@@ -2704,13 +2704,13 @@ CSR_API(CsrPeekConsoleInput)
       Reply->Status = STATUS_ACCESS_VIOLATION;
       return Reply->Status ;
     }
-   
+
   NumItems = 0;
-   
+
   if (! IsListEmpty(&Console->InputEvents))
     {
       CurrentItem = Console->InputEvents.Flink;
-   
+
       while (CurrentItem != &Console->InputEvents && NumItems < Length)
         {
           Item = CONTAINING_RECORD(CurrentItem, ConsoleInput, ListEntry);
@@ -2720,7 +2720,7 @@ CSR_API(CsrPeekConsoleInput)
               CurrentItem = CurrentItem->Flink;
               continue;
             }
-          
+
           ++NumItems;
           *InputRecord = Item->InputEvent;
 
@@ -2728,7 +2728,7 @@ CSR_API(CsrPeekConsoleInput)
             {
               ConioInputEventToAnsi(Console, InputRecord);
             }
-         
+
           InputRecord++;
           CurrentItem = CurrentItem->Flink;
         }
@@ -2758,18 +2758,18 @@ CSR_API(CsrReadConsoleOutput)
   RECT ScreenRect;
   DWORD i, Y, X, Offset;
   UINT CodePage;
-      
+
   DPRINT("CsrReadConsoleOutput\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
-  
+
   Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputRequest.ConsoleHandle, &Buff);
   if (! NT_SUCCESS(Status))
     {
       return Reply->Status = Status;
     }
-   
+
   CharInfo = Request->Data.ReadConsoleOutputRequest.CharInfo;
   ReadRegion.left = Request->Data.ReadConsoleOutputRequest.ReadRegion.Left;
   ReadRegion.top = Request->Data.ReadConsoleOutputRequest.ReadRegion.Top;
@@ -2782,7 +2782,7 @@ CSR_API(CsrReadConsoleOutput)
 
   /* FIXME: Is this correct? */
   CodePage = ProcessData->Console->OutputCodePage;
-   
+
   if (((PVOID)CharInfo < ProcessData->CsrSectionViewBase)
       || (((PVOID)CharInfo + Size) > (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
@@ -2790,7 +2790,7 @@ CSR_API(CsrReadConsoleOutput)
       Reply->Status = STATUS_ACCESS_VIOLATION;
       return Reply->Status ;
     }
-   
+
   SizeY = RtlRosMin(BufferSize.Y - BufferCoord.Y, ConioRectHeight(&ReadRegion));
   SizeX = RtlRosMin(BufferSize.X - BufferCoord.X, ConioRectWidth(&ReadRegion));
   ReadRegion.bottom = ReadRegion.top + SizeY;
@@ -2807,7 +2807,7 @@ CSR_API(CsrReadConsoleOutput)
   for (i = 0, Y = ReadRegion.top; Y < ReadRegion.bottom; ++i, ++Y)
     {
       CurCharInfo = CharInfo + (i * BufferSize.X);
-     
+
       Offset = (((Y + Buff->ShowY) % Buff->MaxY) * Buff->MaxX + ReadRegion.left) * 2;
       for (X = ReadRegion.left; X < ReadRegion.right; ++X)
         {
@@ -2827,13 +2827,13 @@ CSR_API(CsrReadConsoleOutput)
     }
 
   ConioUnlockScreenBuffer(Buff);
-  
+
   Reply->Status = STATUS_SUCCESS;
   Reply->Data.ReadConsoleOutputReply.ReadRegion.Right = ReadRegion.left + SizeX - 1;
   Reply->Data.ReadConsoleOutputReply.ReadRegion.Bottom = ReadRegion.top + SizeY - 1;
   Reply->Data.ReadConsoleOutputReply.ReadRegion.Left = ReadRegion.left;
   Reply->Data.ReadConsoleOutputReply.ReadRegion.Top = ReadRegion.top;
-   
+
   return Reply->Status;
 }
 
@@ -2847,22 +2847,22 @@ CSR_API(CsrWriteConsoleInput)
   DWORD Size;
   DWORD i;
   ConsoleInput* Record;
-   
+
   DPRINT("CsrWriteConsoleInput\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
-   
+
   Status = ConioLockConsole(ProcessData, Request->Data.WriteConsoleInputRequest.ConsoleHandle, &Console);
   if (! NT_SUCCESS(Status))
     {
       return Reply->Status = Status;
     }
-   
+
   InputRecord = Request->Data.WriteConsoleInputRequest.InputRecord;
   Length = Request->Data.WriteConsoleInputRequest.Length;
   Size = Length * sizeof(INPUT_RECORD);
-   
+
   if (((PVOID)InputRecord < ProcessData->CsrSectionViewBase)
       || (((PVOID)InputRecord + Size) > (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
@@ -2870,7 +2870,7 @@ CSR_API(CsrWriteConsoleInput)
       Reply->Status = STATUS_ACCESS_VIOLATION;
       return Reply->Status ;
     }
-   
+
   for (i = 0; i < Length; i++)
     {
       Record = HeapAlloc(Win32CsrApiHeap, 0, sizeof(ConsoleInput));
@@ -2892,7 +2892,7 @@ CSR_API(CsrWriteConsoleInput)
     }
 
   ConioUnlockConsole(Console);
-   
+
   Reply->Status = STATUS_SUCCESS;
   Reply->Data.WriteConsoleInputReply.Length = i;
 
@@ -2928,7 +2928,7 @@ SetConsoleHardwareState (PCSRSS_CONSOLE Console, DWORD ConsoleHwState)
           Console->HardwareState = ConsoleHwState;
         }
 
-      return STATUS_SUCCESS;   
+      return STATUS_SUCCESS;
     }
 
   return STATUS_INVALID_PARAMETER_3; /* Client: (handle, set_get, [mode]) */
@@ -2938,12 +2938,12 @@ CSR_API(CsrHardwareStateProperty)
 {
   PCSRSS_CONSOLE Console;
   NTSTATUS Status;
+
   DPRINT("CsrHardwareStateProperty\n");
 
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
-   
+
   Status = ConioLockConsole(ProcessData,
                             Request->Data.ConsoleHardwareStateRequest.ConsoleHandle,
                             &Console);
@@ -2958,7 +2958,7 @@ CSR_API(CsrHardwareStateProperty)
       case CONSOLE_HARDWARE_STATE_GET:
         Reply->Data.ConsoleHardwareStateReply.State = Console->HardwareState;
         break;
-      
+
       case CONSOLE_HARDWARE_STATE_SET:
         DPRINT("Setting console hardware state.\n");
         Reply->Status = SetConsoleHardwareState(Console, Request->Data.ConsoleHardwareStateRequest.State);
@@ -2980,10 +2980,10 @@ CSR_API(CsrGetConsoleWindow)
   NTSTATUS Status;
 
   DPRINT("CsrGetConsoleWindow\n");
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
-   
+
   Status = ConioConsoleFromProcessData(ProcessData, &Console);
   if (! NT_SUCCESS(Status))
     {
@@ -3002,10 +3002,10 @@ CSR_API(CsrSetConsoleIcon)
   NTSTATUS Status;
 
   DPRINT("CsrSetConsoleIcon\n");
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
-   
+
   Status = ConioConsoleFromProcessData(ProcessData, &Console);
   if (! NT_SUCCESS(Status))
     {
@@ -3031,7 +3031,7 @@ CSR_API(CsrGetConsoleCodePage)
     {
       return Reply->Status = Status;
     }
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Reply->Data.GetConsoleCodePage.CodePage = Console->CodePage;
@@ -3051,7 +3051,7 @@ CSR_API(CsrSetConsoleCodePage)
     {
       return Reply->Status = Status;
     }
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
@@ -3076,7 +3076,7 @@ CSR_API(CsrGetConsoleOutputCodePage)
     {
       return Reply->Status = Status;
     }
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   Reply->Data.GetConsoleOutputCodePage.CodePage = Console->OutputCodePage;
@@ -3096,7 +3096,7 @@ CSR_API(CsrSetConsoleOutputCodePage)
     {
       return Reply->Status = Status;
     }
+
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = sizeof(CSRSS_API_REPLY) - LPC_MESSAGE_BASE_SIZE;
   if (IsValidCodePage(Request->Data.SetConsoleOutputCodePage.CodePage))
@@ -3119,15 +3119,15 @@ CSR_API(CsrGetProcessList)
   NTSTATUS Status;
 
   DPRINT("CsrGetProcessList\n");
-  
+
   Buffer = Reply->Data.GetProcessListReply.ProcessId;
   Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY);
   Reply->Header.DataSize = Reply->Header.MessageSize - LPC_MESSAGE_BASE_SIZE;
-  
+
   nItems = nCopied = 0;
   Reply->Data.GetProcessListReply.nProcessIdsCopied = 0;
   Reply->Data.GetProcessListReply.nProcessIdsTotal = 0;
-  
+
   Status = ConioConsoleFromProcessData(ProcessData, &Console);
   if (! NT_SUCCESS(Status))
   {
@@ -3149,10 +3149,10 @@ CSR_API(CsrGetProcessList)
   }
 
   ConioUnlockConsole(Console);
-  
+
   Reply->Data.GetProcessListReply.nProcessIdsCopied = nCopied;
   Reply->Data.GetProcessListReply.nProcessIdsTotal = nItems;
-  
+
   return Reply->Status = STATUS_SUCCESS;
 }
 
index 44da402..6d38c01 100644 (file)
@@ -3,7 +3,7 @@
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
  * FILE:            subsys/csrss/win32csr/dllmain.c
- * PURPOSE:         Initialization 
+ * PURPOSE:         Initialization
  */
 
 /* INCLUDES ******************************************************************/
index 5845fc2..325aa8d 100644 (file)
@@ -126,20 +126,20 @@ GuiConsoleHandleNcCreate(HWND hWnd, CREATESTRUCTW *Create)
   SelectObject(Dc, OldFont);
 
   GuiData->MemoryDC = CreateCompatibleDC(Dc);
-  GuiData->MemoryBitmap = CreateCompatibleBitmap(Dc, 
-                                                 Console->Size.X * GuiData->CharWidth, 
+  GuiData->MemoryBitmap = CreateCompatibleBitmap(Dc,
+                                                 Console->Size.X * GuiData->CharWidth,
                                                 Console->Size.Y * GuiData->CharHeight);
   /* NOTE: Don't delete the "first bitmap", it's done in DeleteDC. */
   SelectObject(GuiData->MemoryDC, GuiData->MemoryBitmap);
   /* NOTE: Don't delete stock font. */
-  SelectObject(GuiData->MemoryDC, GuiData->Font); 
+  SelectObject(GuiData->MemoryDC, GuiData->Font);
 
   ReleaseDC(hWnd, Dc);
   GuiData->CursorBlinkOn = TRUE;
   GuiData->ForceCursorOff = FALSE;
 
   GuiData->Selection.left = -1;
-  
+
   Console->PrivateData = GuiData;
   SetWindowLongPtrW(hWnd, GWL_USERDATA, (DWORD_PTR) Console);
 
@@ -192,7 +192,7 @@ static VOID FASTCALL
 GuiConsoleUpdateSelection(HWND hWnd, PRECT rc, PGUI_CONSOLE_DATA GuiData)
 {
   RECT oldRect = GuiData->Selection;
-  
+
   if(rc != NULL)
   {
     RECT changeRect = *rc;
@@ -203,7 +203,7 @@ GuiConsoleUpdateSelection(HWND hWnd, PRECT rc, PGUI_CONSOLE_DATA GuiData)
     changeRect.top *= GuiData->CharHeight;
     changeRect.right *= GuiData->CharWidth;
     changeRect.bottom *= GuiData->CharHeight;
-    
+
     if(rc->left != oldRect.left ||
        rc->top != oldRect.top ||
        rc->right != oldRect.right ||
@@ -212,12 +212,12 @@ GuiConsoleUpdateSelection(HWND hWnd, PRECT rc, PGUI_CONSOLE_DATA GuiData)
       if(oldRect.left != -1)
       {
         HRGN rgn1, rgn2;
-        
+
         oldRect.left *= GuiData->CharWidth;
         oldRect.top *= GuiData->CharHeight;
         oldRect.right *= GuiData->CharWidth;
         oldRect.bottom *= GuiData->CharHeight;
-        
+
         /* calculate the region that needs to be updated */
         if((rgn1 = CreateRectRgnIndirect(&oldRect)))
         {
@@ -316,7 +316,7 @@ GuiConsoleUpdateBitmap(HWND hWnd, RECT rc)
                       GuiConsoleSetTextColors(GuiData->MemoryDC, Attribute);
                       LastAttribute = Attribute;
                     }
-                }  
+                }
               MultiByteToWideChar(Console->OutputCodePage, 0, (PCHAR)From, 1, To, 1);
               To++;
               From += 2;
@@ -372,22 +372,22 @@ GuiConsoleHandlePaint(HWND hWnd)
              Ps.rcPaint.right - Ps.rcPaint.left + 1,
              Ps.rcPaint.bottom - Ps.rcPaint.top + 1, GuiData->MemoryDC,
              Ps.rcPaint.left, Ps.rcPaint.top, SRCCOPY);
-      
+
       if (GuiData->Selection.left != -1)
       {
         RECT rc = GuiData->Selection;
-        
+
         rc.left *= GuiData->CharWidth;
         rc.top *= GuiData->CharHeight;
         rc.right *= GuiData->CharWidth;
         rc.bottom *= GuiData->CharHeight;
 
         if (IntersectRect(&rc, &Ps.rcPaint, &rc))
-        {                 
+        {
           PatBlt(Dc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, DSTINVERT);
-        } 
-      }                   
-      
+        }
+      }
+
       EndPaint (hWnd, &Ps);
       LeaveCriticalSection(&GuiData->Lock);
     }
@@ -410,7 +410,7 @@ GuiConsoleHandleKey(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
   Message.message = msg;
   Message.wParam = wParam;
   Message.lParam = lParam;
-  
+
   if(msg == WM_CHAR || msg == WM_SYSKEYDOWN)
   {
     /* clear the selection */
@@ -610,7 +610,7 @@ GuiConsoleLeftMouseDown(HWND hWnd, LPARAM lParam)
   PGUI_CONSOLE_DATA GuiData;
   POINTS pt;
   RECT rc;
-  
+
   GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
   if (Console == NULL || GuiData == NULL) return;
 
@@ -620,14 +620,14 @@ GuiConsoleLeftMouseDown(HWND hWnd, LPARAM lParam)
   rc.top = pt.y / GuiData->CharHeight;
   rc.right = rc.left + 1;
   rc.bottom = rc.top + 1;
-  
+
   GuiData->SelectionStart.x = rc.left;
   GuiData->SelectionStart.y = rc.top;
-  
+
   SetCapture(hWnd);
-  
+
   GuiData->MouseDown = TRUE;
-  
+
   GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
 }
 
@@ -638,13 +638,13 @@ GuiConsoleLeftMouseUp(HWND hWnd, LPARAM lParam)
   PGUI_CONSOLE_DATA GuiData;
   RECT rc;
   POINTS pt;
-  
+
   GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
   if (Console == NULL || GuiData == NULL) return;
   if (GuiData->Selection.left == -1 || !GuiData->MouseDown) return;
-  
+
   pt = MAKEPOINTS(lParam);
-  
+
   rc.left = GuiData->SelectionStart.x;
   rc.top = GuiData->SelectionStart.y;
   rc.right = (pt.x >= 0 ? (pt.x / GuiData->CharWidth) + 1 : 0);
@@ -665,11 +665,11 @@ GuiConsoleLeftMouseUp(HWND hWnd, LPARAM lParam)
     rc.top = max(rc.bottom - 1, 0);
     rc.bottom = tmp + 1;
   }
-  
+
   GuiData->MouseDown = FALSE;
 
   GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
-  
+
   ReleaseCapture();
 }
 
@@ -680,9 +680,9 @@ GuiConsoleMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam)
   PGUI_CONSOLE_DATA GuiData;
   RECT rc;
   POINTS pt;
-  
+
   if (!(wParam & MK_LBUTTON)) return;
-  
+
   GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
   if (Console == NULL || GuiData == NULL || !GuiData->MouseDown) return;
 
@@ -710,14 +710,14 @@ GuiConsoleMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam)
   }
 
   GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
-}    
+}
 
 static VOID FASTCALL
 GuiConsoleRightMouseDown(HWND hWnd)
 {
   PCSRSS_CONSOLE Console;
   PGUI_CONSOLE_DATA GuiData;
-  
+
   GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
   if (Console == NULL || GuiData == NULL) return;
 
@@ -728,11 +728,11 @@ GuiConsoleRightMouseDown(HWND hWnd)
   else
   {
     /* FIXME - copy selection to clipboard */
-    
+
     GuiConsoleUpdateSelection(hWnd, NULL, GuiData);
   }
 
-}    
+}
 
 static LRESULT CALLBACK
 GuiConsoleWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1043,7 +1043,7 @@ GuiConsoleCopyRegion(HWND hWnd,
   ScrollRect.top = Dest->top * GuiData->CharHeight;
   ScrollRect.bottom = (Dest->bottom + 1) * GuiData->CharHeight;
   EnterCriticalSection(&GuiData->Lock);
-  BitBlt(GuiData->MemoryDC, ScrollRect.left, ScrollRect.top, 
+  BitBlt(GuiData->MemoryDC, ScrollRect.left, ScrollRect.top,
          ScrollRect.right - ScrollRect.left, ScrollRect.bottom - ScrollRect.top,
         GuiData->MemoryDC, Source->left * GuiData->CharWidth, Source->top * GuiData->CharHeight, SRCCOPY);
 
index 90473a7..9a86234 100644 (file)
@@ -29,7 +29,7 @@ TuiInit(VOID)
 {
   CONSOLE_SCREEN_BUFFER_INFO ScrInfo;
   DWORD BytesReturned;
+
   ConsoleDeviceHandle = CreateFileW(L"\\\\.\\BlueScreen", FILE_ALL_ACCESS, 0, NULL,
                                     OPEN_EXISTING, 0, NULL);
   if (INVALID_HANDLE_VALUE == ConsoleDeviceHandle)
@@ -109,9 +109,9 @@ TuiDrawRegion(PCSRSS_CONSOLE Console, RECT *Region)
   ConsoleDraw->SizeY = ConioRectHeight(Region);
   ConsoleDraw->CursorX = CursorX;
   ConsoleDraw->CursorY = CursorY;
-  
+
   TuiCopyRect((char *) (ConsoleDraw + 1), Buff, Region);
-  
+
   if (! DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_DRAW,
                         NULL, 0, ConsoleDraw, ConsoleDrawSize, &BytesReturned, NULL))
     {
@@ -213,7 +213,7 @@ TuiCleanupConsole(PCSRSS_CONSOLE Console)
       Console->Next->Prev = Console->Prev;
     }
   LeaveCriticalSection(&ActiveConsoleLock);
-   
+
   if (NULL != ActiveConsole)
     {
       ConioDrawConsole(ActiveConsole);
@@ -291,7 +291,7 @@ TuiSwapConsole(int Next)
         {
           SwapConsole = ActiveConsole;
         }
-             
+
       SwapConsole = (0 < Next ? SwapConsole->Next : SwapConsole->Prev);
       Title.MaximumLength = RtlUnicodeStringToAnsiSize(&SwapConsole->Title);
       Title.Length = 0;
index 362e629..665751c 100644 (file)
@@ -1,5 +1,5 @@
 /* $Id$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            subsys/ntvdm/ntvdm->c
@@ -139,7 +139,7 @@ BOOL ReadConfigForVDM(PVDM_CONTROL_BLOCK vdm)
     BOOL result = TRUE;
     DWORD dwError;
     HANDLE hFile;
-    
+
     hFile = CreateFileW(L"\\system32\\config.nt",
                         GENERIC_READ,
                         FILE_SHARE_READ,
@@ -187,7 +187,7 @@ BOOL
 LoadConfigDriversForVDM(PVDM_CONFIG vdmConfig)
 {
     BOOL result = TRUE;
-       
+
        return result;
 }
 
@@ -195,7 +195,7 @@ BOOL
 SetConfigOptionsForVDM(PVDM_AUTOEXEC vdmAutoexec)
 {
     BOOL result = TRUE;
-       
+
        return result;
 }
 
@@ -225,9 +225,9 @@ CreateVDM(PVDM_CONTROL_BLOCK vdm)
             //SetLastError();
             return FALSE;
         }
-        
+
     }
+
     GetSystemInfo(&inf);
     vdm->hHeap = HeapCreate(0, inf.dwAllocationGranularity, 0);
     if (vdm->hHeap == NULL) {
@@ -295,7 +295,7 @@ WinMain(HINSTANCE hInstance,  HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho
         //SetLastError();
         return 2;
     }
-       
+
        ReadConfigForVDM(&VdmCB);
 
     if (!LoadConfigDriversForVDM(&(VdmCB.vdmConfig))) {
index a8880e2..62ff97b 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
  *
  * init.c - Session Manager initialization
- * 
+ *
  * ReactOS Operating System
- * 
+ *
  * --------------------------------------------------------------------
  *
  * This software is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.LIB. If not, write
  * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- * MA 02139, USA.  
+ * MA 02139, USA.
  *
  * --------------------------------------------------------------------
  */
@@ -105,7 +105,7 @@ InitSessionManager(VOID)
     Status = InitRoutine[i].EntryPoint();
     if(!NT_SUCCESS(Status))
     {
-      DPRINT1("SM: %s: failed to %s (Status=%lx)\n", 
+      DPRINT1("SM: %s: failed to %s (Status=%lx)\n",
        __FUNCTION__,
        InitRoutine[i].ErrorMessage,
        Status);
index b514546..ed29796 100644 (file)
@@ -38,7 +38,7 @@ SM_PORT_API SmApi [] =
        SmQryInfo       /* smapyqry.c */
 };
 
-/* TODO: optimize this address computation (it should be done 
+/* TODO: optimize this address computation (it should be done
  * with a macro) */
 PSM_CONNECT_DATA FASTCALL SmpGetConnectData (PSM_PORT_MESSAGE Request)
 {
@@ -69,7 +69,7 @@ SmpCallbackServer (PSM_PORT_MESSAGE Request,
        ULONG             CallbackPortNameLength = SM_SB_NAME_MAX_LENGTH; /* TODO: compute length */
        SB_CONNECT_DATA   SbConnectData;
        ULONG             SbConnectDataLength = sizeof SbConnectData;
-       
+
        DPRINT("SM: %s called\n", __FUNCTION__);
 
        if(IMAGE_SUBSYSTEM_NATIVE == ConnectData->SubSystemId)
@@ -183,7 +183,7 @@ SmpHandleConnectionRequest (PSM_PORT_MESSAGE Request)
        HANDLE           hClientDataApiPortThread = (HANDLE) 0;
        PHANDLE          ClientDataApiPortThread = & hClientDataApiPortThread;
        PVOID            Context = NULL;
-       
+
        DPRINT("SM: %s called:\n  SubSystemID=%d\n  SbName=\"%S\"\n",
                        __FUNCTION__, ConnectData->SubSystemId, ConnectData->SbName);
 
@@ -228,7 +228,7 @@ SmpHandleConnectionRequest (PSM_PORT_MESSAGE Request)
                                        ClientDataApiPortThread = & ClientData->ApiPortThread;
                                        /*
                                         * Call back the candidate environment subsystem
-                                        * server (use the port name sent in in the 
+                                        * server (use the port name sent in in the
                                         * connection request message).
                                         */
                                        Status = SmpCallbackServer (Request, ClientData);
@@ -313,7 +313,7 @@ SmpHandleConnectionRequest (PSM_PORT_MESSAGE Request)
  *     we need a thread to listen for connection request that
  *     creates a new thread for each connected port. This is not
  *     necessary in NT LPC, because server side connected ports are
- *     never used to receive requests. 
+ *     never used to receive requests.
  */
 VOID STDCALL
 SmpApiThread (HANDLE ListeningPort)
@@ -322,7 +322,7 @@ SmpApiThread (HANDLE ListeningPort)
        LPC_MAX_MESSAGE Request = {{0}};
 
        DPRINT("SM: %s called\n", __FUNCTION__);
-    
+
        while (TRUE)
        {
                Status = NtListenPort (ListeningPort, & Request.Header);
index 09438cf..03d8d37 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
  *
  * smss.c - Session Manager
- * 
+ *
  * ReactOS Operating System
- * 
+ *
  * --------------------------------------------------------------------
  *
  * This software is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.LIB. If not, write
  * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- * MA 02139, USA.  
+ * MA 02139, USA.
  *
  * --------------------------------------------------------------------
  */
@@ -39,7 +39,7 @@ NtProcessStartup(PPEB Peb)
 {
   NTSTATUS Status;
   PROCESS_BASIC_INFORMATION PBI = {0};
-  
+
   PrintString("ReactOS Session Manager %s (Build %s)\n",
             KERNEL_RELEASE_STR,
             KERNEL_VERSION_BUILD_STR);
index b5352bf..6b1bb40 100644 (file)
@@ -90,7 +90,7 @@ typedef struct _SM_CLIENT_DATA
        HANDLE  SbApiPort;
        WCHAR   SbApiPortName [SM_SB_NAME_MAX_LENGTH];
        struct _SM_CLIENT_DATA * Next;
-       
+
 } SM_CLIENT_DATA, *PSM_CLIENT_DATA;
 NTSTATUS SmInitializeClientManagement(VOID);
 NTSTATUS STDCALL SmCreateClient(PSM_PORT_MESSAGE,PSM_CLIENT_DATA*);
index 1c27750..6bdb67f 100644 (file)
@@ -73,7 +73,7 @@ NtProcessStartup(PPEB Peb)
   NTSTATUS Status;
 
   PrintString("Autochk 0.0.1\n");
-  
+
   Status = NtQueryInformationProcess(NtCurrentProcess(),
                                      ProcessDeviceMap,
                                      &DeviceMap.Query,
index 76e0c3d..9c0d3c7 100644 (file)
@@ -26,7 +26,7 @@
  *        Redirection safe!
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 
@@ -236,7 +236,7 @@ VOID DestroyAlias (VOID)
 
 /* specified routines */
 VOID ExpandAlias (LPTSTR cmd, INT maxlen)
-{      
+{
        unsigned n = 0,
                m,
                i,
@@ -279,7 +279,7 @@ VOID ExpandAlias (LPTSTR cmd, INT maxlen)
                        {
                                m = _tcslen (ptr->lpSubst);
                                if ((int)(_tcslen (cmd) - len + m - n) > maxlen)
-                               {                                       
+                               {
                                        ConErrResPuts(STRING_ALIAS_ERROR);
 
                                        /* the parser won't cause any problems with an empty line */
@@ -303,11 +303,11 @@ VOID ExpandAlias (LPTSTR cmd, INT maxlen)
 
 
 INT CommandAlias (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR ptr;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {       
+       {
                ConOutResPuts(STRING_ALIAS_HELP);
                return 0;
        }
index a622d3b..1e1c09f 100644 (file)
@@ -29,7 +29,7 @@
  *        Added handling of multiple filenames.
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -188,7 +188,7 @@ ChangeAttribute (LPTSTR pszPath, LPTSTR pszFile, DWORD dwMask,
 
 
 INT CommandAttrib (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR *arg;
        INT    argc, i;
        TCHAR  szPath[MAX_PATH];
@@ -204,7 +204,7 @@ INT CommandAttrib (LPTSTR cmd, LPTSTR param)
 
        /* print help */
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_ATTRIB_HELP);
                return 0;
        }
index 6d6f357..f72e971 100644 (file)
  *    26-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
  *        Replaced CRT io functions by Win32 io functions.
  *        Unicode safe!
- *    
+ *
  *    23-Feb-2001 (Carl Nettelblad <cnettel@hem.passagen.es>)
  *        Fixes made to get "for" working.
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -216,7 +216,7 @@ VOID ExitBatch (LPTSTR msg)
  */
 
 BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
-{      
+{
        HANDLE hFile;
 
        hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_READ, NULL,
@@ -229,7 +229,7 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
 #endif
 
        if (hFile == INVALID_HANDLE_VALUE)
-       {               
+       {
                ConErrResPuts(STRING_BATCH_ERROR);
                return FALSE;
        }
index c175b40..e0a48ad 100644 (file)
@@ -21,7 +21,7 @@
  *        Redirection ready!
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -33,7 +33,7 @@
 INT cmd_beep (LPTSTR cmd, LPTSTR param)
 {
        if (_tcsncmp (param, _T("/?"), 2) == 0)
-       {                
+       {
                ConOutResPuts(STRING_BEEP_HELP);
                return 0;
        }
index 2d5d02e..daa4892 100644 (file)
@@ -25,7 +25,7 @@
  *        Unicode and redirection safe!
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
  */
 
 INT cmd_call (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPBATCH_CONTEXT n = NULL;
 
 #ifdef _DEBUG
        DebugPrintf (_T("cmd_call: (\'%s\',\'%s\')\n"), cmd, param);
 #endif
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_CALL_HELP);
                return 0;
        }
index e87bb5d..dc8429f 100644 (file)
@@ -8,7 +8,7 @@
  *        Started.
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -28,7 +28,7 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
 
        /* print help */
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_CHCP_HELP);
                return 0;
        }
@@ -67,12 +67,12 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
        }
 
        if (!SetConsoleCP(uNewCodePage))
-       {               
+       {
                ConErrResPuts(STRING_CHCP_ERROR4);
        }
        else
        {
-               
+
                SetConsoleOutputCP (uNewCodePage);
                InitLocale ();
                InputCodePage= GetConsoleCP();
index 16f4483..9a329b5 100644 (file)
@@ -127,7 +127,7 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
        lpOptions = Options;
 
        if (_tcsncmp (param, _T("/?"), 2) == 0)
-       {                               
+       {
                ConOutResPuts(STRING_CHOICE_HELP);
                return 0;
        }
@@ -167,7 +167,7 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
                                        lpOptions = &arg[i][2];
 
                                if (_tcslen (lpOptions) == 0)
-                               {                                       
+                               {
                                        ConErrResPuts(STRING_CHOICE_ERROR);
                                        freep (arg);
                                        return 1;
@@ -197,7 +197,7 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
                                }
 
                                if (*s != _T(','))
-                               {                                       
+                               {
                                        ConErrResPuts(STRING_CHOICE_ERROR_TXT);
                                        freep (arg);
                                        return 1;
index 5ee749c..d4b8ce9 100644 (file)
@@ -23,7 +23,7 @@
  *        Redirection ready!
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
 #ifdef INCLUDE_CMD_CLS
 
 INT cmd_cls (LPTSTR cmd, LPTSTR param)
-{      
+{
        CONSOLE_SCREEN_BUFFER_INFO csbi;
        COORD coPos;
        DWORD dwWritten;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_CLS_HELP);
                return 0;
        }
index 6951732..de0c8fd 100644 (file)
  *       Added ShellExecute call when all else fails to be able to "launch" any file.
  *
  *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -922,7 +922,7 @@ ProcessInput (BOOL bFlag)
        LPTSTR ip;
        LPTSTR cp;
        BOOL bEchoThisLine;
-       
+
 
        do
        {
@@ -1035,7 +1035,7 @@ ProcessInput (BOOL bFlag)
  */
 BOOL WINAPI BreakHandler (DWORD dwCtrlType)
 {
-       
+
        if ((dwCtrlType != CTRL_C_EVENT) &&
            (dwCtrlType != CTRL_BREAK_EVENT))
                return FALSE;
@@ -1075,27 +1075,27 @@ VOID RemoveBreakHandler (VOID)
 #if 0
 static VOID
 ShowCommands (VOID)
-{      
-       /* print command list */        
+{
+       /* print command list */
        ConOutResPuts(STRING_CMD_HELP1);
        PrintCommandList();
 
-       /* print feature list */        
+       /* print feature list */
        ConOutResPuts(STRING_CMD_HELP2);
 
-#ifdef FEATURE_ALIASES         
+#ifdef FEATURE_ALIASES
        ConOutResPuts(STRING_CMD_HELP3);
 #endif
-#ifdef FEATURE_HISTORY 
+#ifdef FEATURE_HISTORY
        ConOutResPuts(STRING_CMD_HELP4);
 #endif
-#ifdef FEATURE_UNIX_FILENAME_COMPLETION        
+#ifdef FEATURE_UNIX_FILENAME_COMPLETION
        ConOutResPuts(STRING_CMD_HELP5);
 #endif
-#ifdef FEATURE_DIRECTORY_STACK 
+#ifdef FEATURE_DIRECTORY_STACK
        ConOutResPuts(STRING_CMD_HELP6);
 #endif
-#ifdef FEATURE_REDIRECTION     
+#ifdef FEATURE_REDIRECTION
        ConOutResPuts(STRING_CMD_HELP7);
 #endif
        ConOutChar(_T('\n'));
@@ -1111,7 +1111,7 @@ ShowCommands (VOID)
  */
 static VOID
 Initialize (int argc, TCHAR* argv[])
-{      
+{
        TCHAR commandline[CMDLINE_LENGTH];
        TCHAR ModuleName[_MAX_PATH + 1];
        INT i;
@@ -1143,7 +1143,7 @@ Initialize (int argc, TCHAR* argv[])
 
 
        if (argc >= 2 && !_tcsncmp (argv[1], _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_CMD_HELP8);
                ExitProcess(0);
        }
@@ -1286,13 +1286,13 @@ static VOID Cleanup (int argc, TCHAR *argv[])
 
        /* run cmdexit.bat */
        if (IsExistingFile (_T("cmdexit.bat")))
-       {               
+       {
                ConErrResPuts(STRING_CMD_ERROR5);
 
                ParseCommandLine (_T("cmdexit.bat"));
        }
        else if (IsExistingFile (_T("\\cmdexit.bat")))
-       {               
+       {
                ConErrResPuts (STRING_CMD_ERROR5);
                ParseCommandLine (_T("\\cmdexit.bat"));
        }
index ca704ad..c05af3b 100644 (file)
@@ -165,13 +165,13 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
                        {
 
 #ifdef FEATURE_HISTORY
-       
+
                                case 'K':
                                        /*add the current command line to the history*/
                                        if (ir.Event.KeyEvent.dwControlKeyState &
                                                (LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
                                        {
-                               
+
                                                if (str[0])
                                                        History(0,str);
 
@@ -189,7 +189,7 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
                                                (LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
                                        {
                                                ClearCommandLine (str, maxlen, orgx, orgy);
-                                               History_del_current_entry(str);                                 
+                                               History_del_current_entry(str);
                                                current = charcount = _tcslen (str);
                                                ConOutPrintf (_T("%s"), str);
                                                GetCursorXY (&curx, &cury);
@@ -201,7 +201,7 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
                        }
 
 
-                       
+
 
                }
 
@@ -353,7 +353,7 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
                                                                     orgy + (orgx + current) / maxx);
                                                        GetCursorXY (&curx, &cury);
                                                }
-                                               
+
                                        }
                                }
                                else
index ed0ce7c..269246c 100644 (file)
@@ -113,7 +113,7 @@ COMMAND cmds[] =
 
        {_T("goto"), CMD_BATCHONLY, cmd_goto},
 
-#ifdef FEATURE_HISTORY 
+#ifdef FEATURE_HISTORY
        {_T("history"), 0, CommandHistory},
 #endif
 
index d311d54..28189ea 100644 (file)
@@ -37,10 +37,10 @@ VOID SetScreenColor (WORD wColor, BOOL bFill)
        DWORD dwWritten;
        CONSOLE_SCREEN_BUFFER_INFO csbi;
        COORD coPos;
-       
+
 
        if ((wColor & 0xF) == (wColor &0xF0) >> 4)
-       {               
+       {
                ConErrResPuts(STRING_COLOR_ERROR1);
        }
        else
@@ -86,7 +86,7 @@ INT CommandColor (LPTSTR first, LPTSTR rest)
        }
 
        if (StringToColor(&wColor, &rest) == FALSE)
-       {               
+       {
                ConErrResPuts(STRING_COLOR_ERROR2);
                return 1;
        }
index 550a41f..7e7992e 100644 (file)
@@ -8,7 +8,7 @@
  *        started
  *
  *    03-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 
@@ -186,7 +186,7 @@ VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
 
 VOID ConOutResPuts (UINT resID)
 {
-  TCHAR szMsg[RC_STRING_MAX_SIZE];     
+  TCHAR szMsg[RC_STRING_MAX_SIZE];
   LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
 
   ConPuts(szMsg, STD_OUTPUT_HANDLE);
@@ -237,7 +237,7 @@ VOID ConOutFormatMessage (DWORD MessageId, ...)
               (LPTSTR) &text,
               0,
               &arg_ptr);
-       
+
        va_end (arg_ptr);
        if(ret > 0)
        {
@@ -268,7 +268,7 @@ VOID ConErrChar (TCHAR c)
 
 VOID ConErrResPuts (UINT resID)
 {
-       TCHAR szMsg[RC_STRING_MAX_SIZE];        
+       TCHAR szMsg[RC_STRING_MAX_SIZE];
     LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
        ConPuts(szMsg, STD_ERROR_HANDLE);
 }
index 83c1af5..0ac07c4 100644 (file)
@@ -21,7 +21,7 @@
  *        Disabled prompting when used in batch mode.
  *
  *    03-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -247,7 +247,7 @@ ParseCommand (LPFILES f, int argc, TCHAR **arg, LPDWORD lpdwFlags)
                        {
 
 //                             Make sure we have a clean workable path
-                       
+
                                GetFullPathName( arg[i], 128, (LPTSTR) &temp, NULL);
 //                             printf("A Input %s, Output %s\n", arg[i], temp);
 
@@ -261,7 +261,7 @@ ParseCommand (LPFILES f, int argc, TCHAR **arg, LPDWORD lpdwFlags)
 
                                GetFullPathName( arg[i], 128, (LPTSTR) &temp, NULL);
 //                             printf("B Input %s, Output %s\n", arg[i], temp);
-                               
+
                                if (!AddFiles(f, (TCHAR *) &temp, &source, &dest, &count, lpdwFlags))
                                        return -1;
                                while (f->next != NULL)
@@ -300,9 +300,9 @@ Overwrite (LPTSTR fn)
        TCHAR szOptions[4];
 
        LoadString( CMD_ModuleHandle, STRING_COPY_OPTION, szOptions, 4);
-       
+
        ConOutResPuts(STRING_COPY_HELP1);
-       
+
        ConInString(inp, 10);
        ConOutPuts(_T(""));
 
@@ -375,7 +375,7 @@ int copy (LPTSTR source, LPTSTR dest, int append, LPDWORD lpdwFlags)
                {
                        LoadString(CMD_ModuleHandle, STRING_COPY_ERROR2, szMsg, RC_STRING_MAX_SIZE);
                        ConErrPrintf(szMsg, source);
-                       
+
                        CloseHandle (hFileSrc);
                        return 0;
                }
@@ -448,7 +448,7 @@ int copy (LPTSTR source, LPTSTR dest, int append, LPDWORD lpdwFlags)
 
                WriteFile (hFileDest, buffer, dwRead, &dwWritten, NULL);
                if (dwWritten != dwRead)
-               {                                               
+               {
                        ConErrResPuts(STRING_COPY_ERROR3);
 
                        free (buffer);
@@ -564,7 +564,7 @@ SetupCopy (LPFILES sources, TCHAR **p, BOOL bMultiple,
                        {
 
 //                     printf("Merge DIR\n");
-                       
+
                                bMultiple = FALSE;
                                _tcscat (from_merge, _T("\\"));
                                _tcscat (from_merge, find.cFileName);
@@ -624,7 +624,7 @@ SetupCopy (LPFILES sources, TCHAR **p, BOOL bMultiple,
 
 
 INT cmd_copy (LPTSTR first, LPTSTR rest)
-{      
+{
        TCHAR **p;
        TCHAR drive_d[_MAX_DRIVE];
        TCHAR dir_d[_MAX_DIR];
@@ -645,7 +645,7 @@ INT cmd_copy (LPTSTR first, LPTSTR rest)
        DWORD dwFlags = 0;
 
        if (!_tcsncmp (rest, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_COPY_HELP2);
                return 1;
        }
@@ -717,7 +717,7 @@ INT cmd_copy (LPTSTR first, LPTSTR rest)
                copied = SetupCopy (sources, p, bMultiple, drive_d, dir_d, file_d, ext_d, &append, &dwFlags);
        }
        else if (bDestFound && bWildcards)
-       {               
+       {
                ConErrResPuts(STRING_COPY_ERROR4);
 
                DeleteFileList (sources);
index cd4000f..76e9671 100644 (file)
@@ -28,7 +28,7 @@
  *        Fixed date input bug.
  *
  *    03-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -183,7 +183,7 @@ ParseDate (LPTSTR s)
 
 
 INT cmd_date (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR *arg;
        INT    argc;
        INT    i;
@@ -191,7 +191,7 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
        INT    nDateString = -1;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {       
+       {
                ConOutResPuts(STRING_DATE_HELP4);
                return 0;
        }
@@ -236,7 +236,7 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
                                return 0;
                        }
                        ConErrResPuts(STRING_DATE_ERROR);
-                       
+
                }
        }
        else
@@ -246,7 +246,7 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
                        freep (arg);
                        return 0;
                }
-               
+
                ConErrResPuts(STRING_DATE_ERROR);
        }
 
index 14baa4b..5c6c3f6 100644 (file)
@@ -111,13 +111,13 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
        LONG ch;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_DEL_HELP1);
                return 0;
        }
 
        arg = split (param, &args, FALSE);
-       
+
        if (args > 0)
        {
                /* check for options anywhere in command line */
@@ -240,11 +240,11 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
 #endif
 
                                                /* ask for deleting */
-                                               if (dwFlags & DEL_PROMPT) 
+                                               if (dwFlags & DEL_PROMPT)
                                                {
                                                        LoadString(CMD_ModuleHandle, STRING_DEL_ERROR5, szMsg, RC_STRING_MAX_SIZE);
                                                        ConErrPrintf(szMsg, szFullPath);
-                                                       
+
                                                        LoadString(CMD_ModuleHandle, STRING_DEL_ERROR6, szMsg, RC_STRING_MAX_SIZE);
                                                        res = FilePromptYN ((LPTSTR)szMsg);
 
index 580bdc5..9d8202f 100644 (file)
 
 
 INT CommandDelay (LPTSTR cmd, LPTSTR param)
-{      
+{
        DWORD val;
        DWORD mul=1000;
 
        if (_tcsncmp (param, _T("/?"), 2) == 0)
-       {               
+       {
                ConOutResPuts(STRING_DELAY_HELP);
                return 0;
        }
index 4710e7e..2e5b7b5 100644 (file)
  *
  *    01-Mar-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
  *        Replaced all runtime io functions by their Win32 counterparts.
- *  
+ *
  *    23-Feb-2001 (Carl Nettelblad <cnettel@hem.passagen.se>)
  *        dir /s now works in deeper trees
  *
@@ -248,7 +248,7 @@ DirReadParam(LPTSTR Line,                           /* [IN] The line with the parameters & switches */
        /* No parameters yet  */
        *param = NULL;
        ptrLast = NULL;
-       
+
        /* We suppose that switch parameters
           were given to avoid setting them to default
           if the switch was not given */
@@ -263,7 +263,7 @@ DirReadParam(LPTSTR Line,                           /* [IN] The line with the parameters & switches */
                /* we save current character as it is and its upper case */
                cCurChar = *Line;
                cCurUChar = _totupper(*Line);
-               
+
                /* 1st section (see README_DIR.txt) */
                /* When a switch is expecting */
                if (cCurSwitch == _T('/'))
@@ -513,7 +513,7 @@ DirReadParam(LPTSTR Line,                           /* [IN] The line with the parameters & switches */
                        if ((cCurChar != _T('-')) && bPNegative)
                                bPNegative = FALSE;
                }
-       
+
                Line++;
        }
        /* Terminate the parameters */
@@ -567,18 +567,18 @@ ExtendFilespec (LPTSTR file)
 
        if (!file)
                return;
-       
+
 
        /* if no file spec, change to "*.*" */
        if (*file == _T('\0'))
-       {               
-               _tcscpy (file, _T("*.*"));              
+       {
+               _tcscpy (file, _T("*.*"));
                return;
        }
 
        // add support for *.
        if ((file[0] == _T('*')) && (file[1] == _T('.') ))
-        {              
+        {
                 return;
         }
 
@@ -592,17 +592,17 @@ ExtendFilespec (LPTSTR file)
        /* if no . add .* */
        if (!_tcschr (file, _T('.')))
        {
-               _tcscat (file, _T(".*"));       
+               _tcscat (file, _T(".*"));
                return;
        }
 
-     
+
 
        /* if last character is '.' add '*' */
        len = _tcslen (file);
        if (file[len - 1] == _T('.'))
        {
-               _tcscat (file, _T("*"));                
+               _tcscat (file, _T("*"));
                return;
        }
 }
@@ -1110,7 +1110,7 @@ PrintSummary(LPTSTR szPath,
 /*
  * getExt
  *
- * Get the extension of a filename 
+ * Get the extension of a filename
  */
 TCHAR* getExt(const TCHAR* file)
 {
@@ -1142,11 +1142,11 @@ static LPTSTR getName(const TCHAR* file, TCHAR * dest)
                iLen = _tcslen(file);
        else
                iLen = (end - file);
-       
+
 
        _tcsncpy(dest, file, iLen);
        *(dest + iLen) = _T('\0');
-       
+
        return dest;
 }
 
@@ -1344,14 +1344,14 @@ ULARGE_INTEGER u64FileSize;             /* The file size */
                        _tcscpy(szExt, getExt( ptrFiles[i]->cFileName));
                }
 
-               /* Calculate size */            
-               if (ptrFiles[i]->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)           
+               /* Calculate size */
+               if (ptrFiles[i]->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                {
                        /* Directory, no size it's a directory*/
                        iSizeFormat = -17;
                        _tcscpy(szSize, _T("<DIR>"));
                }
-               else            
+               else
                {
                        /* File */
                        iSizeFormat = 17;
@@ -1359,7 +1359,7 @@ ULARGE_INTEGER u64FileSize;               /* The file size */
                        u64FileSize.LowPart = ptrFiles[i]->nFileSizeLow;
                        ConvertULargeInteger(u64FileSize, szSize, 20, lpFlags->bTSeperator);
                }
-               
+
                /* Format date and time */
                DirPrintFileDateTime(szDate,szTime,ptrFiles[i],lpFlags);
 
@@ -1414,7 +1414,7 @@ DirPrintBareList(LPWIN32_FIND_DATA ptrFiles[],    /* [IN] Files' Info */
 
 /*
  * DirPrintFiles
- * 
+ *
  * The functions that prints the files list
  */
 static VOID
@@ -1545,9 +1545,9 @@ CompareFiles(LPWIN32_FIND_DATA lpFile1,   /* [IN] A pointer to WIN32_FIND_DATA of
                                u64File1.HighPart = lpFile1->ftLastWriteTime.dwHighDateTime ;
                                u64File2.LowPart = lpFile2->ftLastWriteTime.dwLowDateTime;
                                u64File2.HighPart = lpFile2->ftLastWriteTime.dwHighDateTime ;
-                               break;                  
+                               break;
                        }
-                       
+
                        /* In case that differnce is too big for a long */
                        if (u64File1.QuadPart < u64File2.QuadPart)
                                iComp = -1;
@@ -1566,7 +1566,7 @@ CompareFiles(LPWIN32_FIND_DATA lpFile1,   /* [IN] A pointer to WIN32_FIND_DATA of
                   the files/dirs,there is no need to calculate the others*/
                if (iComp != 0) break;
        }
-       
+
        /* Translate the value of iComp to boolean */
        if (iComp > 0)
                return TRUE;
@@ -1719,7 +1719,7 @@ TCHAR szMsg[RC_STRING_MAX_SIZE];
                                        /* Continue at next node at linked list */
                                        ptrNextNode = ptrNextNode->ptrNext;
                                        dwCount ++;
-                               
+
                                        /* Grab statistics */
                                        if (wfdFileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                                        {
@@ -1743,7 +1743,7 @@ TCHAR szMsg[RC_STRING_MAX_SIZE];
        /* Terminate list */
        ptrNextNode->ptrNext = NULL;
 
-       /* Calculate and allocate space need for making an array of pointers */ 
+       /* Calculate and allocate space need for making an array of pointers */
        ptrFileArray = malloc(sizeof(LPWIN32_FIND_DATA) * dwCount);
        if (ptrFileArray == NULL)
        {
@@ -1779,7 +1779,7 @@ TCHAR szMsg[RC_STRING_MAX_SIZE];
 
        /* Print Data */
        DirPrintFiles(ptrFileArray, dwCount, szFullPath, lpFlags);
-       
+
        /* Free array */
        free(ptrFileArray);
 
index c45f70e..e74fe5a 100644 (file)
@@ -136,13 +136,13 @@ INT GetDirectoryStackDepth (VOID)
  * pushd command
  */
 INT CommandPushd (LPTSTR first, LPTSTR rest)
-{      
+{
        TCHAR curPath[MAX_PATH];
        TCHAR newPath[MAX_PATH];
        BOOL  bChangePath = FALSE;
 
        if (!_tcsncmp (rest, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_DIRSTACK_HELP1);
                return 0;
        }
@@ -172,7 +172,7 @@ INT CommandPopd (LPTSTR first, LPTSTR rest)
        TCHAR szPath[MAX_PATH];
 
        if (!_tcsncmp(rest, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_DIRSTACK_HELP2);
                return 0;
        }
@@ -193,11 +193,11 @@ INT CommandPopd (LPTSTR first, LPTSTR rest)
  * dirs command
  */
 INT CommandDirs (LPTSTR first, LPTSTR rest)
-{      
+{
        LPDIRENTRY lpDir;
 
        if (!_tcsncmp(rest, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_DIRSTACK_HELP3);
                return 0;
        }
@@ -206,7 +206,7 @@ INT CommandDirs (LPTSTR first, LPTSTR rest)
        lpDir = lpStackBottom;
 
        if (lpDir == NULL)
-       {               
+       {
                ConOutResPuts(STRING_DIRSTACK_HELP4);
                return 0;
        }
index 3c296c2..2c25bf1 100644 (file)
@@ -23,7 +23,7 @@
  *        Implemented 'echo.' and 'echoerr.'.
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -39,7 +39,7 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_ECHO_HELP4);
                return 0;
        }
@@ -78,7 +78,7 @@ INT CommandEchos (LPTSTR cmd, LPTSTR param)
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_ECHO_HELP1);
                return 0;
        }
@@ -98,7 +98,7 @@ INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_ECHO_HELP2);
                return 0;
        }
@@ -127,7 +127,7 @@ INT CommandEchoserr (LPTSTR cmd, LPTSTR param)
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_ECHO_HELP3);
                return 0;
        }
index 30b0c68..8b17679 100644 (file)
@@ -17,7 +17,7 @@
  *        Use FormatMessage() for error reports.
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -117,13 +117,13 @@ VOID error_too_many_parameters (LPTSTR s)
 
 
 VOID error_path_not_found (VOID)
-{      
+{
        ConErrResPuts(STRING_ERROR_PATH_NOT_FOUND);
 }
 
 
 VOID error_file_not_found (VOID)
-{      
+{
        ConErrResPuts(STRING_ERROR_FILE_NOT_FOUND);
 }
 
@@ -138,7 +138,7 @@ VOID error_sfile_not_found (LPTSTR f)
 
 
 VOID error_req_param_missing (VOID)
-{      
+{
        ConErrResPuts(STRING_ERROR_REQ_PARAM_MISSING);
 }
 
@@ -151,25 +151,25 @@ VOID error_invalid_drive (VOID)
 
 VOID error_bad_command (VOID)
 {
-       ConErrResPuts(STRING_ERROR_BADCOMMAND); 
+       ConErrResPuts(STRING_ERROR_BADCOMMAND);
 }
 
 
 VOID error_no_pipe (VOID)
 {
-       ConErrResPuts(STRING_ERROR_CANNOTPIPE); 
+       ConErrResPuts(STRING_ERROR_CANNOTPIPE);
 }
 
 
 VOID error_out_of_memory (VOID)
 {
-       ConErrResPuts(STRING_ERROR_OUT_OF_MEMORY);      
+       ConErrResPuts(STRING_ERROR_OUT_OF_MEMORY);
 }
 
 
 VOID error_invalid_parameter_format (LPTSTR s)
 {
-       ConErrResPuts(STRING_ERROR_INVALID_PARAM_FORMAT);       
+       ConErrResPuts(STRING_ERROR_INVALID_PARAM_FORMAT);
 }
 
 
@@ -188,7 +188,7 @@ VOID error_syntax (LPTSTR s)
 
 VOID msg_pause (VOID)
 {
-       ConOutResPuts(STRING_ERROR_D_PAUSEMSG); 
+       ConOutResPuts(STRING_ERROR_D_PAUSEMSG);
 }
 
 /* EOF */
index 4553172..c24ddfa 100644 (file)
  *
  *    01-Sep-1999 (Eric Kohl)
  *        Added help text.
- *    
+ *
  *    23-Feb-2001 (Carl Nettelblad <cnettel@hem.passagen.se>)
  *        Implemented preservation of echo flag. Some other for related
  *        code in other files fixed, too.
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -60,7 +60,7 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_FOR_HELP1);
                return 0;
        }
index 48af102..3514ca6 100644 (file)
@@ -8,7 +8,7 @@
  *        Started.
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -93,7 +93,7 @@ PrintDiskInfo (LPTSTR szDisk)
 
        if (szVolume[0] == _T('\0'))
        {
-               
+
                LoadString(CMD_ModuleHandle, STRING_FREE_ERROR2, szMsg, RC_STRING_MAX_SIZE);
                _tcscpy (szVolume, szMsg);
        }
@@ -120,21 +120,21 @@ PrintDiskInfo (LPTSTR szDisk)
        uliSize.QuadPart = dwSecPerCl * dwBytPerSec * dwFreeCl;
        ConvertULargeInteger (uliSize, szFree, 40);
 
-       
+
        LoadString(CMD_ModuleHandle, STRING_FREE_HELP1, szMsg, RC_STRING_MAX_SIZE);
        ConOutPrintf(szMsg, szDrive, szVolume, szSerial, szTotal, szUsed, szFree);
 }
 
 
 INT CommandFree (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR szParam;
        TCHAR  szDefPath[MAX_PATH];
        INT argc, i;
        LPTSTR *arg;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_FREE_HELP2);
                return 0;
        }
index 9aa6eff..ba54136 100644 (file)
@@ -23,7 +23,7 @@
  *        Added help text ("/?").
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
index 9b7be84..47221f7 100644 (file)
@@ -35,7 +35,7 @@
  *    06/12/99 (Paolo Pantaleo <paolopan@freemail.it>)
  *        started.
  *
- */ 
+ */
 
 #include "precomp.h"
 
@@ -208,7 +208,7 @@ VOID del(LPHIST_ENTRY item)
 
        /*set links in prev and next item*/
        item->next->prev=item->prev;
-       item->prev->next=item->next;    
+       item->prev->next=item->next;
 
        free(item);
 
@@ -256,12 +256,12 @@ VOID add_before_last(LPTSTR string)
 
 static
 VOID add_at_bottom(LPTSTR string)
-{      
+{
 
 
        LPHIST_ENTRY tmp;
 
-               
+
        /*delete first entry if maximum number of entries is reached*/
        while(size>=max_size)
                del(Top->prev);
@@ -271,24 +271,24 @@ VOID add_at_bottom(LPTSTR string)
 
        if (*string==_T('\0'))
                return;
-       
-       
+
+
        /*if new entry is the same than the last do not add it*/
        if(size)
                if(_tcscmp(string,Bottom->next->string)==0)
                        return;
 
-               
-       /*fill bottom with string, it will become Bottom->next*/                
+
+       /*fill bottom with string, it will become Bottom->next*/
        Bottom->string=malloc((_tcslen(string)+1)*sizeof(TCHAR));
-       _tcscpy(Bottom->string,string);         
-       
+       _tcscpy(Bottom->string,string);
+
        /*save Bottom value*/
        tmp=Bottom;
 
 
        /*create new void Bottom*/
-       Bottom=malloc(sizeof(HIST_ENTRY));              
+       Bottom=malloc(sizeof(HIST_ENTRY));
        Bottom->next=tmp;
        Bottom->prev=NULL;
        Bottom->string=NULL;
@@ -311,7 +311,7 @@ VOID History_move_to_bottom(VOID)
 
 VOID History (INT dir, LPTSTR commandline)
 {
-       
+
        if(dir==0)
        {
                add_at_bottom(commandline);
@@ -330,23 +330,23 @@ VOID History (INT dir, LPTSTR commandline)
        {
                if (curr_ptr->next==Top || curr_ptr==Top)
                {
-#ifdef WRAP_HISTORY                    
-                       curr_ptr=Bottom;                        
-#else                  
+#ifdef WRAP_HISTORY
+                       curr_ptr=Bottom;
+#else
                        curr_ptr=Top;
                        commandline[0]=_T('\0');
                        return;
 #endif
                }
 
-               
+
                curr_ptr = curr_ptr->next;
                if(curr_ptr->string)
                        _tcscpy(commandline,curr_ptr->string);
 
        }
-               
-               
+
+
 
 
 
@@ -355,7 +355,7 @@ VOID History (INT dir, LPTSTR commandline)
 
                if (curr_ptr->prev==Bottom || curr_ptr==Bottom)
                {
-#ifdef WRAP_HISTORY                    
+#ifdef WRAP_HISTORY
                        curr_ptr=Top;
 #else
                        curr_ptr=Bottom;
@@ -363,11 +363,11 @@ VOID History (INT dir, LPTSTR commandline)
                        return;
 #endif
                }
-               
-               curr_ptr=curr_ptr->prev;                
+
+               curr_ptr=curr_ptr->prev;
                if(curr_ptr->string)
-                       _tcscpy(commandline,curr_ptr->string);          
-               
+                       _tcscpy(commandline,curr_ptr->string);
+
        }
 }
 
@@ -381,7 +381,7 @@ VOID History (INT dir, LPTSTR commandline)
 LPTSTR history = NULL; /*buffer to sotre all the lines*/
 LPTSTR lines[MAXLINES];        /*array of pointers to each line(entry)*/
                                                /*located in history buffer*/
-       
+
 INT curline = 0;               /*the last line recalled by user*/
 INT numlines = 0;              /*number of entries, included the last*/
                                                /*empty one*/
@@ -392,7 +392,7 @@ INT maxpos = 0;                     /*index of last byte of last entry*/
 
 VOID History (INT dir, LPTSTR commandline)
 {
-       
+
        INT count;                                              /*used in for loops*/
        INT length;                                             /*used in the same loops of count*/
                                                                        /*both to make room when is full
@@ -468,7 +468,7 @@ VOID History (INT dir, LPTSTR commandline)
                /*copy entry in the history bufer*/
                _tcscpy (lines[numlines], commandline);
                numlines++;
-               
+
                /*set last lines[numlines] pointer next the end of last, valid,
                just setted entry (the two lines above)*/
                lines[numlines] = lines[numlines - 1] + _tcslen (commandline) + 1;
index f1b2940..df70134 100644 (file)
@@ -26,7 +26,7 @@
  *        IF DEFINED variable command
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  *
  */
 
@@ -47,7 +47,7 @@ INT cmd_if (LPTSTR cmd, LPTSTR param)
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_IF_HELP1);
                return 0;
        }
@@ -111,7 +111,7 @@ INT cmd_if (LPTSTR cmd, LPTSTR param)
                        *pp++ = _T('\0');
                        ValueSize = GetEnvironmentVariable(param, Value, sizeof Value);
                        x_flag ^= (0 == ValueSize)
-                                       ? 0 
+                                       ? 0
                                        : X_EXEC;
                        x_flag |= X_EMPTY;
                }
index a93969f..0716205 100644 (file)
  *        Improved chdir/cd command.
  *
  *    02-Apr-2004 (Magnus Olsen <magnus@greatlord.com>)
- *        Remove all hard code string so they can be 
+ *        Remove all hard code string so they can be
  *               translate to other langues.
  */
 
@@ -153,7 +153,7 @@ VOID FreeLastPath (VOID)
  *
  */
 INT cmd_chdir (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR dir;             /* pointer to the directory to change to */
        LPTSTR lpOldPath;
        LPTSTR endofstring; /* pointer to the null character in the directory to change to */
@@ -163,7 +163,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
          but on the other hand paths are generally not very long*/
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_CD_HELP);
                return 0;
        }
@@ -233,7 +233,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
        {
                //ErrorMessage (GetLastError(), _T("CD"));
                ConOutFormatMessage(GetLastError());
-               
+
                /* throw away current directory */
                free (lpOldPath);
                lpOldPath = NULL;
@@ -276,7 +276,7 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
        INT argc;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_MKDIR_HELP);
                return 0;
        }
@@ -311,7 +311,7 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
        }
 
        if (!dir)
-       {               
+       {
                ConErrResPuts (STRING_ERROR_REQ_PARAM_MISSING);
                return 1;
        }
@@ -341,7 +341,7 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
  *
  */
 INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR dir;             /* pointer to the directory to change to */
        LPTSTR place;   /* used to search for the \ when no space is used */
 
@@ -349,7 +349,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
        INT argc;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_RMDIR_HELP);
                return 0;
        }
@@ -383,7 +383,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
        }
 
        if (!dir)
-       {        
+       {
                ConErrResPuts(STRING_ERROR_REQ_PARAM_MISSING);
                return 1;
        }
@@ -414,7 +414,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
 INT CommandExit (LPTSTR cmd, LPTSTR param)
 {
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_EXIT_HELP);
                return 0;
        }
@@ -432,7 +432,7 @@ INT CommandExit (LPTSTR cmd, LPTSTR param)
 INT CommandRem (LPTSTR cmd, LPTSTR param)
 {
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_REM_HELP);
        }
 
index a77c5fa..8610f8c 100644 (file)
@@ -14,7 +14,7 @@
  *        Unicode ready!
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -38,7 +38,7 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
 
        /* print help */
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_LABEL_HELP1);
                return 0;
        }
@@ -89,7 +89,7 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
        GetVolumeInformation(szRootPath, szOldLabel, 80, &dwSerialNr,
                              NULL, NULL, NULL, 0);
 
-       /* print drive info */  
+       /* print drive info */
        if (szOldLabel[0] != _T('\0'))
        {
                LoadString(CMD_ModuleHandle, STRING_LABEL_HELP2, szMsg, RC_STRING_MAX_SIZE);
index 7127b0f..0ea336e 100644 (file)
@@ -8,7 +8,7 @@
  *        Started.
  *
  *    28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -67,7 +67,7 @@ INT CommandMemory (LPTSTR cmd, LPTSTR param)
        TCHAR szAvailVirtual[20];
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_MEMMORY_HELP1);
                return 0;
        }
index f576bb6..4528ec4 100644 (file)
@@ -29,7 +29,7 @@
  *        Added PagePrompt() and FilePrompt().
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -436,9 +436,9 @@ HWND GetConsoleWindow (VOID)
 
 
 INT PagePrompt (VOID)
-{      
+{
        INPUT_RECORD ir;
-       
+
        ConOutResPuts(STRING_MISC_HELP1);
 
        RemoveBreakHandler ();
index ec1e782..d1aaa8d 100644 (file)
@@ -22,7 +22,7 @@
  *        Added "/N" option.
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -91,7 +91,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
                               "  /Y\n"
                               "  /-Y\n"
                               "..."));
-#else          
+#else
                ConOutResPuts(STRING_MOVE_HELP2);
 #endif
                return 0;
index fbb17c4..187d02f 100644 (file)
@@ -7,7 +7,7 @@
  *     started - Paolo Pantaleo <paolopan@freemail.it>
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -25,7 +25,7 @@
 
 INT CommandMsgbox (LPTSTR cmd, LPTSTR param)
 {
-       
+
        //used to parse command line
        LPTSTR tmp;
 
@@ -43,7 +43,7 @@ INT CommandMsgbox (LPTSTR cmd, LPTSTR param)
        title = buff;
 
        if (_tcsncmp (param, _T("/?"), 2) == 0)
-       {               
+       {
                ConOutResPuts(STRING_MSGBOX_HELP);
                return 0;
        }
index f218415..41bcea1 100644 (file)
@@ -23,7 +23,7 @@
  *        Fixed Win32 environment handling.
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 #include "precomp.h"
 #include "resource.h"
 
 
 INT cmd_path (LPTSTR cmd, LPTSTR param)
-{      
+{
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_PATH_HELP1);
                return 0;
        }
@@ -55,7 +55,7 @@ INT cmd_path (LPTSTR cmd, LPTSTR param)
                if (dwBuffer == 0)
                {
                        LoadString(CMD_ModuleHandle, STRING_VOL_HELP2, szMsg, RC_STRING_MAX_SIZE);
-                   ConOutPrintf(szMsg, _T("PATH"));                    
+                   ConOutPrintf(szMsg, _T("PATH"));
                        return 0;
                }
                else if (dwBuffer > ENV_BUFFER_SIZE)
index 3527eba..a2839d0 100644 (file)
  *     specified.
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 INT cmd_pause (LPTSTR cmd, LPTSTR param)
-{      
+{
 
 #ifdef _DEBUG
        DebugPrintf (_T("cmd_pause: \'%s\' : \'%s\')\n"), cmd, param);
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_PAUSE_HELP1);
                return 0;
        }
index f7afc1a..d7dbf5c 100644 (file)
@@ -44,7 +44,7 @@
  *        Fixed Win32 environment handling.
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 #include "precomp.h"
 #include "resource.h"
@@ -181,14 +181,14 @@ VOID PrintPrompt(VOID)
 
 INT cmd_prompt (LPTSTR cmd, LPTSTR param)
 {
-       
+
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_PROMPT_HELP1);
 
-#ifdef FEATURE_DIRECTORY_STACK         
+#ifdef FEATURE_DIRECTORY_STACK
                ConOutResPuts(STRING_PROMPT_HELP2);
-#endif         
+#endif
                ConOutResPuts(STRING_PROMPT_HELP3);
                return 0;
        }
index ed84137..3d49408 100644 (file)
@@ -17,7 +17,7 @@
  *        Implemented basic rename code.
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc 
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -61,7 +61,7 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
   WIN32_FIND_DATA f;
 
   if (!_tcsncmp(param, _T("/?"), 2))
-  {    
+  {
     ConOutResPuts(STRING_REN_HELP1);
     return 0;
   }
index b80b546..779bfcd 100644 (file)
@@ -7,7 +7,7 @@
  *     started - Paolo Pantaleo <paolopan@freemail.it>
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  *
  */
 
 
 
 INT CommandScreen (LPTSTR cmd, LPTSTR param)
-{      
+{
        SHORT x,y;
        BOOL bSkipText = FALSE;
 
        if (_tcsncmp (param, _T("/?"), 2) == 0)
-       {               
+       {
                ConOutResPuts(STRING_SCREEN_HELP);
                return 0;
        }
index 266c6e2..b1bc3a5 100644 (file)
@@ -31,7 +31,7 @@
  *        Fixed little bug.
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
 
 
 INT cmd_set (LPTSTR cmd, LPTSTR param)
-{      
+{
        TCHAR szMsg[RC_STRING_MAX_SIZE];
        LPTSTR p;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_SET_HELP);
                return 0;
        }
index 84de134..71b5f7f 100644 (file)
@@ -34,7 +34,7 @@
  *
  * FREEDOS extension : optional parameter DOWN to allow shifting
  *   parameters backwards.
- * 
+ *
  */
 
 INT cmd_shift (LPTSTR cmd, LPTSTR param)
@@ -45,7 +45,7 @@ INT cmd_shift (LPTSTR cmd, LPTSTR param)
 #endif
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_SHIFT_HELP);
                return 0;
        }
index 5c21a47..a05d137 100644 (file)
@@ -8,7 +8,7 @@
  *        Started.
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -24,7 +24,7 @@ INT cmd_start (LPTSTR first, LPTSTR rest)
        TCHAR *param;
 
        if (_tcsncmp (rest, _T("/?"), 2) == 0)
-       {               
+       {
                ConOutResPuts(STRING_START_HELP1);
                return 0;
        }
@@ -72,7 +72,7 @@ INT cmd_start (LPTSTR first, LPTSTR rest)
 #ifdef _DEBUG
                DebugPrintf (_T("[BATCH: %s %s]\n"), szFullName, rest);
 #endif
-               
+
                ConErrResPuts(STRING_START_ERROR1);
        }
        else
@@ -98,7 +98,7 @@ INT cmd_start (LPTSTR first, LPTSTR rest)
                stui.cb = sizeof (STARTUPINFO);
                stui.dwFlags = STARTF_USESHOWWINDOW;
                stui.wShowWindow = SW_SHOWDEFAULT;
-                       
+
                if (CreateProcess (szFullName, szFullCmdLine, NULL, NULL, FALSE,
                                   CREATE_NEW_CONSOLE, NULL, NULL, &stui, &prci))
                {
index 5aee0c1..632cc93 100644 (file)
@@ -53,7 +53,7 @@ CLRTABLE clrtable[] =
        {_T("whi")      ,_R|_G|_B       },
        {_T("gra")      ,_I             },
 
-       
+
        {_T("0")        ,0              },
        {_T("2")        ,_G             },
        {_T("3")        ,_B|_G          },
@@ -71,7 +71,7 @@ CLRTABLE clrtable[] =
        {_T("14")       ,_I|_R|_G       },
        {_T("15")       ,_I|_R|_G|_B    },
 
-       
+
        /* note that 1 is at the end of list
        to avoid to confuse it with 10-15*/
        {_T("1")        ,_B             },
@@ -81,7 +81,7 @@ CLRTABLE clrtable[] =
        /*magenta synonimous*/
        {_T("pur")      ,_B|_R          },
 
-       
+
        {_T("")   ,0},
 };
 
@@ -94,7 +94,7 @@ on erro retunr nonzero value
 static
 INT chop_blank(LPTSTR *arg_str)
 {
-       
+
        LPTSTR str;
        str = _tcschr(*arg_str,_T(' '));
        if(!str)
@@ -105,7 +105,7 @@ INT chop_blank(LPTSTR *arg_str)
                return CP_BLANK_NOT_FOUND;
        }
 
-       
+
 
        while(_istspace(*str))
                str++;
@@ -118,27 +118,27 @@ INT chop_blank(LPTSTR *arg_str)
 
        *arg_str = str;
 
-       return CP_OK;   
+       return CP_OK;
 }
 
 
 
 /*
 read a color value in hex (like win nt's cmd syntax)
-if an error occurs return -1   
-*/ 
+if an error occurs return -1
+*/
 static
 WORD hex_clr(LPTSTR str)
 {
        WORD ret= (WORD)-1;
        TCHAR ch;
-       
+
        ch = str[1];
-       
+
        if(_istdigit(ch))
                ret = ch-_T('0');
        else
-       {       
+       {
                ch=_totupper(ch);
 
                if(  ch >= _T('A') && ch <= _T('F')  )
@@ -147,13 +147,13 @@ WORD hex_clr(LPTSTR str)
                        return (WORD)-1;
        }
 
-       
+
        ch = str[0];
-       
+
        if(_istdigit(ch))
                ret |= (ch-_T('0')) << 4;
        else
-       {       
+       {
                ch=_totupper(ch);
 
                if(  ch >= _T('A') && ch <= _T('F')  )
@@ -168,7 +168,7 @@ WORD hex_clr(LPTSTR str)
 
 /*
 read a color value from a string (like 4nt's syntax)
-if an error occurs return -1   
+if an error occurs return -1
 */
 static
 WORD txt_clr(LPTSTR str)
@@ -184,7 +184,7 @@ WORD txt_clr(LPTSTR str)
 
 
 
-/*search for x on y*/ 
+/*search for x on y*/
 static
 WORD str_to_color(LPTSTR* arg_str)
 {
@@ -231,13 +231,13 @@ WORD str_to_color(LPTSTR* arg_str)
                if(chop_blank(&str))
                        return (WORD)-1;
        }
-               
-       
+
+
        if( (tmp_clr = txt_clr(str)) == (WORD)-1 )
                return (WORD)-1;
 
        chop_blank(&str);
-       
+
        *arg_str = str;
 
        return SC_HEX | ret_clr | tmp_clr << 4 | bBri << 7;
index f5f8abd..9a31554 100644 (file)
@@ -131,7 +131,7 @@ static BOOL ParseTime (LPTSTR s)
 
 
 INT cmd_time (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR *arg;
        INT    argc;
        INT    i;
@@ -139,7 +139,7 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
        INT    nTimeString = -1;
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_TIME_HELP1);
                return 0;
        }
@@ -171,7 +171,7 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
                if (nTimeString == -1)
                {
                        TCHAR  s[40];
-                       
+
                        ConOutResPuts(STRING_TIME_HELP2);
 
                        ConInString (s, 40);
@@ -200,7 +200,7 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
                        /* force input the next time around. */
                        nTimeString = -1;
                }
-               
+
                ConErrResPuts(STRING_TIME_ERROR1);
        }
 
index bd70285..97fb5f7 100644 (file)
@@ -25,7 +25,7 @@
 
 //print timer value
 #define PT(format) PrintElapsedTime(GetTickCount()-cT,format)
-       
+
 
 //current timer Time (at wich started to count)
 #define cT clksT[clk_n]
@@ -43,7 +43,7 @@ PrintElapsedTime (DWORD time,INT format)
 #ifdef _DEBUG
        DebugPrintf(_T("PrintTime(%d,%d)"),time,format);
 #endif
-       
+
        switch (format)
        {
        case 0:
@@ -74,7 +74,7 @@ INT CommandTimer (LPTSTR cmd, LPTSTR param)
 
        // all timers are kept
        static DWORD clksT[10];
-       
+
        // timers status
        // set all the clocks off by default
        static BOOL clksS[10]={FALSE,FALSE,FALSE,FALSE,
@@ -82,7 +82,7 @@ INT CommandTimer (LPTSTR cmd, LPTSTR param)
 
        // TRUE if /S in command line
        BOOL bS = FALSE;
-       
+
        // avoid to set clk_n more than once
        BOOL bCanNSet = TRUE;
 
@@ -94,8 +94,8 @@ INT CommandTimer (LPTSTR cmd, LPTSTR param)
 
        // output format
        INT iFormat=1;
-       
-       
+
+
        // command line parsing variables
        INT argc;
        LPTSTR *p;
@@ -139,14 +139,14 @@ INT CommandTimer (LPTSTR cmd, LPTSTR param)
                                bCanNSet = FALSE;
                                continue;
                        }
-                       
+
                        // set s(plit) option
                        if (_totupper(p[i][1]) == _T('S'))
                        {
                                bS = TRUE;
                                continue;
                        }
-                       
+
                        // specify format
                        if (_totupper(p[i][1]) == _T('F'))
                        {
@@ -169,7 +169,7 @@ INT CommandTimer (LPTSTR cmd, LPTSTR param)
        if(bS)
        {
                if(cS)
-               {       
+               {
                        PS;
                        PrintElapsedTime(GetTickCount()-cT, iFormat);
                        freep(p);
index 250930d..15e0db4 100644 (file)
@@ -6,7 +6,7 @@
  *     1999-02-11 Emanuele Aliberti
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -16,7 +16,7 @@
 
 
 INT cmd_title (LPTSTR cmd, LPTSTR param)
-{      
+{
 
        /* Do nothing if no args */
        if (*param == _T('\0'))
@@ -24,7 +24,7 @@ INT cmd_title (LPTSTR cmd, LPTSTR param)
 
        /* Asking help? */
        if (!_tcsncmp(param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_TITLE_HELP);
                return 0;
        }
index 818886d..5710059 100644 (file)
@@ -23,7 +23,7 @@
  *        Added multiple file support (copied from y.c)
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -59,7 +59,7 @@ INT cmd_type (LPTSTR cmd, LPTSTR param)
        }
 
        argv = split (param, &argc, TRUE);
-       
+
        for (i = 0; i < argc; i++)
        {
                if (_T('/') == argv[i][0])
@@ -97,7 +97,7 @@ INT cmd_type (LPTSTR cmd, LPTSTR param)
 
                        if (dwRead>0 && bRet)
                                WriteFile(hConsoleOut,buff,dwRead,&dwWritten,NULL);
-                       
+
                } while(dwRead>0 && bRet);
 
                CloseHandle(hFile);
index 3d87317..389464c 100644 (file)
@@ -62,11 +62,11 @@ VOID ShortVersion (VOID)
  *
  */
 INT cmd_ver (LPTSTR cmd, LPTSTR param)
-{      
+{
        INT i;
 
        if (_tcsstr (param, _T("/?")) != NULL)
-       {               
+       {
                ConOutResPuts(STRING_VERSION_HELP1);
                return 0;
        }
@@ -78,7 +78,7 @@ INT cmd_ver (LPTSTR cmd, LPTSTR param)
        /* Basic copyright notice */
        if (param[0] == _T('\0'))
        {
-               ConOutPuts(_T("\n"SHELLINFO));          
+               ConOutPuts(_T("\n"SHELLINFO));
                ConOutResPuts(STRING_VERSION_HELP2);
        }
        else
@@ -102,21 +102,21 @@ INT cmd_ver (LPTSTR cmd, LPTSTR param)
 
                        if (_totupper (param[i]) == _T('W'))
                        {
-                               /* Warranty notice */                           
+                               /* Warranty notice */
                                ConOutResPuts(STRING_VERSION_HELP3);
                        }
                        else if (_totupper (param[i]) == _T('R'))
                        {
-                               /* Redistribution notice */                             
+                               /* Redistribution notice */
                                ConOutResPuts(STRING_VERSION_HELP4);
                        }
                        else if (_totupper (param[i]) == _T('C'))
                        {
-                               /* Developer listing */                         
-                               ConOutResPuts(STRING_VERSION_HELP6);                            
-                               ConOutResPuts(STRING_FREEDOS_DEV);                              
+                               /* Developer listing */
+                               ConOutResPuts(STRING_VERSION_HELP6);
+                               ConOutResPuts(STRING_FREEDOS_DEV);
                                ConOutResPuts(STRING_VERSION_HELP7);
-                ConOutResPuts(STRING_REACTOS_DEV);                             
+                ConOutResPuts(STRING_REACTOS_DEV);
                        }
                        else
                        {
@@ -125,7 +125,7 @@ INT cmd_ver (LPTSTR cmd, LPTSTR param)
                        }
                }
        }
-       
+
        ConOutResPuts(STRING_VERSION_HELP5);
        return 0;
 }
index 63a0550..5bd9d85 100644 (file)
@@ -15,7 +15,7 @@
  *        Unicode and redirection ready!
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 #include "precomp.h"
@@ -33,7 +33,7 @@ INT cmd_verify (LPTSTR cmd, LPTSTR param)
        TCHAR szMsg[RC_STRING_MAX_SIZE];
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_VERIFY_HELP1);
                return 0;
        }
@@ -48,7 +48,7 @@ INT cmd_verify (LPTSTR cmd, LPTSTR param)
        else if (_tcsicmp (param, D_ON) == 0)
                bVerify = TRUE;
        else
-       {               
+       {
                ConOutResPuts(STRING_VERIFY_HELP3);
        }
 
index 7956442..09d7401 100644 (file)
@@ -67,12 +67,12 @@ PrintVolumeHeader (LPTSTR pszRootPath)
 
 
 INT cmd_vol (LPTSTR cmd, LPTSTR param)
-{      
+{
        TCHAR szRootPath[] = _T("A:\\");
        TCHAR szPath[MAX_PATH];
 
        if (!_tcsncmp (param, _T("/?"), 2))
-       {               
+       {
                ConOutResPuts(STRING_VOL_HELP4);
                return 0;
        }
index d969514..c914ead 100644 (file)
@@ -12,7 +12,7 @@
  *     (nice size optimization :)
  *
  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- *        Remove all hardcode string to En.rc  
+ *        Remove all hardcode string to En.rc
  */
 
 
@@ -178,7 +178,7 @@ INT CommandWindow (LPTSTR cmd, LPTSTR param)
        HWND hwnd;
 
        if (_tcsncmp (param, _T("/?"), 2) == 0)
-       {               
+       {
                ConOutResPuts(STRING_WINDOW_HELP1);
                return 0;
        }
@@ -190,12 +190,12 @@ INT CommandWindow (LPTSTR cmd, LPTSTR param)
 
 
 INT CommandActivate (LPTSTR cmd, LPTSTR param)
-{      
+{
        LPTSTR str;
        HWND hwnd;
 
        if (_tcsncmp (param, _T("/?"), 2) == 0)
-       {               
+       {
                ConOutResPuts(STRING_WINDOW_HELP2);
                return 0;
        }
@@ -215,7 +215,7 @@ INT CommandActivate (LPTSTR cmd, LPTSTR param)
 
        hwnd = FindWindow(NULL, param);
        if (hwnd == NULL)
-       {               
+       {
                ConErrResPuts(STRING_WINDOW_ERROR1);
                return 1;
        }
index ff3f80c..25e7e1d 100644 (file)
@@ -18,22 +18,22 @@ PCHAR *GetSubkeyNames( PCHAR MainKeyName, PCHAR Append ) {
     if( Error ) return NULL;
 
     Error = RegQueryInfoKey
-        ( MainKey, 
-          NULL, NULL, NULL, 
-          &MaxSubKeys, &MaxSubKeyLen, 
+        ( MainKey,
+          NULL, NULL, NULL,
+          &MaxSubKeys, &MaxSubKeyLen,
           NULL, NULL, NULL, NULL, NULL, NULL );
 
     DH_DbgPrint(MID_TRACE,("MaxSubKeys: %d, MaxSubKeyLen %d\n",
                            MaxSubKeys, MaxSubKeyLen));
-    
+
     CharTotal = (sizeof(PCHAR) + MaxSubKeyLen + AppendLen) * (MaxSubKeys + 1);
-    
-    DH_DbgPrint(MID_TRACE,("AppendLen: %d, CharTotal: %d\n", 
+
+    DH_DbgPrint(MID_TRACE,("AppendLen: %d, CharTotal: %d\n",
                            AppendLen, CharTotal));
 
     Out = malloc( CharTotal );
     OutKeyName = ((PCHAR)&Out[MaxSubKeys+1]);
-    
+
     if( !Out ) { RegCloseKey( MainKey ); return NULL; }
 
     i = 0;
@@ -57,23 +57,23 @@ PCHAR RegReadString( HKEY Root, PCHAR Subkey, PCHAR Value ) {
     PCHAR SubOut = NULL;
     DWORD SubOutLen = 0, Error = 0;
     HKEY  ValueKey = NULL;
-    
+
     DH_DbgPrint(MID_TRACE,("Looking in %x:%s:%s\n", Root, Subkey, Value ));
 
     if( Subkey && strlen(Subkey) ) {
-        if( RegOpenKey( Root, Subkey, &ValueKey ) != ERROR_SUCCESS ) 
+        if( RegOpenKey( Root, Subkey, &ValueKey ) != ERROR_SUCCESS )
             goto regerror;
     } else ValueKey = Root;
 
     DH_DbgPrint(MID_TRACE,("Got Key %x\n", ValueKey));
 
-    if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL, 
+    if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL,
                                   (LPBYTE)SubOut, &SubOutLen )) != ERROR_SUCCESS )
         goto regerror;
 
     DH_DbgPrint(MID_TRACE,("Value %s has size %d\n", Value, SubOutLen));
 
-    if( !(SubOut = malloc(SubOutLen)) ) 
+    if( !(SubOut = malloc(SubOutLen)) )
         goto regerror;
 
     if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL,
@@ -99,10 +99,10 @@ cleanup:
 
 HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) {
     int i = 0;
-    PCHAR EnumKeyName = 
+    PCHAR EnumKeyName =
         "SYSTEM\\CurrentControlSet\\Control\\Class\\"
         "{4D36E972-E325-11CE-BFC1-08002BE10318}";
-    PCHAR TargetKeyNameStart = 
+    PCHAR TargetKeyNameStart =
         "SYSTEM\\CurrentControlSet\\Services\\";
     PCHAR TargetKeyNameEnd = "\\Parameters\\Tcpip";
     PCHAR TargetKeyName = NULL;
@@ -123,17 +123,17 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) {
             ( EnumKey, EnumKeysLinkage[i], "RootDevice" );
         DriverDesc = RegReadString
             ( EnumKey, EnumKeysTop[i], "DriverDesc" );
-        
-        if( DriverDesc && 
+
+        if( DriverDesc &&
             !strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) {
-            TargetKeyName = 
-                malloc( strlen( TargetKeyNameStart ) + 
+            TargetKeyName =
+                malloc( strlen( TargetKeyNameStart ) +
                         strlen( RootDevice ) +
                         strlen( TargetKeyNameEnd ) + 1 );
             if( !TargetKeyName ) goto cleanup;
-            sprintf( TargetKeyName, "%s%s%s", 
+            sprintf( TargetKeyName, "%s%s%s",
                      TargetKeyNameStart, RootDevice, TargetKeyNameEnd );
-            Error = RegOpenKey( HKEY_LOCAL_MACHINE, TargetKeyName, &OutKey ); 
+            Error = RegOpenKey( HKEY_LOCAL_MACHINE, TargetKeyName, &OutKey );
             break;
         } else {
             free( RootDevice ); RootDevice = 0;
@@ -169,7 +169,7 @@ BOOL PrepareAdapterForService( PDHCP_ADAPTER Adapter ) {
     if( IPAddress && strcmp( IPAddress, "0.0.0.0" ) ) {
         /* Non-automatic case */
         DH_DbgPrint
-            (MID_TRACE,("Adapter Name: [%s] (Bind Status %x) (static %s)\n", 
+            (MID_TRACE,("Adapter Name: [%s] (Bind Status %x) (static %s)\n",
                         Adapter->DhclientInfo.name,
                         Adapter->BindStatus,
                         IPAddress));
@@ -178,7 +178,7 @@ BOOL PrepareAdapterForService( PDHCP_ADAPTER Adapter ) {
 
         Netmask = RegReadString( AdapterKey, NULL, "Subnetmask" );
         if( !Netmask ) Netmask = "255.255.255.0";
-        
+
         Status = AddIPAddress( inet_addr( IPAddress ),
                                inet_addr( Netmask ),
                                Adapter->IfMib.dwIndex,
@@ -194,7 +194,7 @@ BOOL PrepareAdapterForService( PDHCP_ADAPTER Adapter ) {
             DefGatewayRow.dwForwardNextHop = inet_addr(DefaultGateway);
             Error = CreateIpForwardEntry( &DefGatewayRow );
             if( Error )
-                warning("Failed to set default gateway %s: %d\n", 
+                warning("Failed to set default gateway %s: %d\n",
                         DefaultGateway, Error);
         }
 
@@ -228,7 +228,7 @@ void AdapterInit() {
 
     DH_DbgPrint(MID_TRACE,("Getting Adapter List...\n"));
 
-    while( (Error = GetIfTable(Table, &Size, 0 )) == 
+    while( (Error = GetIfTable(Table, &Size, 0 )) ==
            ERROR_INSUFFICIENT_BUFFER ) {
         DH_DbgPrint(MID_TRACE,("Error %d, New Buffer Size: %d\n", Error, Size));
         free( Table );
@@ -240,50 +240,50 @@ void AdapterInit() {
     DH_DbgPrint(MID_TRACE,("Got Adapter List (%d entries)\n", Table->dwNumEntries));
 
     for( i = 0; i < Table->dwNumEntries; i++ ) {
-        DH_DbgPrint(MID_TRACE,("Getting adapter %d attributes\n", 
+        DH_DbgPrint(MID_TRACE,("Getting adapter %d attributes\n",
                                Table->table[i].dwIndex));
         Adapter = calloc( sizeof( DHCP_ADAPTER ) + Table->table[i].dwMtu, 1 );
-        
+
         if( Adapter && Table->table[i].dwType == MIB_IF_TYPE_ETHERNET ) {
-            memcpy( &Adapter->IfMib, &Table->table[i], 
+            memcpy( &Adapter->IfMib, &Table->table[i],
                     sizeof(Adapter->IfMib) );
             Adapter->DhclientInfo.client = &Adapter->DhclientState;
             Adapter->DhclientInfo.rbuf = Adapter->recv_buf;
             Adapter->DhclientInfo.rbuf_max = Table->table[i].dwMtu;
-            Adapter->DhclientInfo.rbuf_len = 
+            Adapter->DhclientInfo.rbuf_len =
                 Adapter->DhclientInfo.rbuf_offset = 0;
             memcpy(Adapter->DhclientInfo.hw_address.haddr,
                    Adapter->IfMib.bPhysAddr,
                    Adapter->IfMib.dwPhysAddrLen);
-            Adapter->DhclientInfo.hw_address.hlen  = 
+            Adapter->DhclientInfo.hw_address.hlen  =
                 Adapter->IfMib.dwPhysAddrLen;
 
             if( DhcpSocket == INVALID_SOCKET ) {
-                DhcpSocket = 
+                DhcpSocket =
                     Adapter->DhclientInfo.rfdesc =
                     Adapter->DhclientInfo.wfdesc =
                     socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
                 Adapter->ListenAddr.sin_family = AF_INET;
                 Adapter->ListenAddr.sin_port = htons(LOCAL_PORT);
-                Adapter->BindStatus = 
+                Adapter->BindStatus =
                     (bind( Adapter->DhclientInfo.rfdesc,
                            (struct sockaddr *)&Adapter->ListenAddr,
                            sizeof(Adapter->ListenAddr) ) == 0) ?
                     0 : WSAGetLastError();
             } else {
-                Adapter->DhclientInfo.rfdesc = 
+                Adapter->DhclientInfo.rfdesc =
                     Adapter->DhclientInfo.wfdesc = DhcpSocket;
             }
-            
+
             Adapter->DhclientConfig.timeout = DHCP_PANIC_TIMEOUT;
             Adapter->DhclientConfig.initial_interval = DHCP_DISCOVER_INTERVAL;
             Adapter->DhclientConfig.retry_interval = DHCP_DISCOVER_INTERVAL;
             Adapter->DhclientConfig.select_interval = 1;
             Adapter->DhclientConfig.reboot_timeout = DHCP_REBOOT_TIMEOUT;
             Adapter->DhclientConfig.backoff_cutoff = DHCP_BACKOFF_MAX;
-            Adapter->DhclientState.interval = 
+            Adapter->DhclientState.interval =
                 Adapter->DhclientConfig.retry_interval;
-            
+
             if( PrepareAdapterForService( Adapter ) ) {
                 Adapter->DhclientInfo.next = ifi;
                 ifi = &Adapter->DhclientInfo;
@@ -362,15 +362,15 @@ PDHCP_ADAPTER AdapterGetFirst() {
     }
 }
 
-PDHCP_ADAPTER AdapterGetNext( PDHCP_ADAPTER This ) 
-{ 
+PDHCP_ADAPTER AdapterGetNext( PDHCP_ADAPTER This )
+{
     if( This->ListEntry.Flink == &AdapterList ) return NULL;
     return CONTAINING_RECORD
         ( This->ListEntry.Flink, DHCP_ADAPTER, ListEntry );
 }
 
 void if_register_send(struct interface_info *ip) {
-    
+
 }
 
 void if_register_receive(struct interface_info *ip) {
index bf4be82..ca628bb 100644 (file)
@@ -38,8 +38,8 @@ DWORD DSLeaseIpAddress( PipeSendFunc Send, COMM_DHCP_REQ *Req ) {
     Reply.Reply = Adapter ? 1 : 0;
 
     if( Adapter ) {
-        add_protocol( Adapter->DhclientInfo.name, 
-                      Adapter->DhclientInfo.rfdesc, got_one, 
+        add_protocol( Adapter->DhclientInfo.name,
+                      Adapter->DhclientInfo.rfdesc, got_one,
                       &Adapter->DhclientInfo );
        Adapter->DhclientInfo.client->state = S_INIT;
        state_reboot(&Adapter->DhclientInfo);
index 1976130..8c77c35 100644 (file)
@@ -445,22 +445,22 @@ void set_name_servers( struct client_lease *new_lease ) {
         HKEY RegKey;
         struct iaddr nameserver;
         char *nsbuf;
-        int i, addrs = 
+        int i, addrs =
             new_lease->options[DHO_DOMAIN_NAME_SERVERS].len / sizeof(ULONG);
 
                /* XXX I'm setting addrs to 1 until we are ready up the chain */
                addrs = 1;
         nsbuf = malloc( addrs * sizeof(IP_ADDRESS_STRING) );
         nsbuf[0] = 0;
-        
+
         if( nsbuf && !RegOpenKeyEx
-            ( HKEY_LOCAL_MACHINE, 
-              "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", 
+            ( HKEY_LOCAL_MACHINE,
+              "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
               0, KEY_WRITE, &RegKey ) ) {
             for( i = 0; i < addrs; i++ ) {
                 nameserver.len = sizeof(ULONG);
-                memcpy( nameserver.iabuf, 
-                        new_lease->options[DHO_DOMAIN_NAME_SERVERS].data + 
+                memcpy( nameserver.iabuf,
+                        new_lease->options[DHO_DOMAIN_NAME_SERVERS].data +
                         (i * sizeof(ULONG)), sizeof(ULONG) );
                 strcat( nsbuf, piaddr(nameserver) );
                 if( i != addrs-1 ) strcat( nsbuf, "," );
@@ -475,7 +475,7 @@ void set_name_servers( struct client_lease *new_lease ) {
              */
             RegSetValueEx( RegKey, "NameServer", 0, REG_SZ,
                            (LPBYTE)nsbuf, strlen(nsbuf) + 1 );
-            
+
             free( nsbuf );
         }
     }
@@ -486,7 +486,7 @@ void setup_adapter( PDHCP_ADAPTER Adapter, struct client_lease *new_lease ) {
 
     if( Adapter->NteContext )
         DeleteIPAddress( Adapter->NteContext );
-    
+
     /* Set up our default router if we got one from the DHCP server */
     if( new_lease->options[DHO_SUBNET_MASK].len ) {
         NTSTATUS Status;
@@ -494,38 +494,38 @@ void setup_adapter( PDHCP_ADAPTER Adapter, struct client_lease *new_lease ) {
         memcpy( netmask.iabuf,
                 new_lease->options[DHO_SUBNET_MASK].data,
                 new_lease->options[DHO_SUBNET_MASK].len );
-        
+
         Status = AddIPAddress
             ( *((ULONG*)new_lease->address.iabuf),
               *((ULONG*)netmask.iabuf),
               Adapter->IfMib.dwIndex,
               &Adapter->NteContext,
               &Adapter->NteInstance );
-        
+
         if( !NT_SUCCESS(Status) )
             warning("AddIPAddress: %x\n", Status);
-    } 
-    
+    }
+
     if( new_lease->options[DHO_ROUTERS].len ) {
         MIB_IPFORWARDROW RouterMib;
         NTSTATUS Status;
-        
+
         RouterMib.dwForwardDest = 0; /* Default route */
         RouterMib.dwForwardMask = 0;
         RouterMib.dwForwardMetric1 = 1;
-        
+
         if( old_default_route ) {
             /* If we set a default route before, delete it before continuing */
             RouterMib.dwForwardDest = old_default_route;
             DeleteIpForwardEntry( &RouterMib );
         }
-        
-        RouterMib.dwForwardNextHop = 
+
+        RouterMib.dwForwardNextHop =
             *((ULONG*)new_lease->options[DHO_ROUTERS].data);
-        
+
         Status = CreateIpForwardEntry( &RouterMib );
-        
-        if( !NT_SUCCESS(Status) ) 
+
+        if( !NT_SUCCESS(Status) )
             warning("CreateIpForwardEntry: %x\n", Status);
         else
             old_default_route = RouterMib.dwForwardNextHop;
@@ -548,7 +548,7 @@ bind_lease(struct interface_info *ip)
     /* Timeout of zero means no timeout (some implementations seem to use
      * one day).
      */
-    if( ip->client->active->renewal - cur_time ) 
+    if( ip->client->active->renewal - cur_time )
         add_timeout(ip->client->active->renewal, state_bound, ip);
 
     note("bound to %s -- renewal in %d seconds.",
@@ -556,7 +556,7 @@ bind_lease(struct interface_info *ip)
          ip->client->active->renewal - cur_time);
 
     ip->client->state = S_BOUND;
-        
+
     Adapter = AdapterFindInfo( ip );
 
     if( Adapter )  setup_adapter( Adapter, new_lease );
@@ -1137,9 +1137,9 @@ cancel:
             /* Now do a preinit on the interface so that we can
                discover a new address. */
 
-            if( Adapter ) 
+            if( Adapter )
                 DeleteIPAddress( Adapter->NteContext );
-            
+
             ip->client->state = S_INIT;
             state_init(ip);
             return;
@@ -1622,7 +1622,7 @@ priv_script_init(char *reason, char *medium)
        struct interface_info *ip = ifi;
 
        if (ip) {
-            // XXX Do we need to do anything? 
+            // XXX Do we need to do anything?
         }
 }
 
@@ -1996,7 +1996,7 @@ ipv4addrs(char * buf)
     char *tmp;
     struct in_addr jnk;
     int i = 0;
-    
+
     note("Input: %s\n", buf);
 
     do {
index ea88fc8..c1a1b30 100644 (file)
@@ -1,5 +1,5 @@
 /* $Id:$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Service
  * FILE:            subsys/system/dhcp
@@ -47,12 +47,12 @@ LRESULT WINAPI ServiceThread( PVOID Data ) {
     while( GetMessage( &msg, 0, 0, 0 ) ) {
         switch( msg.message ) {
         case DHCP_MANAGEADAPTER:
-            
+
             break;
 
         case DHCP_UNMANAGEADAPTER:
             break;
-            
+
         case DHCP_REQUESTPARAM:
             break;
 
index 121daa9..439bc5b 100644 (file)
@@ -172,7 +172,7 @@ dispatch(void)
             if (ip && (l->handler != got_one || !ip->dead)) {
                 DH_DbgPrint
                     (MID_TRACE,
-                     ("set(%d) -> %s\n", 
+                     ("set(%d) -> %s\n",
                       l->fd, FD_ISSET(l->fd, &fds) ? "true" : "false"));
                 i++;
             }
@@ -192,7 +192,7 @@ dispatch(void)
 
         /* Get the current time... */
         time(&cur_time);
-        
+
         i = 0;
         for (l = protocols; l; l = l->next) {
             struct interface_info *ip;
@@ -453,7 +453,7 @@ remove_protocol(struct protocol *proto)
 }
 
 struct protocol *
-find_protocol_by_adapter(struct interface_info *info) 
+find_protocol_by_adapter(struct interface_info *info)
 {
     struct protocol *p;
 
index 3673948..fc99fe5 100644 (file)
@@ -99,7 +99,7 @@ void enter_host (hd)
                if (!tree_evaluate (hd -> group -> options
                                    [DHO_DHCP_CLIENT_IDENTIFIER]))
                        return;
-                       
+
                /* If there's no uid hash, make one; otherwise, see if
                   there's already an entry in the hash for this host. */
                if (!host_uid_hash) {
@@ -165,7 +165,7 @@ struct host_decl *find_hosts_by_uid (data, len)
    the addr pointer, update the host pointer to point at the host_decl
    that matched, and return the subnet that matched. */
 
-subnet *find_host_for_network (struct host_decl **host, iaddr *addr, 
+subnet *find_host_for_network (struct host_decl **host, iaddr *addr,
                                shared_network *share)
 {
        int i;
@@ -391,7 +391,7 @@ void enter_subnet (struct _subnet *subnet)
                   first. */
                if (subnet_inner_than (subnet, scan, 1)) {
                        if (prev) {
-                               prev -> next_subnet = subnet; 
+                               prev -> next_subnet = subnet;
                        } else
                                subnets = subnet;
                        subnet -> next_subnet = scan;
@@ -404,7 +404,7 @@ void enter_subnet (struct _subnet *subnet)
        subnet -> next_subnet = subnets;
        subnets = subnet;
 }
-       
+
 /* Enter a new shared network into the shared network list. */
 
 void enter_shared_network (shared_network *share)
@@ -413,7 +413,7 @@ void enter_shared_network (shared_network *share)
        share -> next = shared_networks;
        shared_networks = share;
 }
-       
+
 /* Enter a lease into the system.   This is called by the parser each
    time it reads in a new lease.   If the subnet for that lease has
    already been read in (usually the case), just update that lease;
@@ -548,7 +548,7 @@ int supersede_lease (struct _lease *comp, struct _lease *lease, int commit)
                        hw_hash_add (comp);
                }
 
-               /* Remove the lease from its current place in the 
+               /* Remove the lease from its current place in the
                   timeout sequence. */
                if (comp -> prev) {
                        comp -> prev -> next = comp -> next;
@@ -678,7 +678,7 @@ lease *find_lease_by_uid (unsigned char *uid, int len)
 
 lease *find_lease_by_hw_addr (unsigned char *hwaddr, int hwlen)
 {
-        struct _lease *lease = 
+        struct _lease *lease =
             (struct _lease *)hash_lookup (lease_hw_addr_hash,
                                           hwaddr, hwlen);
        return lease;
@@ -716,7 +716,7 @@ void uid_hash_add (lease *lease)
 
 void uid_hash_delete (lease *lease)
 {
-        struct _lease *head = 
+        struct _lease *head =
             find_lease_by_uid (lease -> uid, lease -> uid_len);
        struct _lease *scan;
 
@@ -856,7 +856,7 @@ struct class *find_class (type, name, len)
                                             ? user_class_hash
                                             : vendor_class_hash, name, len);
        return class;
-}      
+}
 
 struct group *clone_group (group, caller)
        struct group *group;
index dc84301..b7aa296 100644 (file)
@@ -18,7 +18,7 @@ DWORD CommThrId;
 
 DWORD PipeSend( COMM_DHCP_REPLY *Reply ) {
     DWORD Written = 0;
-    BOOL Success = 
+    BOOL Success =
         WriteFile( CommPipe,
                    Reply,
                    sizeof(*Reply),
@@ -40,15 +40,15 @@ DWORD WINAPI PipeThreadProc( LPVOID Parameter ) {
             case DhcpReqQueryHWInfo:
                 BytesWritten = DSQueryHWInfo( PipeSend, &Req );
                 break;
-                
+
             case DhcpReqLeaseIpAddress:
                 BytesWritten = DSLeaseIpAddress( PipeSend, &Req );
                 break;
-                
+
             case DhcpReqReleaseIpAddress:
                 BytesWritten = DSReleaseIpAddressLease( PipeSend, &Req );
                 break;
-                
+
             case DhcpReqRenewIpAddress:
                 BytesWritten = DSRenewIpAddressLease( PipeSend, &Req );
                 break;
index 3c7d398..849d049 100644 (file)
@@ -6,16 +6,16 @@ void SocketInit() {
     ServerSocket = socket( AF_INET, SOCK_DGRAM, 0 );
 }
 
-ssize_t send_packet( struct interface_info *ip, 
+ssize_t send_packet( struct interface_info *ip,
                      struct dhcp_packet *p,
                      size_t size,
                      struct in_addr addr,
                      struct sockaddr_in *broadcast,
                      struct hardware *hardware ) {
-    int result = 
+    int result =
         sendto( ip->wfdesc, (char *)p, size, 0,
                 (struct sockaddr *)broadcast, sizeof(*broadcast) );
-    
+
     if (result < 0) {
         note ("send_packet: %x", result);
         if (result == WSAENETUNREACH)
@@ -26,13 +26,13 @@ ssize_t send_packet( struct interface_info *ip,
     return result;
 }
 
-ssize_t receive_packet(struct interface_info *ip, 
+ssize_t receive_packet(struct interface_info *ip,
                        unsigned char *packet_data,
                        size_t packet_len,
-                       struct sockaddr_in *dest, 
+                       struct sockaddr_in *dest,
                        struct hardware *hardware ) {
     int recv_addr_size = sizeof(*dest);
-    int result = 
+    int result =
         recvfrom (ip -> rfdesc, (char *)packet_data, packet_len, 0,
                   (struct sockaddr *)dest, &recv_addr_size );
     return result;
index 9a49e5e..f721d08 100644 (file)
@@ -158,7 +158,7 @@ struct tree *tree_concat (left, right)
                free_tree (right, "tree_concat");
                return left;
        }
-                       
+
        /* Otherwise, allocate a new node to concatenate the two. */
        if (!(nt = new_tree ("tree_concat")))
                error ("No memory for data tree concatenation node.");
@@ -346,7 +346,7 @@ static TIME do_host_lookup (bufix, bufp, bufcount, dns)
        /* Count the number of addresses we got... */
        for (i = 0; h -> h_addr_list [i]; i++)
                ;
-       
+
        /* Do we need to allocate more memory? */
        new_len = i * h -> h_length;
        if (dns -> buf_len < i) {
index 0af5a50..d9ca76e 100644 (file)
@@ -14,7 +14,7 @@ int note( char *format, ... ) {
     int ret;
 
     ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
-    
+
     DbgPrint("NOTE: %s\n", buf);
 
     return ret;
@@ -27,11 +27,11 @@ int debug( char *format, ... ) {
     int ret;
 
     ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
-    
+
     DbgPrint("DEBUG: %s\n", buf);
 
     return ret;
-}    
+}
 
 int warn( char *format, ... ) {
     va_list arg_begin;
@@ -40,11 +40,11 @@ int warn( char *format, ... ) {
     int ret;
 
     ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
-    
+
     DbgPrint("WARN: %s\n", buf);
 
     return ret;
-}    
+}
 
 int warning( char *format, ... ) {
     va_list arg_begin;
@@ -53,7 +53,7 @@ int warning( char *format, ... ) {
     int ret;
 
     ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
-    
+
     DbgPrint("WARNING: %s\n", buf);
 
     return ret;
@@ -65,9 +65,9 @@ void error( char *format, ... ) {
     char buf[0x100];
 
     vsnprintf( buf, sizeof(buf), format, arg_begin );
-    
+
     DbgPrint("ERROR: %s\n", buf);
-}    
+}
 
 int16_t getShort( unsigned char *data ) {
     return (int16_t) ntohs(*(int16_t*) data);
index 4bb9e8f..2214e56 100644 (file)
 #define IDC_STATIC                      -1
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        169
index 5387fe1..08d11bc 100644 (file)
@@ -855,17 +855,17 @@ handle_exception (int exceptionVector)
   *ptr++ = hexchars[sigval >> 4];
   *ptr++ = hexchars[sigval & 0xf];
 
-  *ptr++ = hexchars[ESP]; 
+  *ptr++ = hexchars[ESP];
   *ptr++ = ':';
   ptr = mem2hex((char *)&registers[ESP], ptr, 4, 0);   /* SP */
   *ptr++ = ';';
 
-  *ptr++ = hexchars[EBP]; 
+  *ptr++ = hexchars[EBP];
   *ptr++ = ':';
   ptr = mem2hex((char *)&registers[EBP], ptr, 4, 0);   /* FP */
   *ptr++ = ';';
 
-  *ptr++ = hexchars[PC]; 
+  *ptr++ = hexchars[PC];
   *ptr++ = ':';
   ptr = mem2hex((char *)&registers[PC], ptr, 4, 0);    /* PC */
   *ptr++ = ';';
index 32c64ac..73ff5a7 100644 (file)
@@ -73,7 +73,7 @@ struct Pane : public SubclassedWindow
 #define COLUMNS 12
        int     _widths[COLUMNS];
        int     _positions[COLUMNS+1];
-               
+
        WindowHandle _hwndHeader;
 
        Entry*  _root;
index 315a4e7..6ddf4f6 100644 (file)
@@ -827,7 +827,7 @@ struct ANSUNC DWebBrowserEvents2Impl : public SimpleComObject,
                        _callback->WindowSetWidth(Variant(pDispParams->rgvarg[0]));
                        break;
 
-                 case DISPID_WINDOWSETHEIGHT:  // sent when the put_height method is called on the WebOC 
+                 case DISPID_WINDOWSETHEIGHT:  // sent when the put_height method is called on the WebOC
                        if (pDispParams->cArgs != 1)
                                return E_INVALIDARG;
                        _callback->WindowSetHeight(Variant(pDispParams->rgvarg[0]));
index cd762a4..2593e23 100644 (file)
@@ -41,7 +41,7 @@
 
  /// quick launch bar shortcut
 struct QuickLaunchEntry
-{      
+{
        QuickLaunchEntry();
 
        HBITMAP _hbmp;
index 76512ee..2e2dc74 100644 (file)
@@ -48,7 +48,7 @@
 
  /// internal task bar button management entry
 struct TaskBarEntry
-{      
+{
        TaskBarEntry();
 
        int             _id;    // ID for WM_COMMAND
index 344a686..14ffe59 100644 (file)
@@ -183,7 +183,7 @@ public:
        virtual ~IDropTargetImpl();
 
        void AddSuportedFormat(FORMATETC& ftetc) {m_formatetc.push_back(ftetc);}
-       
+
        //return values: true - release the medium. false - don't release the medium
        virtual bool OnDrop(FORMATETC* pFmtEtc, STGMEDIUM& medium, DWORD *pdwEffect) = 0;
 
@@ -260,7 +260,7 @@ public:
        }
 
     HRESULT InitializeFromWindow(HWND hwnd, POINT& pt,IDataObject* pDataObject)
-       {               
+       {
                if (pDragSourceHelper == NULL)
                        return E_FAIL;
                return pDragSourceHelper->InitializeFromWindow(hwnd, &pt, pDataObject);
index 0e1f6ff..b7c6e12 100644 (file)
@@ -19,7 +19,7 @@
 
  //
  // Explorer clone
- // 
+ //
  // shellclasses.h
  //
  // C++ wrapper classes for COM interfaces and shell objects
@@ -733,7 +733,7 @@ struct ShellPath : public SShellPtr<ITEMIDLIST>
                        _p = (ITEMIDLIST*) _malloc->Alloc(l);
                        if (_p) memcpy(_p, pidl, l);
                } else
-                       _p = NULL; 
+                       _p = NULL;
 
                _malloc->Free(h);
        }
index 1e60a73..89bac6c 100644 (file)
@@ -555,7 +555,7 @@ template<typename BASE> struct ResizeController : public BASE
                        prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top-
                                2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))-
                                GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE);
-               }   
+               }
        }
 
 protected:
@@ -619,7 +619,7 @@ template<typename BASE> struct CtlColorParent : public BASE
 
 #define        PM_DISPATCH_DRAWITEM    (WM_APP+0x09)
 
- /// draw message routing for ColorButton and PictureButton 
+ /// draw message routing for ColorButton and PictureButton
 template<typename BASE> struct OwnerDrawParent : public BASE
 {
        typedef BASE super;
index c29512d..3f01a85 100755 (executable)
@@ -55,9 +55,9 @@ SIZEDEFINITION LegalSizes[] = {
 void PrintWin32Error( PWCHAR Message, DWORD ErrorCode )
 {
        LPWSTR lpMsgBuf;
+
        FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-                                       NULL, ErrorCode, 
+                                       NULL, ErrorCode,
                                        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                                        (PWCHAR) &lpMsgBuf, 0, NULL );
        printf("%S: %S\n", Message, lpMsgBuf );
@@ -66,7 +66,7 @@ void PrintWin32Error( PWCHAR Message, DWORD ErrorCode )
 
 
 //----------------------------------------------------------------------
-// 
+//
 // Usage
 //
 // Tell the user how to use the program
@@ -80,7 +80,7 @@ VOID Usage( PWCHAR ProgramName )
        printf("  -V:label         Specifies volume label.\n");
        printf("  -Q               Performs a quick format.\n");
        printf("  -A:size          Overrides the default allocation unit size. Default settings\n");
-       printf("                   are strongly recommended for general use\n"); 
+       printf("                   are strongly recommended for general use\n");
        printf("                   NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.\n");
        printf("                   FAT supports 8192, 16K, 32K, 64K, 128K, 256K.\n");
        printf("                   NTFS compression is not supported for allocation unit sizes\n");
@@ -125,7 +125,7 @@ int ParseCommandLine( int argc, WCHAR *argv[] )
                        } else if( !wcsnicmp( &argv[i][1], L"A:", 2 )) {
 
                                if( gotSize ) return -1;
-                               j = 0; 
+                               j = 0;
                                while( LegalSizes[j].ClusterSize &&
                                         wcsicmp( LegalSizes[j].SizeString, &argv[i][3] )) j++;
 
@@ -184,7 +184,7 @@ FormatExCallback (CALLBACKCOMMAND Command,
        PTEXTOUTPUT output;
        PBOOLEAN status;
 
-       // 
+       //
        // We get other types of commands, but we don't have to pay attention to them
        //
        switch( Command ) {
@@ -251,11 +251,11 @@ BOOLEAN LoadFMIFSEntryPoints()
 }
 
 //----------------------------------------------------------------------
-// 
+//
 // WMain
 //
-// Engine. Just get command line switches and fire off a format. This 
-// could also be done in a GUI like Explorer does when you select a 
+// Engine. Just get command line switches and fire off a format. This
+// could also be done in a GUI like Explorer does when you select a
 // drive and run a check on it.
 //
 // We do this in UNICODE because the chkdsk command expects PWCHAR
@@ -294,7 +294,7 @@ int wmain( int argc, WCHAR *argv[] )
                return -1;
        }
 
-       // 
+       //
        // Get the drive's format
        //
        if( !Drive ) {
@@ -331,16 +331,16 @@ int wmain( int argc, WCHAR *argv[] )
        //
        // Determine the drive's file system format
        //
-       if( !GetVolumeInformationW( RootDirectory, 
-                                               volumeName, sizeof(volumeName)/2, 
-                                               &serialNumber, &maxComponent, &flags, 
+       if( !GetVolumeInformationW( RootDirectory,
+                                               volumeName, sizeof(volumeName)/2,
+                                               &serialNumber, &maxComponent, &flags,
                                                fileSystem, sizeof(fileSystem)/2)) {
 
                PrintWin32Error( L"Could not query volume", GetLastError());
                return -1;
        }
 
-       if( !GetDiskFreeSpaceExW( RootDirectory, 
+       if( !GetDiskFreeSpaceExW( RootDirectory,
                        &freeBytesAvailableToCaller,
                        &totalNumberOfBytes,
                        &totalNumberOfFreeBytes )) {
@@ -362,7 +362,7 @@ int wmain( int argc, WCHAR *argv[] )
                                printf("Enter current volume label for drive %C: ", RootDirectory[0] );
                                fgetws( input, sizeof(input)/2, stdin );
                                input[ wcslen( input ) - 1] = 0;
-                               
+
                                if( !wcsicmp( input, volumeName )) {
 
                                        break;
@@ -377,41 +377,41 @@ int wmain( int argc, WCHAR *argv[] )
                        printf("DRIVE %C: WILL BE LOST!\n", RootDirectory[0] );
                        printf("Proceed with Format (Y/N)? " );
                        fgetws( input, sizeof(input)/2, stdin );
-               
+
                        if( input[0] == L'Y' || input[0] == L'y' ) break;
 
                        if(     input[0] == L'N' || input[0] == L'n' ) {
-                               
+
                                printf("\n");
                                return 0;
                        }
                }
                media = FMIFS_HARDDISK;
-       } 
+       }
 
        //
        // Tell the user we're doing a long format if appropriate
        //
        if( !QuickFormat ) {
-               
+
                if( totalNumberOfBytes.QuadPart > 1024*1024*10 ) {
-                       
+
                        printf("Verifying %luM\n", (DWORD) (totalNumberOfBytes.QuadPart/(1024*1024)));
-                       
+
                } else {
 
-                       printf("Verifying %.1fM\n", 
+                       printf("Verifying %.1fM\n",
                                ((float)(LONGLONG)totalNumberOfBytes.QuadPart)/(float)(1024.0*1024.0));
                }
        } else  {
 
                if( totalNumberOfBytes.QuadPart > 1024*1024*10 ) {
-                       
+
                        printf("QuickFormatting %luM\n", (DWORD) (totalNumberOfBytes.QuadPart/(1024*1024)));
-                       
+
                } else {
 
-                       printf("QuickFormatting %.2fM\n", 
+                       printf("QuickFormatting %.2fM\n",
                                ((float)(LONGLONG)totalNumberOfBytes.QuadPart)/(float)(1024.0*1024.0));
                }
                printf("Creating file system structures.\n");
@@ -419,7 +419,7 @@ int wmain( int argc, WCHAR *argv[] )
 
        //
        // Format away!
-       //                      
+       //
        FormatEx( RootDirectory, media, Format, Label, QuickFormat,
                        ClusterSize, FormatExCallback );
        if( Error ) return -1;
@@ -449,22 +449,22 @@ int wmain( int argc, WCHAR *argv[] )
 
                        PrintWin32Error(L"Could not label volume", GetLastError());
                        return -1;
-               }       
+               }
        }
 
-       if( !GetVolumeInformationW( RootDirectory, 
-                                               volumeName, sizeof(volumeName)/2, 
-                                               &serialNumber, &maxComponent, &flags, 
+       if( !GetVolumeInformationW( RootDirectory,
+                                               volumeName, sizeof(volumeName)/2,
+                                               &serialNumber, &maxComponent, &flags,
                                                fileSystem, sizeof(fileSystem)/2)) {
 
                PrintWin32Error( L"Could not query volume", GetLastError());
                return -1;
        }
 
-       // 
+       //
        // Print out some stuff including the formatted size
        //
-       if( !GetDiskFreeSpaceExW( RootDirectory, 
+       if( !GetDiskFreeSpaceExW( RootDirectory,
                        &freeBytesAvailableToCaller,
                        &totalNumberOfBytes,
                        &totalNumberOfFreeBytes )) {
@@ -479,9 +479,9 @@ int wmain( int argc, WCHAR *argv[] )
        //
        // Get the drive's serial number
        //
-       if( !GetVolumeInformationW( RootDirectory, 
-                                               volumeName, sizeof(volumeName)/2, 
-                                               &serialNumber, &maxComponent, &flags, 
+       if( !GetVolumeInformationW( RootDirectory,
+                                               volumeName, sizeof(volumeName)/2,
+                                               &serialNumber, &maxComponent, &flags,
                                                fileSystem, sizeof(fileSystem)/2)) {
 
                PrintWin32Error( L"Could not query volume", GetLastError());
@@ -489,7 +489,7 @@ int wmain( int argc, WCHAR *argv[] )
        }
        printf("\nVolume Serial Number is %04X-%04X\n", (unsigned int)(serialNumber >> 16),
                                        (unsigned int)(serialNumber & 0xFFFF) );
-                       
+
        return 0;
 }
 
index bd56879..73b9ea6 100644 (file)
@@ -538,7 +538,7 @@ template<typename BASE> struct ResizeController : public BASE
                        prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top-
                                2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))-
                                GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE);
-               }   
+               }
        }
 
 protected:
@@ -602,7 +602,7 @@ template<typename BASE> struct CtlColorParent : public BASE
 
 #define        PM_DISPATCH_DRAWITEM    (WM_APP+0x09)
 
- /// draw message routing for ColorButton and PictureButton 
+ /// draw message routing for ColorButton and PictureButton
 template<typename BASE> struct OwnerDrawParent : public BASE
 {
        typedef BASE super;
index 3ffc2a3..e2ceb6f 100644 (file)
@@ -827,7 +827,7 @@ struct ANSUNC DWebBrowserEvents2Impl : public SimpleComObject,
                        _callback->WindowSetWidth(Variant(pDispParams->rgvarg[0]));
                        break;
 
-                 case DISPID_WINDOWSETHEIGHT:  // sent when the put_height method is called on the WebOC 
+                 case DISPID_WINDOWSETHEIGHT:  // sent when the put_height method is called on the WebOC
                        if (pDispParams->cArgs != 1)
                                return E_INVALIDARG;
                        _callback->WindowSetHeight(Variant(pDispParams->rgvarg[0]));
index 8faac37..4845790 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
  *
  * reactos/subsys/system/lsass/lsass.c
- * 
+ *
  * ReactOS Operating System
- * 
+ *
  * --------------------------------------------------------------------
  *
  * This software is free software; you can redistribute it and/or
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.LIB. If not, write
  * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- * MA 02139, USA.  
+ * MA 02139, USA.
  *
  * --------------------------------------------------------------------
- * 
+ *
  *     19990704 (Emanuele Aliberti)
  *             Compiled successfully with egcs 1.1.2
  */
index 9c352d4..e7e2977 100644 (file)
@@ -385,15 +385,15 @@ VOID DIALOG_FilePrint(VOID)
     hdrFont.lfQuality = PROOF_QUALITY;
     hdrFont.lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN;
     lstrcpy(hdrFont.lfFaceName, times_new_romanW);
-    
+
     font = CreateFontIndirect(&hdrFont);
-    
+
     /* Get Current Settings */
     ZeroMemory(&printer, sizeof(printer));
     printer.lStructSize           = sizeof(printer);
     printer.hwndOwner             = Globals.hMainWnd;
     printer.hInstance             = Globals.hInstance;
-    
+
     /* Set some default flags */
     printer.Flags                 = PD_RETURNDC;
     printer.nFromPage             = 0;
@@ -414,10 +414,10 @@ VOID DIALOG_FilePrint(VOID)
     di.lpszDocName = Globals.szFileTitle;
     di.lpszOutput = NULL;
     di.lpszDatatype = NULL;
-    di.fwType = 0; 
+    di.fwType = 0;
 
     if (StartDoc(printer.hDC, &di) <= 0) return;
-    
+
     /* Get the page dimensions in pixels. */
     cWidthPels = GetDeviceCaps(printer.hDC, HORZRES);
     cHeightPels = GetDeviceCaps(printer.hDC, VERTRES);
@@ -431,7 +431,7 @@ VOID DIALOG_FilePrint(VOID)
         return;
     }
     size = GetWindowText(Globals.hEdit, pTemp, size);
-    
+
     border = 150;
     for (copycount=1; copycount <= printer.nCopies; copycount++) {
         i = 0;
@@ -445,10 +445,10 @@ VOID DIALOG_FilePrint(VOID)
                 dopage = 1;
             else
                 dopage = 0;
-            
+
             old_font = SelectObject(printer.hDC, font);
             GetTextExtentPoint32(printer.hDC, letterM, 1, &szMetric);
-                
+
             if (dopage) {
                 if (StartPage(printer.hDC) <= 0) {
                     static const WCHAR failedW[] = { 'S','t','a','r','t','P','a','g','e',' ','f','a','i','l','e','d',0 };
@@ -463,14 +463,14 @@ VOID DIALOG_FilePrint(VOID)
                 */
                 TextOut(printer.hDC, border*2, border+szMetric.cy/2, Globals.szFileTitle, lstrlen(Globals.szFileTitle));
             }
-            
+
             /* The starting point for the main text */
             xLeft = border*2;
             yTop = border+szMetric.cy*4;
-            
+
             SelectObject(printer.hDC, old_font);
-            GetTextExtentPoint32(printer.hDC, letterM, 1, &szMetric); 
-            
+            GetTextExtentPoint32(printer.hDC, letterM, 1, &szMetric);
+
             /* Since outputting strings is giving me problems, output the main
             text one character at a time.
             */
@@ -485,7 +485,7 @@ VOID DIALOG_FilePrint(VOID)
                     xLeft += szMetric.cx;
                 }
             } while (i++<size && yTop<(cHeightPels-border*2));
-            
+
             if (dopage)
                 EndPage(printer.hDC);
             pagecount++;
index 327432d..18c9faf 100644 (file)
@@ -76,7 +76,7 @@ static int NOTEPAD_MenuCommand(WPARAM wParam)
 
     case CMD_SEARCH:           DIALOG_Search(); break;
     case CMD_SEARCH_NEXT:      DIALOG_SearchNext(); break;
-                               
+
     case CMD_WRAP:             DIALOG_EditWrap(); break;
     case CMD_FONT:             DIALOG_SelectFont(); break;
 
@@ -206,7 +206,7 @@ static void HandleCommandLine(LPWSTR cmdline)
 {
     WCHAR delimiter;
     int opt_print=0;
-    
+
     /* skip white space */
     while (*cmdline == ' ') cmdline++;
 
index 04040f3..d06ef86 100644 (file)
@@ -49,7 +49,7 @@ static void draw_splitbar(HWND hWnd, int x)
     RECT rt;
     HGDIOBJ OldObj;
     HDC hdc = GetDC(hWnd);
-    
+
     if(!SizingPattern)
     {
       const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
@@ -144,7 +144,7 @@ ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
         TCHAR buffer[MAX_PATH];
         /* load "My Computer" string */
         LoadString(hInst, IDS_MY_COMPUTER, buffer, sizeof(buffer)/sizeof(TCHAR));
-        
+
        g_pChildWnd = pChildWnd = HeapAlloc(GetProcessHeap(), 0, sizeof(ChildWnd));
         if (!pChildWnd) return 0;
         _tcsncpy(pChildWnd->szPath, buffer, MAX_PATH);
@@ -240,7 +240,7 @@ ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
             {
               SizingBrush = CreatePatternBrush(SizingPattern);
             }
-            
+
             pt = MAKEPOINTS(lParam);
             GetClientRect(hWnd, &rt);
             pt.x = min(max(pt.x, SPLIT_MIN), rt.right - SPLIT_MIN);
@@ -317,7 +317,7 @@ ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
             }
         }
         break;
-    
+
     case WM_CONTEXTMENU:
     {
       POINTS pt;
@@ -343,13 +343,13 @@ ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
             EnableMenuItem(mnu, ID_EDIT_RENAME, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
           EnableMenuItem(mnu, ID_EDIT_MODIFY, MF_BYCOMMAND | (cnt == 1 ? MF_ENABLED : MF_DISABLED | MF_GRAYED));
           EnableMenuItem(mnu, ID_EDIT_MODIFY_BIN, MF_BYCOMMAND | (cnt == 1 ? MF_ENABLED : MF_DISABLED | MF_GRAYED));
-          
+
           TrackPopupMenu(mnu, TPM_RIGHTBUTTON, pt.x, pt.y, 0, hFrameWnd, NULL);
         }
       }
       break;
     }
-    
+
     case WM_SIZE:
         if (wParam != SIZE_MINIMIZED && pChildWnd != NULL) {
             ResizeWnd(pChildWnd, LOWORD(lParam), HIWORD(lParam));
index 3d0ee68..92e4676 100644 (file)
@@ -516,7 +516,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
         {
             DWORD llen, listlen, nl_len;
             LPTSTR src, lines = NULL;
-            
+
            if (!(stringValueData = HeapAlloc(GetProcessHeap(), 0, valueDataLen)))
             {
                 error(hwnd, IDS_TOO_BIG_VALUE, valueDataLen);
@@ -528,7 +528,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
                 error(hwnd, IDS_BAD_VALUE, valueName);
                 goto done;
             }
-            
+
            /* convert \0 to \r\n */
             src = stringValueData;
             nl_len = _tcslen(_T("\r\n")) * sizeof(TCHAR);
@@ -561,7 +561,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
                 BOOL EmptyLines = FALSE;
                 LPTSTR src, lines, nl;
                 DWORD linechars, buflen, c_nl, dest;
-                
+
                 src = stringValueData;
                 buflen = sizeof(TCHAR);
                 lines = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buflen + sizeof(TCHAR));
@@ -598,12 +598,12 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
                     src += linechars + (nl != NULL ? c_nl : 0);
                 }
                 lines[++dest] = _T('\0');
-                
+
                 if(EmptyLines)
                 {
                     warning(hwnd, IDS_MULTI_SZ_EMPTY_STRING);
                 }
-                
+
                lRet = RegSetValueEx(hKey, valueName, 0, type, (LPBYTE)lines, buflen);
                HeapFree(GetProcessHeap(), 0, lines);
             }
@@ -636,7 +636,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
         #ifndef UNICODE
         LPWSTR u_valuename;
         int len_vname = lstrlen(valueName);
-        
+
        if(len_vname > 0)
         {
           if(!(u_valuename = HeapAlloc(GetProcessHeap(), 0, (len_vname + 1) * sizeof(WCHAR))))
@@ -658,7 +658,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCTSTR valueName, BOOL EditBin)
               error(hwnd, IDS_TOO_BIG_VALUE, valueDataLen);
               goto done;
             }
-           
+
            /* force to use the unicode version, so editing strings in binary mode is correct */
            lRet = RegQueryValueExW(hKey,
                                    #ifndef UNICODE
index 71a7b5d..da7ec43 100644 (file)
@@ -217,7 +217,7 @@ void
 BuildFilterStrings(TCHAR *Filter, PFILTERPAIR Pairs, int PairCount)
 {
   int i, c;
-  
+
   c = 0;
   for(i = 0; i < PairCount; i++)
   {
@@ -233,12 +233,12 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
 {
     FILTERPAIR FilterPairs[3];
     static TCHAR Filter[1024];
-    
+
     memset(pofn, 0, sizeof(OPENFILENAME));
     pofn->lStructSize = sizeof(OPENFILENAME);
     pofn->hwndOwner = hWnd;
     pofn->hInstance = hInst;
-    
+
     /* create filter string */
     FilterPairs[0].DisplayID = IDS_FLT_REGFILES;
     FilterPairs[0].FilterID = IDS_FLT_REGFILES_FLT;
@@ -247,7 +247,7 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
     FilterPairs[2].DisplayID = IDS_FLT_ALLFILES;
     FilterPairs[2].FilterID = IDS_FLT_ALLFILES_FLT;
     BuildFilterStrings(Filter, FilterPairs, sizeof(FilterPairs) / sizeof(FILTERPAIR));
-    
+
     pofn->lpstrFilter = Filter;
     pofn->lpstrCustomFilter = CustomFilterBuffer;
     pofn->nMaxCustFilter = MAX_CUSTOM_FILTER_SIZE;
@@ -326,7 +326,7 @@ static BOOL ExportRegistryFile(HWND hWnd)
     ofn.lpfnHook = ImportRegistryFile_OFNHookProc;
     ofn.lpTemplateName = MAKEINTRESOURCE(IDD_DIALOG1);
     if (GetSaveFileName(&ofn)) {
-        BOOL result;   
+        BOOL result;
         /* FIXME - convert strings to ascii! */
         result = export_registry_key((CHAR*)ofn.lpstrFile, (CHAR*)ExportKeyPath);
         /*result = export_registry_key(ofn.lpstrFile, NULL);*/
@@ -482,7 +482,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     REGSAM regsam = KEY_READ;
     LONG lRet;
     int item;
-    
+
     switch (LOWORD(wParam)) {
     case ID_REGISTRY_IMPORTREGISTRYFILE:
         ImportRegistryFile(hWnd);
@@ -529,7 +529,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     case ID_EDIT_MODIFY:
     case ID_EDIT_MODIFY_BIN:
     case ID_EDIT_DELETE:
-        regsam |= KEY_WRITE; 
+        regsam |= KEY_WRITE;
         break;
     }
 
@@ -570,7 +570,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
           if(MessageBox(g_pChildWnd->hWnd, msg, caption, MB_ICONQUESTION | MB_YESNO) == IDYES)
           {
             int ni, errs;
-            
+
            item = -1;
            errs = 0;
             while((ni = ListView_GetNextItem(g_pChildWnd->hListWnd, item, LVNI_SELECTED)) > -1)
@@ -582,7 +582,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
               }
              item = ni;
             }
-            
+
             RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath);
             if(errs > 0)
             {
@@ -625,7 +625,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     default:
         result = FALSE;
     }
-    
+
     if(hKey)
       RegCloseKey(hKey);
     return result;
index a363752..9285fdb 100644 (file)
@@ -41,11 +41,11 @@ typedef struct
   INT CharWidth;
   HFONT hFont;
   BOOL SbVisible;
-  
+
   INT LeftMargin;
   INT AddressSpacing;
   INT SplitSpacing;
-  
+
   BOOL EditingField;
   INT CaretCol;
   INT CaretLine;
@@ -67,7 +67,7 @@ STDCALL
 RegisterHexEditorClass(HINSTANCE hInstance)
 {
   WNDCLASSEX WndClass;
-  
+
   ZeroMemory(&WndClass, sizeof(WNDCLASSEX));
   WndClass.cbSize = sizeof(WNDCLASSEX);
   WndClass.style = CS_DBLCLKS;
@@ -77,7 +77,7 @@ RegisterHexEditorClass(HINSTANCE hInstance)
   WndClass.hCursor = LoadCursor(0, IDC_IBEAM);
   WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
   WndClass.lpszClassName = HEX_EDIT_CLASS_NAME;
-  
+
   return RegisterClassEx(&WndClass);
 }
 
@@ -94,11 +94,11 @@ static VOID
 HEXEDIT_MoveCaret(PHEXEDIT_DATA hed, BOOL Scroll)
 {
   SCROLLINFO si;
-  
+
   si.cbSize = sizeof(SCROLLINFO);
   si.fMask = SIF_POS;
   GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
-  
+
   if(Scroll)
   {
     if(si.nPos > hed->CaretLine)
@@ -110,13 +110,13 @@ HEXEDIT_MoveCaret(PHEXEDIT_DATA hed, BOOL Scroll)
     }
     else if(hed->CaretLine >= (hed->nVisibleLinesComplete + si.nPos))
     {
-      si.nPos = hed->CaretLine - hed->nVisibleLinesComplete + 1; 
+      si.nPos = hed->CaretLine - hed->nVisibleLinesComplete + 1;
       SetScrollInfo(hed->hWndSelf, SB_VERT, &si, TRUE);
       GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
       InvalidateRect(hed->hWndSelf, NULL, TRUE);
     }
   }
-  
+
   if(hed->EditingField)
     SetCaretPos(hed->LeftMargin + ((4 + hed->AddressSpacing + (3 * hed->CaretCol)) * hed->CharWidth) - 1, (hed->CaretLine - si.nPos) * hed->LineHeight);
   else
@@ -130,17 +130,17 @@ HEXEDIT_Update(PHEXEDIT_DATA hed)
   RECT rcClient;
   BOOL SbVisible;
   DWORD bufsize, cvislines;
-  
+
   GetClientRect(hed->hWndSelf, &rcClient);
   hed->style = GetWindowLong(hed->hWndSelf, GWL_STYLE);
-  
+
   bufsize = (hed->hBuffer ? LocalSize(hed->hBuffer) : 0);
   hed->nLines = max(bufsize / hed->ColumnsPerLine, 1);
   if(bufsize > hed->ColumnsPerLine && (bufsize % hed->ColumnsPerLine) > 0)
   {
     hed->nLines++;
   }
-  
+
   if(hed->LineHeight > 0)
   {
     hed->nVisibleLinesComplete = cvislines = rcClient.bottom / hed->LineHeight;
@@ -154,10 +154,10 @@ HEXEDIT_Update(PHEXEDIT_DATA hed)
   {
     hed->nVisibleLines = cvislines = 0;
   }
-  
+
   SbVisible = bufsize > 0 && cvislines < hed->nLines;
   ShowScrollBar(hed->hWndSelf, SB_VERT, SbVisible);
-  
+
   /* update scrollbar */
   si.cbSize = sizeof(SCROLLINFO);
   si.fMask = SIF_RANGE | SIF_PAGE;
@@ -165,12 +165,12 @@ HEXEDIT_Update(PHEXEDIT_DATA hed)
   si.nMax = ((bufsize > 0) ? hed->nLines - 1 : 0);
   si.nPage = ((hed->LineHeight > 0) ? rcClient.bottom / hed->LineHeight : 0);
   SetScrollInfo(hed->hWndSelf, SB_VERT, &si, TRUE);
-  
+
   if(IsWindowVisible(hed->hWndSelf) && SbVisible != hed->SbVisible)
   {
     InvalidateRect(hed->hWndSelf, NULL, TRUE);
   }
-  
+
   hed->SbVisible = SbVisible;
 }
 
@@ -190,9 +190,9 @@ HEXEDIT_PaintLines(PHEXEDIT_DATA hed, HDC hDC, DWORD ScrollPos, DWORD First, DWO
   UINT bufsize;
   TCHAR hex[3], addr[17];
   RECT rct;
-  
+
   FillRect(hDC, rc, (HBRUSH)(COLOR_WINDOW + 1));
-  
+
   if(hed->hBuffer)
   {
     bufsize = LocalSize(hed->hBuffer);
@@ -202,7 +202,7 @@ HEXEDIT_PaintLines(PHEXEDIT_DATA hed, HDC hDC, DWORD ScrollPos, DWORD First, DWO
   {
     buf = NULL;
     bufsize = 0;
-    
+
     if(ScrollPos + First == 0)
     {
       /* draw address */
@@ -210,7 +210,7 @@ HEXEDIT_PaintLines(PHEXEDIT_DATA hed, HDC hDC, DWORD ScrollPos, DWORD First, DWO
       TextOut(hDC, hed->LeftMargin, First * hed->LineHeight, addr, 4);
     }
   }
-  
+
   if(buf)
   {
     end = buf + bufsize;
@@ -218,25 +218,25 @@ HEXEDIT_PaintLines(PHEXEDIT_DATA hed, HDC hDC, DWORD ScrollPos, DWORD First, DWO
     linestart = (ScrollPos + First) * hed->ColumnsPerLine;
     current = buf + linestart;
     Last = min(hed->nLines - ScrollPos, Last);
-    
+
     while(First <= Last && current < end)
     {
       DWORD dh;
-      
+
       dx = hed->LeftMargin;
-      
+
       /* draw address */
       _stprintf(addr, _T("%04X"), linestart);
       TextOut(hDC, dx, dy, addr, 4);
-      
+
       dx += ((4 + hed->AddressSpacing) * hed->CharWidth);
       dh = (3 * hed->CharWidth);
-      
+
       rct.left = dx;
       rct.top = dy;
       rct.right = rct.left + dh;
       rct.bottom = dy + hed->LineHeight;
-      
+
       /* draw hex map */
       dx += (hed->CharWidth / 2);
       line = current;
@@ -244,12 +244,12 @@ HEXEDIT_PaintLines(PHEXEDIT_DATA hed, HDC hDC, DWORD ScrollPos, DWORD First, DWO
       {
         rct.left += dh;
         rct.right += dh;
-        
+
        _stprintf(hex, _T("%02X"), *(current++));
        ExtTextOut(hDC, dx, dy, ETO_OPAQUE, &rct, hex, 2, NULL);
        dx += dh;
       }
-      
+
       /* draw ascii map */
       dx = ((4 + hed->AddressSpacing + hed->SplitSpacing + (hed->ColumnsPerLine * 3)) * hed->CharWidth);
       current = line;
@@ -260,13 +260,13 @@ HEXEDIT_PaintLines(PHEXEDIT_DATA hed, HDC hDC, DWORD ScrollPos, DWORD First, DWO
        TextOut(hDC, dx, dy, hex, 1);
        dx += hed->CharWidth;
       }
-      
+
       dy += hed->LineHeight;
       linestart += hed->ColumnsPerLine;
       First++;
     }
   }
-  
+
   LocalUnlock(hed->hBuffer);
 }
 
@@ -275,47 +275,47 @@ HEXEDIT_HitRegionTest(PHEXEDIT_DATA hed, POINTS pt)
 {
   WINDOWINFO wi;
   int d;
-  
+
   if(pt.x <= hed->LeftMargin)
   {
     return HEHT_LEFTMARGIN;
   }
-  
+
   pt.x -= hed->LeftMargin;
   d = (4 * hed->CharWidth);
   if(pt.x <= d)
   {
     return HEHT_ADDRESS;
   }
-  
+
   pt.x -= d;
   d = (hed->AddressSpacing * hed->CharWidth);
   if(pt.x <= d)
   {
     return HEHT_ADDRESSSPACING;
   }
-  
+
   pt.x -= d;
   d = (3 * hed->ColumnsPerLine * hed->CharWidth);
   if(pt.x <= d)
   {
     return HEHT_HEXDUMP;
   }
-  
+
   pt.x -= d;
   d = (hed->SplitSpacing * hed->CharWidth);
   if(pt.x <= d)
   {
     return HEHT_HEXDUMPSPACING;
   }
-  
+
   pt.x -= d;
   d = (hed->ColumnsPerLine * hed->CharWidth);
   if(pt.x <= d)
   {
     return HEHT_ASCIIDUMP;
   }
-  
+
   return HEHT_RIGHTMARGIN;
 }
 
@@ -324,13 +324,13 @@ HEXEDIT_PositionFromPoint(PHEXEDIT_DATA hed, POINTS pt, DWORD Hit, POINT *EditPo
 {
   SCROLLINFO si;
   DWORD Pos, bufsize;
-  
+
   si.cbSize = sizeof(SCROLLINFO);
   si.fMask = SIF_POS;
   GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
-  
+
   EditPos->x = 0;
-  
+
   if(hed->LineHeight > 0)
   {
     EditPos->y = min(si.nPos + (pt.y / hed->LineHeight), hed->nLines - 1);
@@ -339,7 +339,7 @@ HEXEDIT_PositionFromPoint(PHEXEDIT_DATA hed, POINTS pt, DWORD Hit, POINT *EditPo
   {
     EditPos->y = si.nPos;
   }
-  
+
   switch(Hit)
   {
     case HEHT_LEFTMARGIN:
@@ -349,19 +349,19 @@ HEXEDIT_PositionFromPoint(PHEXEDIT_DATA hed, POINTS pt, DWORD Hit, POINT *EditPo
       pt.x -= hed->LeftMargin + ((4 + hed->AddressSpacing) * hed->CharWidth);
       *EditField = TRUE;
       break;
-    
+
     default:
       pt.x -= hed->LeftMargin + ((4 + hed->AddressSpacing + hed->SplitSpacing + (3 * hed->ColumnsPerLine)) * hed->CharWidth);
       *EditField = FALSE;
       break;
   }
-  
+
   if(pt.x > 0)
   {
     INT BlockWidth = (*EditField ? hed->CharWidth * 3 : hed->CharWidth);
     EditPos->x = min(hed->ColumnsPerLine, pt.x / BlockWidth);
   }
-  
+
   bufsize = (hed->hBuffer ? LocalSize(hed->hBuffer) : 0);
   Pos = (EditPos->y * hed->ColumnsPerLine) + EditPos->x;
   if(Pos > bufsize)
@@ -381,12 +381,12 @@ HEXEDIT_HEM_LOADBUFFER(PHEXEDIT_DATA hed, PVOID Buffer, DWORD Size)
   if(Buffer != NULL && Size > 0)
   {
     LPVOID buf;
-    
+
     if(hed->MaxBuffer > 0 && Size > hed->MaxBuffer)
     {
       Size = hed->MaxBuffer;
     }
-    
+
     if(hed->hBuffer)
     {
       if(Size > 0)
@@ -401,7 +401,7 @@ HEXEDIT_HEM_LOADBUFFER(PHEXEDIT_DATA hed, PVOID Buffer, DWORD Size)
         hed->hBuffer = LocalFree(hed->hBuffer);
         hed->Position = 0;
         HEXEDIT_Update(hed);
-        
+
         return 0;
       }
     }
@@ -409,7 +409,7 @@ HEXEDIT_HEM_LOADBUFFER(PHEXEDIT_DATA hed, PVOID Buffer, DWORD Size)
     {
       hed->hBuffer = LocalAlloc(LHND, Size);
     }
-    
+
     if(Size > 0)
     {
       buf = LocalLock(hed->hBuffer);
@@ -417,11 +417,11 @@ HEXEDIT_HEM_LOADBUFFER(PHEXEDIT_DATA hed, PVOID Buffer, DWORD Size)
       {
         memcpy(buf, Buffer, Size);
       }
-      else 
+      else
         Size = 0;
       LocalUnlock(hed->hBuffer);
     }
-    
+
     hed->Position = 0;
     HEXEDIT_Update(hed);
     return Size;
@@ -432,7 +432,7 @@ HEXEDIT_HEM_LOADBUFFER(PHEXEDIT_DATA hed, PVOID Buffer, DWORD Size)
     hed->hBuffer = LocalFree(hed->hBuffer);
     HEXEDIT_Update(hed);
   }
-  
+
   return 0;
 }
 
@@ -440,19 +440,19 @@ static LRESULT
 HEXEDIT_HEM_COPYBUFFER(PHEXEDIT_DATA hed, PVOID Buffer, DWORD Size)
 {
   DWORD nCpy;
-  
+
   if(!hed->hBuffer)
   {
     return 0;
   }
-  
+
   if(Buffer != NULL && Size > 0)
   {
     nCpy = min(Size, LocalSize(hed->hBuffer));
     if(nCpy > 0)
     {
       PVOID buf;
-      
+
       buf = LocalLock(hed->hBuffer);
       if(buf)
       {
@@ -464,7 +464,7 @@ HEXEDIT_HEM_COPYBUFFER(PHEXEDIT_DATA hed, PVOID Buffer, DWORD Size)
     }
     return nCpy;
   }
-  
+
   return (LRESULT)LocalSize(hed->hBuffer);
 }
 
@@ -486,25 +486,25 @@ static LRESULT
 HEXEDIT_WM_NCCREATE(HWND hWnd, CREATESTRUCT *cs)
 {
   PHEXEDIT_DATA hed;
-  
+
   if(!(hed = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HEXEDIT_DATA))))
   {
     return FALSE;
   }
-  
+
   hed->hWndSelf = hWnd;
   hed->hWndParent = cs->hwndParent;
   hed->style = cs->style;
-  
+
   hed->ColumnsPerLine = 8;
   hed->LeftMargin = 2;
   hed->AddressSpacing = 2;
   hed->SplitSpacing = 2;
   hed->EditingField = TRUE; /* in hexdump field */
-  
+
   SetWindowLongPtr(hWnd, 0, (DWORD_PTR)hed);
   HEXEDIT_Update(hed);
-  
+
   return TRUE;
 }
 
@@ -516,15 +516,15 @@ HEXEDIT_WM_NCDESTROY(PHEXEDIT_DATA hed)
     while(LocalUnlock(hed->hBuffer));
     LocalFree(hed->hBuffer);
   }
-  
+
   if(hed->hFont)
   {
     DeleteObject(hed->hFont);
   }
-  
+
   SetWindowLongPtr(hed->hWndSelf, 0, (DWORD_PTR)0);
   HeapFree(GetProcessHeap(), 0, hed);
-  
+
   return 0;
 }
 
@@ -555,54 +555,54 @@ HEXEDIT_WM_VSCROLL(PHEXEDIT_DATA hed, WORD ThumbPosition, WORD SbCmd)
 {
   int ScrollY;
   SCROLLINFO si;
-  
+
   ZeroMemory(&si, sizeof(SCROLLINFO));
   si.cbSize = sizeof(SCROLLINFO);
   si.fMask = SIF_ALL;
   GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
-  
+
   ScrollY = si.nPos;
   switch(SbCmd)
   {
     case SB_TOP:
       si.nPos = si.nMin;
       break;
-    
+
     case SB_BOTTOM:
       si.nPos = si.nMax;
       break;
-    
+
     case SB_LINEUP:
       si.nPos--;
       break;
-    
+
     case SB_LINEDOWN:
       si.nPos++;
       break;
-    
+
     case SB_PAGEUP:
       si.nPos -= si.nPage;
       break;
-    
+
     case SB_PAGEDOWN:
       si.nPos += si.nPage;
       break;
-    
+
     case SB_THUMBTRACK:
       si.nPos = si.nTrackPos;
       break;
   }
-  
+
   si.fMask = SIF_POS;
   SetScrollInfo(hed->hWndSelf, SB_VERT, &si, TRUE);
   GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
-  
+
   if(si.nPos != ScrollY)
   {
     ScrollWindow(hed->hWndSelf, 0, (ScrollY - si.nPos) * hed->LineHeight, NULL, NULL);
     UpdateWindow(hed->hWndSelf);
   }
-  
+
   return 0;
 }
 
@@ -612,12 +612,12 @@ HEXEDIT_WM_SETFONT(PHEXEDIT_DATA hed, HFONT hFont, BOOL bRedraw)
   HDC hDC;
   TEXTMETRIC tm;
   HFONT hOldFont = 0;
-  
+
   if(hFont == 0)
   {
     hFont = HEXEDIT_GetFixedFont();
   }
-  
+
   hed->hFont = hFont;
   hDC = GetDC(hed->hWndSelf);
   if(hFont)
@@ -632,12 +632,12 @@ HEXEDIT_WM_SETFONT(PHEXEDIT_DATA hed, HFONT hFont, BOOL bRedraw)
     SelectObject(hDC, hOldFont);
   }
   ReleaseDC(hed->hWndSelf, hDC);
-  
+
   if(bRedraw)
   {
     InvalidateRect(hed->hWndSelf, NULL, TRUE);
   }
-  
+
   return 0;
 }
 
@@ -658,14 +658,14 @@ HEXEDIT_WM_PAINT(PHEXEDIT_DATA hed)
   HFONT hOldFont;
   HDC hTempDC;
   DWORD height;
-  
+
   if(GetUpdateRect(hed->hWndSelf, &rc, FALSE) && (hed->LineHeight > 0))
   {
     ZeroMemory(&si, sizeof(SCROLLINFO));
     si.cbSize = sizeof(SCROLLINFO);
     si.fMask = SIF_POS;
     GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
-    
+
     height = (rc.bottom - rc.top);
     nLines = height / hed->LineHeight;
     if((height % hed->LineHeight) > 0)
@@ -677,7 +677,7 @@ HEXEDIT_WM_PAINT(PHEXEDIT_DATA hed)
       nLines = hed->nLines - si.nPos;
     }
     nFirst = rc.top / hed->LineHeight;
-    
+
     BeginPaint(hed->hWndSelf, &ps);
     if(!(hTempDC = CreateCompatibleDC(ps.hdc)))
     {
@@ -696,14 +696,14 @@ HEXEDIT_WM_PAINT(PHEXEDIT_DATA hed)
     BitBlt(ps.hdc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hTempDC, rc.left, rc.top, SRCCOPY);
     SelectObject(hTempDC, hOldFont);
     SelectObject(hTempDC, hbmpold);
-    
+
     DeleteObject(hbmp);
     DeleteDC(hTempDC);
-    
+
     epaint:
     EndPaint(hed->hWndSelf, &ps);
   }
-  
+
   return 0;
 }
 
@@ -712,26 +712,26 @@ HEXEDIT_WM_MOUSEWHEEL(PHEXEDIT_DATA hed, int cyMoveLines, WORD ButtonsDown, LPPO
 {
   SCROLLINFO si;
   int ScrollY;
-  
+
   SetFocus(hed->hWndSelf);
-  
+
   si.cbSize = sizeof(SCROLLINFO);
   si.fMask = SIF_ALL;
   GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
-  
+
   ScrollY = si.nPos;
-  
+
   si.fMask = SIF_POS;
   si.nPos += cyMoveLines;
   SetScrollInfo(hed->hWndSelf, SB_VERT, &si, TRUE);
-  
+
   GetScrollInfo(hed->hWndSelf, SB_VERT, &si);
   if(si.nPos != ScrollY)
   {
     ScrollWindow(hed->hWndSelf, 0, (ScrollY - si.nPos) * hed->LineHeight, NULL, NULL);
     UpdateWindow(hed->hWndSelf);
   }
-  
+
   return 0;
 }
 
@@ -747,16 +747,16 @@ HEXEDIT_WM_LBUTTONDOWN(PHEXEDIT_DATA hed, INT Buttons, POINTS Pt)
   BOOL NewField;
   POINT EditPos;
   DWORD Hit = HEXEDIT_HitRegionTest(hed, Pt);
-  
+
   SetFocus(hed->hWndSelf);
-  
-  hed->Position = HEXEDIT_PositionFromPoint(hed, Pt, Hit, &EditPos, &NewField); 
+
+  hed->Position = HEXEDIT_PositionFromPoint(hed, Pt, Hit, &EditPos, &NewField);
   hed->EditingField = NewField;
   hed->CaretCol = EditPos.x;
-  hed->CaretLine = EditPos.y;  
-  
+  hed->CaretLine = EditPos.y;
+
   HEXEDIT_MoveCaret(hed, TRUE);
-  
+
   return 0;
 }
 
@@ -765,17 +765,17 @@ HEXEDIT_WM_KEYDOWN(PHEXEDIT_DATA hed, INT VkCode)
 {
   DWORD bufsize;
   BOOL shift, control;
-  
+
   if(GetKeyState(VK_MENU) & 0x8000)
   {
     return FALSE;
   }
-  
+
   shift = GetKeyState(VK_SHIFT) & 0x8000;
   control = GetKeyState(VK_CONTROL) & 0x8000;
-  
+
   bufsize = (hed->hBuffer ? LocalSize(hed->hBuffer) : 0);
-  
+
   switch(VkCode)
   {
     case VK_LEFT:
@@ -791,7 +791,7 @@ HEXEDIT_WM_KEYDOWN(PHEXEDIT_DATA hed, INT VkCode)
       }
       HEXEDIT_MoveCaret(hed, TRUE);
       break;
-    
+
     case VK_RIGHT:
       if(hed->Position < bufsize)
       {
@@ -805,7 +805,7 @@ HEXEDIT_WM_KEYDOWN(PHEXEDIT_DATA hed, INT VkCode)
       }
       HEXEDIT_MoveCaret(hed, TRUE);
       break;
-    
+
     case VK_UP:
       if(hed->Position > 0)
       {
@@ -822,7 +822,7 @@ HEXEDIT_WM_KEYDOWN(PHEXEDIT_DATA hed, INT VkCode)
       }
       HEXEDIT_MoveCaret(hed, TRUE);
       break;
-    
+
     case VK_DOWN:
       if(hed->Position <= bufsize)
       {
@@ -847,7 +847,7 @@ HEXEDIT_WM_KEYDOWN(PHEXEDIT_DATA hed, INT VkCode)
       HEXEDIT_MoveCaret(hed, TRUE);
       break;
   }
-  
+
   return FALSE;
 }
 
@@ -862,33 +862,33 @@ INT_PTR CALLBACK
 HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
   PHEXEDIT_DATA hed;
-  
+
   hed = (PHEXEDIT_DATA)GetWindowLongPtr(hWnd, (DWORD_PTR)0);
   switch(uMsg)
   {
     case WM_ERASEBKGND:
       return TRUE;
-    
+
     case WM_PAINT:
       return HEXEDIT_WM_PAINT(hed);
-    
+
     case WM_KEYDOWN:
       return HEXEDIT_WM_KEYDOWN(hed, (INT)wParam);
-    
+
     case WM_VSCROLL:
       return HEXEDIT_WM_VSCROLL(hed, HIWORD(wParam), LOWORD(wParam));
-    
+
     case WM_SIZE:
       return HEXEDIT_WM_SIZE(hed, (DWORD)wParam, LOWORD(lParam), HIWORD(lParam));
-    
+
     case WM_LBUTTONDOWN:
       return HEXEDIT_WM_LBUTTONDOWN(hed, (INT)wParam, MAKEPOINTS(lParam));
-    
+
     case WM_MOUSEWHEEL:
     {
       UINT nScrollLines = 3;
       int delta = 0;
-      
+
       SystemParametersInfoW(SPI_GETWHEELSCROLLLINES, 0, &nScrollLines, 0);
       delta -= (SHORT)HIWORD(wParam);
       if(abs(delta) >= WHEEL_DELTA && nScrollLines != 0)
@@ -897,41 +897,41 @@ HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
       }
       break;
     }
-    
+
     case HEM_LOADBUFFER:
       return HEXEDIT_HEM_LOADBUFFER(hed, (PVOID)wParam, (DWORD)lParam);
-      
+
     case HEM_COPYBUFFER:
       return HEXEDIT_HEM_COPYBUFFER(hed, (PVOID)wParam, (DWORD)lParam);
-    
+
     case HEM_SETMAXBUFFERSIZE:
       return HEXEDIT_HEM_SETMAXBUFFERSIZE(hed, (DWORD)lParam);
-    
+
     case WM_SETFOCUS:
       return HEXEDIT_WM_SETFOCUS(hed);
-    
+
     case WM_KILLFOCUS:
       return HEXEDIT_WM_KILLFOCUS(hed);
-    
+
     case WM_GETDLGCODE:
       return HEXEDIT_WM_GETDLGCODE((LPMSG)lParam);
-    
+
     case WM_SETFONT:
       return HEXEDIT_WM_SETFONT(hed, (HFONT)wParam, (BOOL)LOWORD(lParam));
-    
+
     case WM_GETFONT:
       return HEXEDIT_WM_GETFONT(hed);
-    
+
     case WM_CREATE:
       return HEXEDIT_WM_CREATE(hed);
-    
+
     case WM_NCCREATE:
       if(!hed)
       {
         return HEXEDIT_WM_NCCREATE(hWnd, (CREATESTRUCT*)lParam);
       }
       break;
-    
+
     case WM_NCDESTROY:
       if(hed)
       {
@@ -939,7 +939,7 @@ HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
       }
       break;
   }
-  
+
   return CallWindowProc(DefWindowProc, hWnd, uMsg, wParam, lParam);
 }
 
index 2aea225..f8c87dc 100644 (file)
@@ -100,7 +100,7 @@ BOOL IsDefaultValue(HWND hwndLV, int i)
 {
   PLINE_INFO lineinfo;
   LVITEM Item;
-  
+
   Item.mask = LVIF_PARAM;
   Item.iItem = i;
   if(ListView_GetItem(hwndLV, &Item))
@@ -276,10 +276,10 @@ static BOOL InitListViewImageLists(HWND hwndLV)
 
     hico = LoadIcon(hInst, MAKEINTRESOURCE(IDI_BIN));
     Image_Bin = ImageList_AddIcon(himl, hico);
-    
+
     hico = LoadIcon(hInst, MAKEINTRESOURCE(IDI_STRING));
     Image_String = ImageList_AddIcon(himl, hico);
-    
+
 
     /* Fail if not all of the images were added.  */
     if (ImageList_GetImageCount(himl) < NUM_ICONS)
@@ -362,10 +362,10 @@ static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSor
     LINE_INFO*l, *r;
     l = (LINE_INFO*)lParam1;
     r = (LINE_INFO*)lParam2;
-        
-    if (g_columnToSort == ~0UL) 
+
+    if (g_columnToSort == ~0UL)
         g_columnToSort = 0;
-    
+
     if (g_columnToSort == 1 && l->dwValType != r->dwValType)
         return g_invertSort ? (int)r->dwValType - (int)l->dwValType : (int)l->dwValType - (int)r->dwValType;
     if (g_columnToSort == 2) {
@@ -400,7 +400,7 @@ BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
                 g_columnToSort = ((LPNMLISTVIEW)lParam)->iSubItem;
                 g_invertSort = FALSE;
             }
-                    
+
             ListView_SortItems(hWnd, CompareFunc, (WPARAM)hWnd);
             return TRUE;
         case NM_DBLCLK:
@@ -449,7 +449,7 @@ BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
                  //if((ret = RenameValue(lineinfo->name, Info->item.pszText)) != ERROR_SUCCESS)
                   {
                    TCHAR msg[128], caption[128];
-                   
+
                    LoadString(hInst, IDS_ERR_RENVAL_CAPTION, caption, sizeof(caption)/sizeof(TCHAR));
                    if(_tcslen(Info->item.pszText) == 0)
                    {
@@ -483,7 +483,7 @@ HWND CreateListView(HWND hwndParent, int id)
                             0, 0, rcClient.right, rcClient.bottom,
                             hwndParent, (HMENU)id, hInst, NULL);
     if (!hwndLV) return NULL;
-    
+
     /* Initialize the image list, and add items to the control.  */
     if (!CreateListColumns(hwndLV)) goto fail;
     if (!InitListViewImageLists(hwndLV)) goto fail;
@@ -507,9 +507,9 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCTSTR keyPath)
     BOOL AddedDefault = FALSE;
 
     if (!hwndLV) return FALSE;
-    
+
     ListView_EditLabel(hwndLV, -1);
-    
+
     SendMessage(hwndLV, WM_SETREDRAW, FALSE, 0);
     count = ListView_GetItemCount(hwndLV);
     for (i = 0; i < count; i++) {
@@ -521,14 +521,14 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCTSTR keyPath)
     }
     g_columnToSort = ~0UL;
     ListView_DeleteAllItems(hwndLV);
-    
+
     if(!hKey) return FALSE;
 
     errCode = RegOpenKeyEx(hKey, keyPath, 0, KEY_READ, &hNewKey);
     if (errCode != ERROR_SUCCESS) return FALSE;
 
     /* get size information and resize the buffers if necessary */
-    errCode = RegQueryInfoKey(hNewKey, NULL, NULL, NULL, NULL, &max_sub_key_len, NULL, 
+    errCode = RegQueryInfoKey(hNewKey, NULL, NULL, NULL, NULL, &max_sub_key_len, NULL,
                               &val_count, &max_val_name_len, &max_val_size, NULL, NULL);
 
     #define BUF_HEAD_SPACE 2 /* FIXME: check why this is required with ROS ??? */
index 40c9f20..84bc955 100644 (file)
@@ -69,7 +69,7 @@ TCHAR szChildClass[MAX_LOADSTRING];
 BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
 {
     BOOL AclUiAvailable;
-    
+
     WNDCLASSEX wcFrame = {
                              sizeof(WNDCLASSEX),
                              CS_HREDRAW | CS_VREDRAW/*style*/,
@@ -105,7 +105,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
                          };
     ATOM hChildWndClass = RegisterClassEx(&wcChild); /* register child windows class */
     hChildWndClass = hChildWndClass; /* warning eater */
-    
+
     RegisterHexEditorClass(hInstance);
 
     hMenuFrame = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_REGEDIT_MENU));
@@ -113,7 +113,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
 
     /* Initialize the Windows Common Controls DLL */
     InitCommonControls();
-    
+
     AclUiAvailable = InitializeAclUiDll();
     if(!AclUiAvailable)
     {
@@ -189,7 +189,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
         hf = _fdopen(hCrt, "w");
         *stdout = *hf;
         setvbuf(stdout, NULL, _IONBF, 0);
-     
+
        wprintf(L"command line exit, hInstance = %d\n", hInstance);
        getch();
        FreeConsole();
@@ -216,7 +216,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
 
     /* Main message loop */
     while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
-        if (!TranslateAccelerator(msg.hwnd, hAccel, &msg) 
+        if (!TranslateAccelerator(msg.hwnd, hAccel, &msg)
             && !TranslateChildTabMessage(&msg)) {
             TranslateMessage(&msg);
             DispatchMessage(&msg);
index 216f389..19f71b2 100644 (file)
@@ -35,7 +35,7 @@
 /******************************************************************************
    Implementation of the CRegKeySecurity interface
  ******************************************************************************/
+
 SI_ACCESS RegAccess[] = {
   {&GUID_NULL, KEY_ALL_ACCESS,         (LPWSTR)MAKEINTRESOURCE(IDS_ACCESS_FULLCONTROL),      SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC},
   {&GUID_NULL, KEY_READ,               (LPWSTR)MAKEINTRESOURCE(IDS_ACCESS_READ),             SI_ACCESS_GENERAL},
@@ -70,7 +70,7 @@ SI_INHERIT_TYPE RegInheritTypes[] = {
 LPREGKEYSECURITY CRegKeySecurity_fnConstructor(HANDLE Handle, SE_OBJECT_TYPE ObjectType, SI_OBJECT_INFO *ObjectInfo, BOOL *Btn)
 {
   LPREGKEYSECURITY obj;
-  
+
   obj = (LPREGKEYSECURITY)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(REGKEYSECURITY));
   if(obj != NULL)
   {
@@ -81,13 +81,13 @@ LPREGKEYSECURITY CRegKeySecurity_fnConstructor(HANDLE Handle, SE_OBJECT_TYPE Obj
     obj->ObjectInfo = *ObjectInfo;
     obj->Btn = Btn;
   }
-  
+
   return obj;
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnQueryInterface(LPREGKEYSECURITY this, 
-                                 REFIID iid, 
+CRegKeySecurity_fnQueryInterface(LPREGKEYSECURITY this,
+                                 REFIID iid,
                                 PVOID *pvObject)
 {
   if(IsEqualGUID(iid, &IID_IUnknown) ||
@@ -96,7 +96,7 @@ CRegKeySecurity_fnQueryInterface(LPREGKEYSECURITY this,
     *pvObject = this;
     return S_OK;
   }
-  
+
   *pvObject = NULL;
   return E_NOINTERFACE;
 }
@@ -111,7 +111,7 @@ ULONG STDMETHODCALLTYPE
 CRegKeySecurity_fnRelease(LPREGKEYSECURITY this)
 {
   ULONG rfc;
-  
+
   rfc = (ULONG)InterlockedDecrement(&this->ref);
   if(rfc == 0)
   {
@@ -121,7 +121,7 @@ CRegKeySecurity_fnRelease(LPREGKEYSECURITY this)
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnGetObjectInformation(LPREGKEYSECURITY this, 
+CRegKeySecurity_fnGetObjectInformation(LPREGKEYSECURITY this,
                                        PSI_OBJECT_INFO pObjectInfo)
 {
   *pObjectInfo = this->ObjectInfo;
@@ -129,7 +129,7 @@ CRegKeySecurity_fnGetObjectInformation(LPREGKEYSECURITY this,
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnGetSecurity(LPREGKEYSECURITY this, 
+CRegKeySecurity_fnGetSecurity(LPREGKEYSECURITY this,
                               SECURITY_INFORMATION RequestedInformation,
                               PSECURITY_DESCRIPTOR* ppSecurityDescriptor,
                               BOOL fDefault)
@@ -147,7 +147,7 @@ CRegKeySecurity_fnGetSecurity(LPREGKEYSECURITY this,
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnSetSecurity(LPREGKEYSECURITY this, 
+CRegKeySecurity_fnSetSecurity(LPREGKEYSECURITY this,
                               SECURITY_INFORMATION RequestedInformation,
                               PSECURITY_DESCRIPTOR pSecurityDescriptor)
 {
@@ -157,7 +157,7 @@ CRegKeySecurity_fnSetSecurity(LPREGKEYSECURITY this,
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnGetAccessRights(LPREGKEYSECURITY this, 
+CRegKeySecurity_fnGetAccessRights(LPREGKEYSECURITY this,
                                   const GUID* pguidObjectType,
                                   DWORD dwFlags,
                                   PSI_ACCESS* ppAccess,
@@ -171,7 +171,7 @@ CRegKeySecurity_fnGetAccessRights(LPREGKEYSECURITY this,
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnMapGeneric(LPREGKEYSECURITY this, 
+CRegKeySecurity_fnMapGeneric(LPREGKEYSECURITY this,
                              const GUID* pguidObjectType,
                              UCHAR* pAceFlags,
                              ACCESS_MASK* pMask)
@@ -182,7 +182,7 @@ CRegKeySecurity_fnMapGeneric(LPREGKEYSECURITY this,
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnGetInheritTypes(LPREGKEYSECURITY this, 
+CRegKeySecurity_fnGetInheritTypes(LPREGKEYSECURITY this,
                                   PSI_INHERIT_TYPE* ppInheritTypes,
                                   ULONG* pcInheritTypes)
 {
@@ -197,7 +197,7 @@ CRegKeySecurity_fnGetInheritTypes(LPREGKEYSECURITY this,
 }
 
 HRESULT STDMETHODCALLTYPE
-CRegKeySecurity_fnPropertySheetPageCallback(LPREGKEYSECURITY this, 
+CRegKeySecurity_fnPropertySheetPageCallback(LPREGKEYSECURITY this,
                                             HWND hwnd,
                                             UINT uMsg,
                                             SI_PAGE_TYPE uPage)
@@ -237,7 +237,7 @@ InitializeAclUiDll(VOID)
     hAclUiDll = NULL;
     return FALSE;
   }
-  
+
   return TRUE;
 }
 
@@ -262,12 +262,12 @@ RegKeyEditPermissions(HWND hWndOwner,
   HKEY hInfoKey;
   LPREGKEYSECURITY RegKeySecurity;
   SI_OBJECT_INFO ObjectInfo;
-  
+
   if(pfnEditSecurity == NULL)
   {
     return FALSE;
   }
-  
+
 #ifndef UNICODE
   /* aclui.dll only accepts unicode strings, convert them */
   if(lpMachine != NULL)
@@ -287,7 +287,7 @@ RegKeyEditPermissions(HWND hWndOwner,
   }
   else
     Machine = NULL;
-  
+
   if(lpKeyName != NULL)
   {
     int lnKeyName = lstrlen(lpKeyName);
@@ -313,20 +313,20 @@ RegKeyEditPermissions(HWND hWndOwner,
   Machine = (LPWSTR)lpMachine;
   KeyName = (LPWSTR)lpKeyName;
 #endif
-  
+
     /* try to open the key again with more access rights */
   if(RegOpenKeyEx(hKey, NULL, 0, READ_CONTROL, &hInfoKey) != ERROR_SUCCESS)
   {
     /* FIXME - print error with FormatMessage */
     return FALSE;
   }
-  
+
   ObjectInfo.dwFlags = SI_EDIT_ALL  | SI_ADVANCED | SI_CONTAINER | SI_OWNER_RECURSE | SI_EDIT_PERMS;
   ObjectInfo.hInstance = hInst;
   ObjectInfo.pszServerName = Machine;
   ObjectInfo.pszObjectName = KeyName;
   ObjectInfo.pszPageTitle = KeyName;
-  
+
   if(!(RegKeySecurity = CRegKeySecurity_fnConstructor(hInfoKey, SE_REGISTRY_KEY, &ObjectInfo, &Result)))
   {
     /* FIXME - print error with FormatMessage */
@@ -335,12 +335,12 @@ RegKeyEditPermissions(HWND hWndOwner,
 
   /* display the security editor dialog */
   pfnEditSecurity(hWndOwner, RegKeySecurity);
-  
+
   /* dereference the interface, it should be destroyed here */
   CRegKeySecurity_fnRelease(RegKeySecurity);
 
   RegCloseKey(hInfoKey);
-  
+
 #ifndef UNICODE
   if(Machine != NULL)
   {
@@ -351,7 +351,7 @@ RegKeyEditPermissions(HWND hWndOwner,
     HeapFree(GetProcessHeap(), 0, KeyName);
   }
 #endif
-  
+
   return Result;
 }
 
index a0e9f83..1035efc 100644 (file)
@@ -24,36 +24,36 @@ typedef struct ifaceCRegKeySecurityVbtl ifaceCRegKeySecurityVbtl;
 struct ifaceCRegKeySecurityVbtl
 {
   /* IUnknown */
-  HRESULT (STDMETHODCALLTYPE *QueryInterface)(LPREGKEYSECURITY this, 
-                                              REFIID iid, 
+  HRESULT (STDMETHODCALLTYPE *QueryInterface)(LPREGKEYSECURITY this,
+                                              REFIID iid,
                                              PVOID *pvObject);
   ULONG (STDMETHODCALLTYPE *AddRef)(LPREGKEYSECURITY this);
   ULONG (STDMETHODCALLTYPE *Release)(LPREGKEYSECURITY this);
-  
+
   /* CRegKeySecurity */
-  HRESULT (STDMETHODCALLTYPE *GetObjectInformation)(LPREGKEYSECURITY this, 
+  HRESULT (STDMETHODCALLTYPE *GetObjectInformation)(LPREGKEYSECURITY this,
                                                     PSI_OBJECT_INFO pObjectInfo);
-  HRESULT (STDMETHODCALLTYPE *GetSecurity)(LPREGKEYSECURITY this, 
+  HRESULT (STDMETHODCALLTYPE *GetSecurity)(LPREGKEYSECURITY this,
                                            SECURITY_INFORMATION RequestedInformation,
                                            PSECURITY_DESCRIPTOR* ppSecurityDescriptor,
                                            BOOL fDefault);
-  HRESULT (STDMETHODCALLTYPE *SetSecurity)(LPREGKEYSECURITY this, 
+  HRESULT (STDMETHODCALLTYPE *SetSecurity)(LPREGKEYSECURITY this,
                                            SECURITY_INFORMATION RequestedInformation,
                                            PSECURITY_DESCRIPTOR pSecurityDescriptor);
-  HRESULT (STDMETHODCALLTYPE *GetAccessRights)(LPREGKEYSECURITY this, 
+  HRESULT (STDMETHODCALLTYPE *GetAccessRights)(LPREGKEYSECURITY this,
                                                const GUID* pguidObjectType,
                                                DWORD dwFlags,
                                                PSI_ACCESS* ppAccess,
                                                ULONG* pcAccesses,
                                                ULONG* piDefaultAccess);
-  HRESULT (STDMETHODCALLTYPE *MapGeneric)(LPREGKEYSECURITY this, 
+  HRESULT (STDMETHODCALLTYPE *MapGeneric)(LPREGKEYSECURITY this,
                                           const GUID* pguidObjectType,
                                           UCHAR* pAceFlags,
                                           ACCESS_MASK* pMask);
-  HRESULT (STDMETHODCALLTYPE *GetInheritTypes)(LPREGKEYSECURITY this, 
+  HRESULT (STDMETHODCALLTYPE *GetInheritTypes)(LPREGKEYSECURITY this,
                                                PSI_INHERIT_TYPE* ppInheritTypes,
                                                ULONG* pcInheritTypes);
-  HRESULT (STDMETHODCALLTYPE *PropertySheetPageCallback)(LPREGKEYSECURITY this, 
+  HRESULT (STDMETHODCALLTYPE *PropertySheetPageCallback)(LPREGKEYSECURITY this,
                                                          HWND hwnd,
                                                          UINT uMsg,
                                                          SI_PAGE_TYPE uPage);
@@ -78,27 +78,27 @@ ULONG STDMETHODCALLTYPE CRegKeySecurity_fnAddRef(LPREGKEYSECURITY this);
 ULONG STDMETHODCALLTYPE CRegKeySecurity_fnRelease(LPREGKEYSECURITY this);
 HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnGetObjectInformation(LPREGKEYSECURITY this,
                                                                  PSI_OBJECT_INFO pObjectInfo);
-HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnGetSecurity(LPREGKEYSECURITY this, 
+HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnGetSecurity(LPREGKEYSECURITY this,
                                                         SECURITY_INFORMATION RequestedInformation,
                                                         PSECURITY_DESCRIPTOR* ppSecurityDescriptor,
                                                         BOOL fDefault);
-HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnSetSecurity(LPREGKEYSECURITY this, 
+HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnSetSecurity(LPREGKEYSECURITY this,
                                                         SECURITY_INFORMATION RequestedInformation,
                                                         PSECURITY_DESCRIPTOR pSecurityDescriptor);
-HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnGetAccessRights(LPREGKEYSECURITY this, 
+HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnGetAccessRights(LPREGKEYSECURITY this,
                                                             const GUID* pguidObjectType,
                                                             DWORD dwFlags,
                                                             PSI_ACCESS* ppAccess,
                                                             ULONG* pcAccesses,
                                                             ULONG* piDefaultAccess);
-HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnMapGeneric(LPREGKEYSECURITY this, 
+HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnMapGeneric(LPREGKEYSECURITY this,
                                                        const GUID* pguidObjectType,
                                                        UCHAR* pAceFlags,
                                                        ACCESS_MASK* pMask);
-HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnGetInheritTypes(LPREGKEYSECURITY this, 
+HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnGetInheritTypes(LPREGKEYSECURITY this,
                                                             PSI_INHERIT_TYPE* ppInheritTypes,
                                                             ULONG* pcInheritTypes);
-HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnPropertySheetPageCallback(LPREGKEYSECURITY this, 
+HRESULT STDMETHODCALLTYPE CRegKeySecurity_fnPropertySheetPageCallback(LPREGKEYSECURITY this,
                                                                       HWND hwnd,
                                                                       UINT uMsg,
                                                                       SI_PAGE_TYPE uPage);
@@ -109,7 +109,7 @@ static ifaceCRegKeySecurityVbtl efvt =
   CRegKeySecurity_fnQueryInterface,
   CRegKeySecurity_fnAddRef,
   CRegKeySecurity_fnRelease,
-  
+
   /* CRegKeySecurity methods */
   CRegKeySecurity_fnGetObjectInformation,
   CRegKeySecurity_fnGetSecurity,
index c7cf2e8..aafd12f 100644 (file)
@@ -150,7 +150,7 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPTSTR pHostName)
     if (!AddEntryToTree(hwndTV, hRoot, _T("HKEY_LOCAL_MACHINE"), HKEY_LOCAL_MACHINE, 1, TVI_LAST)) return FALSE;
     if (!AddEntryToTree(hwndTV, hRoot, _T("HKEY_USERS"), HKEY_USERS, 1, TVI_LAST)) return FALSE;
     if (!AddEntryToTree(hwndTV, hRoot, _T("HKEY_CURRENT_CONFIG"), HKEY_CURRENT_CONFIG, 1, TVI_LAST)) return FALSE;
-    
+
     /* expand and select host name */
     TreeView_Expand(hwndTV, hRoot, TVE_EXPAND);
     TreeView_Select(hwndTV, hRoot, TVGN_CARET);
@@ -245,9 +245,9 @@ BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv)
        printf("dwSubCount=%ld, Name=%s\n", dwSubCount, Name);
         AddEntryToTree(hwndTV, pnmtv->itemNew.hItem, Name, NULL, dwSubCount, TVI_FIRST);
     }
-    
+
     SendMessage(hwndTV, TVM_SORTCHILDREN, 0, (LPARAM)pnmtv->itemNew.hItem);
-   
+
     RegCloseKey(hNewKey);
     HeapFree(GetProcessHeap(), 0, Name);
 
index 560e60b..dab3647 100644 (file)
@@ -302,7 +302,7 @@ ATOM RegisterBlankClass(HINSTANCE hInstance)
 {
        WNDCLASSEX wcex;
 
-       wcex.cbSize = sizeof(WNDCLASSEX); 
+       wcex.cbSize = sizeof(WNDCLASSEX);
 
        wcex.style         = 0;
        wcex.lpfnWndProc   = EmptyWindowProc;
index 7cf99e2..ce94e1b 100644 (file)
@@ -1,9 +1,9 @@
 /*
  *
  * service control manager
- * 
+ *
  * ReactOS Operating System
- * 
+ *
  * --------------------------------------------------------------------
  *
  * This software is free software; you can redistribute it and/or
@@ -124,8 +124,8 @@ CreateGroupOrderListRoutine(PWSTR ValueName,
                  Group->TagCount = 0;
                  return STATUS_INSUFFICIENT_RESOURCES;
                }
-             RtlCopyMemory(Group->TagArray, 
-                           (PULONG)ValueData + 1, 
+             RtlCopyMemory(Group->TagArray,
+                           (PULONG)ValueData + 1,
                            Group->TagCount * sizeof(DWORD));
            }
          else
@@ -868,7 +868,7 @@ ScmAutoStartServices(VOID)
            }
         }
 
-      /* Start all services which have an invalid tag or which do not have a tag */ 
+      /* Start all services which have an invalid tag or which do not have a tag */
       ServiceEntry = ServiceListHead.Flink;
       while (ServiceEntry != &ServiceListHead)
        {
index b8f6ed6..5f12e99 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
  *
  * service control manager
- * 
+ *
  * ReactOS Operating System
- * 
+ *
  * --------------------------------------------------------------------
  *
  * This software is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.LIB. If not, write
  * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
- * MA 02139, USA.  
+ * MA 02139, USA.
  *
  */
 
@@ -258,8 +258,8 @@ StartScmNamedPipeThreadListener(VOID)
 VOID FASTCALL
 AcquireLoadDriverPrivilege(VOID)
 {
-  HANDLE hToken; 
-  TOKEN_PRIVILEGES tkp; 
+  HANDLE hToken;
+  TOKEN_PRIVILEGES tkp;
 
   /* Get a token for this process */
   if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
@@ -269,7 +269,7 @@ AcquireLoadDriverPrivilege(VOID)
 
     /* One privilege to set */
     tkp.PrivilegeCount = 1;
-    tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 
+    tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
 
     /* Get the debug privilege for this process */
     AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);
index f40fadf..5e65f9b 100644 (file)
@@ -34,25 +34,25 @@ ClearMixerCache(PSND_MIXER Mixer)
 {
   PSND_MIXER_DESTINATION Line, NextLine;
   PSND_MIXER_CONNECTION Con, NextCon;
-  
+
   for(Line = Mixer->Lines; Line != NULL; Line = NextLine)
   {
     if(Line->Controls != NULL)
     {
       HeapFree(GetProcessHeap(), 0, Line->Controls);
     }
-    
+
     for(Con = Line->Connections; Con != NULL; Con = NextCon)
     {
       if(Con->Controls != NULL)
       {
         HeapFree(GetProcessHeap(), 0, Con->Controls);
       }
-      
+
       NextCon = Con->Next;
       HeapFree(GetProcessHeap(), 0, Con);
     }
-    
+
     NextLine = Line->Next;
     HeapFree(GetProcessHeap(), 0, Line);
   }
@@ -68,7 +68,7 @@ SndMixerCreate(HWND hWndNotification)
     Mixer->hWndNotification = hWndNotification;
     Mixer->MixersCount = mixerGetNumDevs();
     Mixer->MixerId = NO_MIXER_SELECTED;
-    
+
     if(Mixer->MixersCount > 0)
     {
       /* select the first mixer by default */
@@ -125,7 +125,7 @@ SndMixerQueryControls(PSND_MIXER Mixer, LPMIXERLINE LineInfo, LPMIXERCONTROL *Co
         {
           DBG("Line control: %ws", (*Controls)[j].szName);
         }
-        
+
         return TRUE;
       }
       else
@@ -139,7 +139,7 @@ SndMixerQueryControls(PSND_MIXER Mixer, LPMIXERLINE LineInfo, LPMIXERCONTROL *Co
     {
       DBG("Failed to allocate memory for %d line controls!\n", LineInfo->cControls);
     }
-    
+
     return FALSE;
   }
   else
@@ -154,7 +154,7 @@ SndMixerQueryConnections(PSND_MIXER Mixer, PSND_MIXER_DESTINATION Line)
   UINT i;
   MIXERLINE LineInfo;
   BOOL Ret = TRUE;
-  
+
   LineInfo.cbStruct = sizeof(LineInfo);
   LineInfo.dwDestination = Line->Info.dwDestination;
   for(i = Line->Info.cConnections; i > 0; i--)
@@ -164,14 +164,14 @@ SndMixerQueryConnections(PSND_MIXER Mixer, PSND_MIXER_DESTINATION Line)
     {
       LPMIXERCONTROL Controls;
       PSND_MIXER_CONNECTION Con;
-      
+
       if(!SndMixerQueryControls(Mixer, &LineInfo, &Controls))
       {
         DBG("Failed to query connection controls\n");
         Ret = FALSE;
         break;
       }
-      
+
       Con = HeapAlloc(GetProcessHeap(), 0, sizeof(SND_MIXER_CONNECTION));
       if(Con != NULL)
       {
@@ -192,7 +192,7 @@ SndMixerQueryConnections(PSND_MIXER Mixer, PSND_MIXER_DESTINATION Line)
       break;
     }
   }
-  
+
   return Ret;
 }
 
@@ -201,7 +201,7 @@ SndMixerQueryDestinations(PSND_MIXER Mixer)
 {
   UINT i;
   BOOL Ret = TRUE;
-  
+
   for(i = Mixer->Caps.cDestinations; i > 0; i--)
   {
     PSND_MIXER_DESTINATION Line;
@@ -225,7 +225,7 @@ SndMixerQueryDestinations(PSND_MIXER Mixer)
           Ret = FALSE;
           break;
         }
-        
+
         Line->Next = Mixer->Lines;
         Mixer->Lines = Line;
       }
@@ -244,7 +244,7 @@ SndMixerQueryDestinations(PSND_MIXER Mixer)
       break;
     }
   }
-  
+
   return Ret;
 }
 
@@ -255,9 +255,9 @@ SndMixerSelect(PSND_MIXER Mixer, UINT MixerId)
   {
     return FALSE;
   }
-  
+
   SndMixerClose(Mixer);
-  
+
   if(mixerOpen(&Mixer->hmx, MixerId, (DWORD_PTR)Mixer->hWndNotification, 0, CALLBACK_WINDOW | MIXER_OBJECTF_MIXER) == MMSYSERR_NOERROR ||
      mixerOpen(&Mixer->hmx, MixerId, (DWORD_PTR)Mixer->hWndNotification, 0, CALLBACK_WINDOW) == MMSYSERR_NOERROR ||
      mixerOpen(&Mixer->hmx, MixerId, 0, 0, 0) == MMSYSERR_NOERROR)
@@ -271,7 +271,7 @@ SndMixerSelect(PSND_MIXER Mixer, UINT MixerId)
       ClearMixerCache(Mixer);
 
       Ret = SndMixerQueryDestinations(Mixer);
-      
+
       if(!Ret)
       {
         ClearMixerCache(Mixer);
@@ -284,7 +284,7 @@ SndMixerSelect(PSND_MIXER Mixer, UINT MixerId)
       mixerClose(Mixer->hmx);
     }
   }
-  
+
   Mixer->hmx = NULL;
   Mixer->MixerId = NO_MIXER_SELECTED;
   return FALSE;
@@ -313,7 +313,7 @@ SndMixerGetProductName(PSND_MIXER Mixer, LPTSTR lpBuffer, UINT uSize)
       return lnsz;
     }
   }
-  
+
   return -1;
 }
 
@@ -324,7 +324,7 @@ SndMixerEnumProducts(PSND_MIXER Mixer, PFNSNDMIXENUMPRODUCTS EnumProc, PVOID Con
   HMIXER hMixer;
   UINT i;
   BOOL Ret = TRUE;
-  
+
   for(i = 0; i < Mixer->MixersCount; i++)
   {
     if(mixerOpen(&hMixer, i, 0, 0, 0) == MMSYSERR_NOERROR)
@@ -361,7 +361,7 @@ SndMixerEnumLines(PSND_MIXER Mixer, PFNSNDMIXENUMLINES EnumProc, PVOID Context)
   if(Mixer->hmx)
   {
     PSND_MIXER_DESTINATION Line;
-    
+
     for(Line = Mixer->Lines; Line != NULL; Line = Line->Next)
     {
       if(!EnumProc(Mixer, &Line->Info, Context))
@@ -369,10 +369,10 @@ SndMixerEnumLines(PSND_MIXER Mixer, PFNSNDMIXENUMLINES EnumProc, PVOID Context)
         return FALSE;
       }
     }
-    
+
     return TRUE;
   }
-  
+
   return FALSE;
 }
 
index c2510f6..9feb6c5 100644 (file)
@@ -58,7 +58,7 @@ FillDeviceComboBox(PSND_MIXER Mixer, UINT Id, LPCTSTR ProductName, PVOID Context
 {
   LRESULT lres;
   PPREFERENCES_FILL_DEVICES FillContext = (PPREFERENCES_FILL_DEVICES)Context;
-  
+
   lres = SendMessage(FillContext->hComboBox, CB_ADDSTRING, 0, (LPARAM)ProductName);
   if(lres != CB_ERR)
   {
@@ -70,7 +70,7 @@ FillDeviceComboBox(PSND_MIXER Mixer, UINT Id, LPCTSTR ProductName, PVOID Context
       SendMessage(FillContext->hComboBox, CB_SETCURSEL, (WPARAM)lres, 0);
     }
   }
-  
+
   return TRUE;
 }
 
@@ -78,7 +78,7 @@ static INT_PTR CALLBACK
 DlgPreferencesProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
   PPREFERENCES_CONTEXT Context;
-  
+
   switch(uMsg)
   {
     case WM_COMMAND:
@@ -94,7 +94,7 @@ DlgPreferencesProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
       }
       break;
     }
-    
+
     case MM_MIXM_LINE_CHANGE:
     {
       DBG("MM_MIXM_LINE_CHANGE\n");
@@ -106,16 +106,16 @@ DlgPreferencesProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
       DBG("MM_MIXM_CONTROL_CHANGE\n");
       break;
     }
-    
+
     case WM_INITDIALOG:
     {
       PREFERENCES_FILL_DEVICES FillDevContext;
-      
+
       SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)lParam);
       Context = (PPREFERENCES_CONTEXT)((LONG_PTR)lParam);
       Context->hwndDlg = hwndDlg;
       Context->Mixer = SndMixerCreate(hwndDlg);
-      
+
       FillDevContext.PrefContext = Context;
       FillDevContext.hComboBox = GetDlgItem(hwndDlg, IDC_MIXERDEVICE);
       FillDevContext.Selected = SndMixerGetSelection(Context->Mixer);
@@ -124,7 +124,7 @@ DlgPreferencesProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
                            &FillDevContext);
       return TRUE;
     }
-    
+
     case WM_DESTROY:
     {
       Context = GetDialogData(hwndDlg, PREFERENCES_CONTEXT);
@@ -141,7 +141,7 @@ DlgPreferencesProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
       break;
     }
   }
-  
+
   return 0;
 }
 
@@ -156,7 +156,7 @@ BOOL
 RebuildMixerWindowControls(PMIXER_WINDOW MixerWindow)
 {
   DeleteMixerWindowControls(MixerWindow);
-  
+
   return TRUE;
 }
 
@@ -165,13 +165,13 @@ MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
   PMIXER_WINDOW MixerWindow;
   LRESULT Result = 0;
-  
+
   switch(uMsg)
   {
     case WM_COMMAND:
     {
       MixerWindow = GetWindowData(hwnd, MIXER_WINDOW);
-      
+
       switch(LOWORD(wParam))
       {
         case IDC_PROPERTIES:
@@ -180,7 +180,7 @@ MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
           Preferences.MixerWindow = MixerWindow;
           Preferences.Mixer = NULL;
-          
+
           if(DialogBoxParam(hAppInstance,
                             MAKEINTRESOURCE(IDD_PREFERENCES),
                             hwnd,
@@ -191,7 +191,7 @@ MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
           }
           break;
         }
-        
+
         case IDC_EXIT:
         {
           PostQuitMessage(0);
@@ -200,19 +200,19 @@ MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
       }
       break;
     }
-    
+
     case MM_MIXM_LINE_CHANGE:
     {
       DBG("MM_MIXM_LINE_CHANGE\n");
       break;
     }
-    
+
     case MM_MIXM_CONTROL_CHANGE:
     {
       DBG("MM_MIXM_CONTROL_CHANGE\n");
       break;
     }
-    
+
     case WM_CREATE:
     {
       MixerWindow = ((LPCREATESTRUCT)lParam)->lpCreateParams;
@@ -231,7 +231,7 @@ MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
           {
             SendMessage(MixerWindow->hStatusBar, WM_SETTEXT, 0, (LPARAM)szProduct);
           }
-          
+
           if(!RebuildMixerWindowControls(MixerWindow))
           {
             DBG("Rebuilding mixer window controls failed!\n");
@@ -251,7 +251,7 @@ MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
       }
       break;
     }
-    
+
     case WM_DESTROY:
     {
       MixerWindow = GetWindowData(hwnd, MIXER_WINDOW);
@@ -261,13 +261,13 @@ MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
       }
       break;
     }
-    
+
     case WM_CLOSE:
     {
       PostQuitMessage(0);
       break;
     }
-    
+
     default:
     {
       Result = DefWindowProc(hwnd, uMsg, wParam, lParam);
@@ -281,7 +281,7 @@ static BOOL
 RegisterApplicationClasses(VOID)
 {
   WNDCLASSEX wc;
-  
+
   wc.cbSize = sizeof(WNDCLASSEX);
   wc.style = CS_HREDRAW | CS_VREDRAW;
   wc.lpfnWndProc = MainWindowProc;
@@ -295,7 +295,7 @@ RegisterApplicationClasses(VOID)
   wc.lpszClassName = SZ_APP_CLASS;
   wc.hIconSm = NULL;
   MainWindowClass = RegisterClassEx(&wc);
-  
+
   return MainWindowClass != 0;
 }
 
@@ -310,13 +310,13 @@ CreateApplicationWindow(VOID)
 {
   LPTSTR lpAppTitle;
   HWND hWnd;
-  
+
   PMIXER_WINDOW MixerWindow = HeapAlloc(hAppHeap, 0, sizeof(MIXER_WINDOW));
   if(MixerWindow == NULL)
   {
     return NULL;
   }
-  
+
   /* load the application title */
   if(RosAllocAndLoadString(&lpAppTitle,
                            hAppInstance,
@@ -340,7 +340,7 @@ CreateApplicationWindow(VOID)
   else
   {
     LPTSTR lpErrMessage;
-    
+
     /*
      * no mixer devices are available!
      */
@@ -352,31 +352,31 @@ CreateApplicationWindow(VOID)
     MessageBox(NULL, lpErrMessage, lpAppTitle, MB_ICONINFORMATION);
     LocalFree(lpErrMessage);
   }
-  
+
   if(lpAppTitle != NULL)
   {
     LocalFree(lpAppTitle);
   }
-  
+
   if(hWnd == NULL)
   {
     HeapFree(hAppHeap, 0, MixerWindow);
   }
-  
+
   return hWnd;
 }
 
-int WINAPI 
+int WINAPI
 WinMain(HINSTANCE hInstance,
        HINSTANCE hPrevInstance,
        LPSTR lpszCmdLine,
        int nCmdShow)
 {
   MSG Msg;
-  
+
   hAppInstance = hInstance;
   hAppHeap = GetProcessHeap();
-  
+
   InitCommonControls();
 
   if(!RegisterApplicationClasses())
@@ -384,7 +384,7 @@ WinMain(HINSTANCE hInstance,
     DBG("Failed to register application classes (LastError: %d)!\n", GetLastError());
     return 1;
   }
-  
+
   hMainWnd = CreateApplicationWindow();
   if(hMainWnd == NULL)
   {
index 9cd9d47..e91455f 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 INT_PTR CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
index 1d937f4..7011f36 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __ABOUT_H
 #define __ABOUT_H
 
index 3afacd3..b54e9aa 100644 (file)
@@ -20,7 +20,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 HANDLE        hProcessAffinityHandle;
index 7952b54..0570f01 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __AFFINITY_H
 #define __AFFINITY_H
 
index 06bcb0d..2b929e2 100644 (file)
@@ -65,7 +65,7 @@ ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     LV_COLUMN   column;
     TCHAR       szTemp[256];
     int         cx, cy;
-    
+
     switch (message) {
     case WM_INITDIALOG:
 
@@ -149,21 +149,21 @@ ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
         cy = (rc.bottom - rc.top) + nYDifference;
         SetWindowPos(hApplicationPageListCtrl, NULL, 0, 0, cx, cy, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
         InvalidateRect(hApplicationPageListCtrl, NULL, TRUE);
-        
+
         GetClientRect(hApplicationPageEndTaskButton, &rc);
         MapWindowPoints(hApplicationPageEndTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
         cx = rc.left + nXDifference;
         cy = rc.top + nYDifference;
         SetWindowPos(hApplicationPageEndTaskButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
         InvalidateRect(hApplicationPageEndTaskButton, NULL, TRUE);
-        
+
         GetClientRect(hApplicationPageSwitchToButton, &rc);
         MapWindowPoints(hApplicationPageSwitchToButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
         cx = rc.left + nXDifference;
         cy = rc.top + nYDifference;
         SetWindowPos(hApplicationPageSwitchToButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
         InvalidateRect(hApplicationPageSwitchToButton, NULL, TRUE);
-        
+
         GetClientRect(hApplicationPageNewTaskButton, &rc);
         MapWindowPoints(hApplicationPageNewTaskButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
         cx = rc.left + nXDifference;
@@ -176,7 +176,7 @@ ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_NOTIFY:
         ApplicationPageOnNotify(wParam, lParam);
         break;
-        
+
     }
 
   return 0;
@@ -501,7 +501,7 @@ void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam)
         case LVN_ITEMCHANGED:
             ApplicationPageUpdate();
             break;
-            
+
         case LVN_GETDISPINFO:
             pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)pnmdi->item.lParam;
 
index ab21535..1d6674a 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #ifndef __APPLICATIONPAGE_H
 #define __APPLICATIONPAGE_H
 
index 7525c7b..e8db3cc 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #ifndef __COLUMN_H
 #define __COLUMN_H
 
index e49618e..f0c36ad 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 /* TODO:
@@ -129,16 +129,16 @@ static int change_channel_CB(HANDLE hProcess, void* addr, TCHAR* buffer, void* p
  * Here it gets ugly :-(
  * This is quick hack to get the address of first_dll in a running process
  * We make the following assumptions:
- *      - libwine (lib) is loaded in all processes at the same address (or 
+ *      - libwine (lib) is loaded in all processes at the same address (or
  *        at least at the same address at this process)
  *      - we load the same libwine.so version in this process and in the
  *        examined process
- * Final address is gotten by: 1/ querying the address of a known exported 
+ * Final address is gotten by: 1/ querying the address of a known exported
  * symbol out of libwine.so with dlsym, 2/ then querying nm on libwine.so to
  * get the offset from the data segment of this known symbol and of first_dll,
  * 3/ computing the actual address of first_dll by adding the result of 1/ and
  * the delta of 2/.
- * Ugly, yes, but it somehow works. We should replace that with debughlp 
+ * Ugly, yes, but it somehow works. We should replace that with debughlp
  * library, that'd be way better. Exporting first_dll from libwine.so would make
  * this code simpler, but still ugly.
  */
@@ -180,7 +180,7 @@ void* get_symbol(HANDLE hProcess, const char* name, const char* lib)
             if (stat(buffer + 3, &s) == 0) break;
         }
         free(env);
-        if (!ptr) 
+        if (!ptr)
         {
            printf("Couldn't find %s in LD_LIBRARY_PATH\n", lib);
            return NULL;
@@ -259,7 +259,7 @@ static int enum_channel(HANDLE hProcess, EnumChannelCB ce, void* user, unsigned
             {
                 if (unique)
                 {
-                    /* since some channels are defined in multiple compilation units, 
+                    /* since some channels are defined in multiple compilation units,
                      * they will appear several times...
                      * so cache the channel's names we already reported and don't report
                      * them again
index 295e90e..d7b1ef4 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __DEBUG_H
 #define __DEBUG_H
 
index df0073b..e818109 100644 (file)
@@ -20,7 +20,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 TCHAR                szTemp[256];
index c392b27..f79b757 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __ENDPROC_H
 #define __ENDPROC_H
 
index 1b599c5..59d1196 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 void Font_DrawText(HDC hDC, LPCTSTR lpszText, int x, int y)
@@ -28,11 +28,11 @@ void Font_DrawText(HDC hDC, LPCTSTR lpszText, int x, int y)
     HBITMAP    hFontBitmap;
     HBITMAP    hOldBitmap;
     int        i;
-    
+
     hFontDC = CreateCompatibleDC(hDC);
     hFontBitmap = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_FONT));
     hOldBitmap = (HBITMAP)SelectObject(hFontDC, hFontBitmap);
-    
+
     for (i = 0; i < (int)_tcslen(lpszText); i++) {
         if ((lpszText[i] >= '0') && (lpszText[i] <= '9')) {
             BitBlt(hDC, x + (i * 8), y, 8, 11, hFontDC, (lpszText[i] - '0') * 8, 0, SRCCOPY);
index 53cd41e..3419d44 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __FONT_H
 #define __FONT_H
 
index 51f4f73..0433482 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 LONG                OldGraphWndProc;
@@ -34,7 +34,7 @@ Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     HDC                hdc;
     PAINTSTRUCT        ps;
     LONG            WindowId;
-    
+
     switch (message)
     {
     case WM_ERASEBKGND:
@@ -92,12 +92,12 @@ Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     case WM_SYSDEADCHAR:
     case WM_SYSKEYDOWN:
     case WM_SYSKEYUP:
-            
+
     case WM_NCCALCSIZE:
         return 0;
 
     case WM_PAINT:
-        
+
         hdc = BeginPaint(hWnd, &ps);
 
         WindowId = GetWindowLong(hWnd, GWL_ID);
@@ -114,13 +114,13 @@ Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
             Graph_DrawMemUsageHistoryGraph(hdc, hWnd);
             break;
         }
-        
+
         EndPaint(hWnd, &ps);
-        
+
         return 0;
-        
+
     }
-    
+
     /*
      * We pass on all non-handled messages
      */
@@ -136,24 +136,24 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
     ULONG            CpuUsage;
     ULONG            CpuKernelUsage;
     int                nBars;
-    int                nBarsUsed; 
+    int                nBarsUsed;
 /* Bottom bars that are "used", i.e. are bright green, representing used cpu time */
-    int                nBarsUsedKernel; 
+    int                nBarsUsedKernel;
 /* Bottom bars that are "used", i.e. are bright green, representing used cpu kernel time */
-    int                nBarsFree; 
+    int                nBarsFree;
 /* Top bars that are "unused", i.e. are dark green, representing free cpu time */
     int                i;
-    
+
     /*
      * Get the client area rectangle
      */
     GetClientRect(hWnd, &rcClient);
-    
+
     /*
      * Fill it with blackness
      */
     FillSolidRect(hDC, &rcClient, RGB(0, 0, 0));
-    
+
     /*
      * Get the CPU usage
      */
@@ -180,7 +180,7 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
     {
         _stprintf(Text, _T(" %d%%"), (int)CpuUsage);
     }
-    
+
     /*
      * Draw the font text onto the graph
      * The bottom 20 pixels are reserved for the text
@@ -234,14 +234,14 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
     {
         FillSolidRect(hDC, &rcBarLeft, DARK_GREEN);
         FillSolidRect(hDC, &rcBarRight, DARK_GREEN);
-        
+
         rcBarLeft.top += 3;
         rcBarLeft.bottom += 3;
-        
+
         rcBarRight.top += 3;
         rcBarRight.bottom += 3;
     }
-    
+
     /*
      * Draw the "used" bars
      */
@@ -251,14 +251,14 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
 
         FillSolidRect(hDC, &rcBarLeft, BRIGHT_GREEN);
         FillSolidRect(hDC, &rcBarRight, BRIGHT_GREEN);
-        
+
         rcBarLeft.top += 3;
         rcBarLeft.bottom += 3;
-        
+
         rcBarRight.top += 3;
         rcBarRight.bottom += 3;
     }
-    
+
     /*
      * Draw the "used" kernel bars
      */
@@ -268,16 +268,16 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
     {
         rcBarLeft.top -= 2;
         rcBarLeft.bottom -= 2;
-        
+
         rcBarRight.top -= 2;
         rcBarRight.bottom -= 2;
 
         FillSolidRect(hDC, &rcBarLeft, RED);
         FillSolidRect(hDC, &rcBarRight, RED);
-        
+
         rcBarLeft.top += 2;
         rcBarLeft.bottom += 2;
-        
+
         rcBarRight.top += 2;
         rcBarRight.bottom += 2;
 
@@ -289,10 +289,10 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
 
         FillSolidRect(hDC, &rcBarLeft, RED);
         FillSolidRect(hDC, &rcBarRight, RED);
-        
+
         rcBarLeft.top++;
         rcBarLeft.bottom++;
-        
+
         rcBarRight.top++;
         rcBarRight.bottom++;
 
@@ -300,7 +300,7 @@ void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
         {
             rcBarLeft.top++;
             rcBarLeft.bottom++;
-            
+
             rcBarRight.top++;
             rcBarRight.bottom++;
         }
@@ -316,22 +316,22 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
     ULONGLONG        CommitChargeTotal;
     ULONGLONG        CommitChargeLimit;
     int                nBars;
-    int                nBarsUsed = 0; 
+    int                nBarsUsed = 0;
 /* Bottom bars that are "used", i.e. are bright green, representing used memory */
-    int                nBarsFree; 
+    int                nBarsFree;
 /* Top bars that are "unused", i.e. are dark green, representing free memory */
     int                i;
-    
+
     /*
      * Get the client area rectangle
      */
     GetClientRect(hWnd, &rcClient);
-    
+
     /*
      * Fill it with blackness
      */
     FillSolidRect(hDC, &rcClient, RGB(0, 0, 0));
-    
+
     /*
      * Get the memory usage
      */
@@ -339,7 +339,7 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
     CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK();
 
     _stprintf(Text, _T("%dK"), (int)CommitChargeTotal);
-    
+
     /*
      * Draw the font text onto the graph
      * The bottom 20 pixels are reserved for the text
@@ -370,7 +370,7 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
     rcBarRight.right = rcBarLeft.right + 17;
     rcBarLeft.top = rcBarRight.top = 5;
     rcBarLeft.bottom = rcBarRight.bottom = 7;
-    
+
     /*
      * Draw the "free" bars
      */
@@ -378,14 +378,14 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
     {
         FillSolidRect(hDC, &rcBarLeft, DARK_GREEN);
         FillSolidRect(hDC, &rcBarRight, DARK_GREEN);
-        
+
         rcBarLeft.top += 3;
         rcBarLeft.bottom += 3;
-        
+
         rcBarRight.top += 3;
         rcBarRight.bottom += 3;
     }
-    
+
     /*
      * Draw the "used" bars
      */
@@ -393,10 +393,10 @@ void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
     {
         FillSolidRect(hDC, &rcBarLeft, BRIGHT_GREEN);
         FillSolidRect(hDC, &rcBarRight, BRIGHT_GREEN);
-        
+
         rcBarLeft.top += 3;
         rcBarLeft.bottom += 3;
-        
+
         rcBarRight.top += 3;
         rcBarRight.bottom += 3;
     }
@@ -408,15 +408,15 @@ void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd)
     ULONGLONG        CommitChargeLimit;
     int                i;
     static int        offset = 0;
-    
+
     if (offset++ >= 10)
         offset = 0;
-    
+
     /*
      * Get the client area rectangle
      */
     GetClientRect(hWnd, &rcClient);
-    
+
     /*
      * Fill it with blackness
      */
index 5153cad..8cd0bb6 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __GRAPH_H
 #define __GRAPH_H
 
index d8e2392..c38a677 100644 (file)
@@ -31,18 +31,18 @@ static void GraphCtrl_Init(TGraphCtrl* this)
     this->m_hWnd = 0;
     this->m_hParentWnd = 0;
     this->m_dcGrid = 0;
-    this->m_dcPlot = 0; 
+    this->m_dcPlot = 0;
     this->m_bitmapOldGrid = 0;
     this->m_bitmapOldPlot = 0;
     this->m_bitmapGrid = 0;
     this->m_bitmapPlot = 0;
     this->m_brushBack = 0;
-    
+
     this->m_penPlot[0] = 0;
     this->m_penPlot[1] = 0;
     this->m_penPlot[2] = 0;
     this->m_penPlot[3] = 0;
-    
+
     /* since plotting is based on a LineTo for each new point
      * we need a starting point (i.e. a "previous" point)
      * use 0.0 as the default first point.
@@ -60,7 +60,7 @@ static void GraphCtrl_Init(TGraphCtrl* this)
 
     /*  set some initial values for the scaling until "SetRange" is called.
      *  these are protected varaibles and must be set with SetRange
-     *  in order to ensure that m_dRange is updated accordingly 
+     *  in order to ensure that m_dRange is updated accordingly
      */
     /*   m_dLowerLimit = -10.0; */
     /*   m_dUpperLimit =  10.0; */
@@ -84,7 +84,7 @@ static void GraphCtrl_Init(TGraphCtrl* this)
     this->m_crPlotColor[3] = RGB(255, 255, 100);  /*  see also SetPlotColor */
 
     /*  protected variables */
-    for (i = 0; i < MAX_PLOTS; i++) 
+    for (i = 0; i < MAX_PLOTS; i++)
     {
         this->m_penPlot[i] = CreatePen(PS_SOLID, 0, this->m_crPlotColor[i]);
     }
@@ -104,8 +104,8 @@ TGraphCtrl::~TGraphCtrl()
 {
     /*  just to be picky restore the bitmaps for the two memory dc's */
     /*  (these dc's are being destroyed so there shouldn't be any leaks) */
-    if (m_bitmapOldGrid != NULL) SelectObject(m_dcGrid, m_bitmapOldGrid);  
-    if (m_bitmapOldPlot != NULL) SelectObject(m_dcPlot, m_bitmapOldPlot);  
+    if (m_bitmapOldGrid != NULL) SelectObject(m_dcGrid, m_bitmapOldGrid);
+    if (m_bitmapOldPlot != NULL) SelectObject(m_dcPlot, m_bitmapOldPlot);
     if (m_bitmapGrid    != NULL) DeleteObject(m_bitmapGrid);
     if (m_bitmapPlot    != NULL) DeleteObject(m_bitmapPlot);
     if (m_dcGrid        != NULL) DeleteDC(m_dcGrid);
@@ -114,7 +114,7 @@ TGraphCtrl::~TGraphCtrl()
 }
 #endif
 
-BOOL GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd, UINT nID) 
+BOOL GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd, UINT nID)
 {
     BOOL result = 0;
 
@@ -134,7 +134,7 @@ void GraphCtrl_SetRange(TGraphCtrl* this, double dLower, double dUpper, int nDec
     this->m_dUpperLimit     = dUpper;
     this->m_nYDecimals      = nDecimalPlaces;
     this->m_dRange          = this->m_dUpperLimit - this->m_dLowerLimit;
-    this->m_dVerticalFactor = (double)this->m_nPlotHeight / this->m_dRange; 
+    this->m_dVerticalFactor = (double)this->m_nPlotHeight / this->m_dRange;
     /*  clear out the existing garbage, re-start with a clean plot */
     GraphCtrl_InvalidateCtrl(this);
 }
@@ -205,7 +205,7 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
         this->m_bitmapGrid = CreateCompatibleBitmap(dc, this->m_nClientWidth, this->m_nClientHeight);
         this->m_bitmapOldGrid = (HBITMAP)SelectObject(this->m_dcGrid, this->m_bitmapGrid);
     }
-  
+
     SetBkColor(this->m_dcGrid, this->m_crBackColor);
 
     /*  fill the grid background */
@@ -218,7 +218,7 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
 
     /*  add the units digit, decimal point and a minus sign, and an extra space */
     /*  as well as the number of decimal places to display */
-    nCharacters = nCharacters + 4 + this->m_nYDecimals;  
+    nCharacters = nCharacters + 4 + this->m_nYDecimals;
 
     /*  adjust the plot rectangle dimensions */
     /*  assume 6 pixels per character (this may need to be adjusted) */
@@ -227,24 +227,24 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
     this->m_nPlotWidth    = this->m_rectPlot.right - this->m_rectPlot.left;/* m_rectPlot.Width(); */
 
     /*  draw the plot rectangle */
-    oldPen = (HPEN)SelectObject(this->m_dcGrid, solidPen); 
+    oldPen = (HPEN)SelectObject(this->m_dcGrid, solidPen);
     MoveToEx(this->m_dcGrid, this->m_rectPlot.left, this->m_rectPlot.top, NULL);
     LineTo(this->m_dcGrid, this->m_rectPlot.right+1, this->m_rectPlot.top);
     LineTo(this->m_dcGrid, this->m_rectPlot.right+1, this->m_rectPlot.bottom+1);
     LineTo(this->m_dcGrid, this->m_rectPlot.left, this->m_rectPlot.bottom+1);
     /*   LineTo(m_dcGrid, m_rectPlot.left, m_rectPlot.top); */
-    SelectObject(this->m_dcGrid, oldPen); 
+    SelectObject(this->m_dcGrid, oldPen);
     DeleteObject(solidPen);
 
-    /*  draw the dotted lines, 
-     *  use SetPixel instead of a dotted pen - this allows for a 
+    /*  draw the dotted lines,
+     *  use SetPixel instead of a dotted pen - this allows for a
      *  finer dotted line and a more "technical" look
      */
     nMidGridPix    = (this->m_rectPlot.top + this->m_rectPlot.bottom)/2;
     nTopGridPix    = nMidGridPix - this->m_nPlotHeight/4;
     nBottomGridPix = nMidGridPix + this->m_nPlotHeight/4;
 
-    for (i=this->m_rectPlot.left; i<this->m_rectPlot.right; i+=2) 
+    for (i=this->m_rectPlot.left; i<this->m_rectPlot.right; i+=2)
     {
         SetPixel(this->m_dcGrid, i, nTopGridPix,    this->m_crGridColor);
         SetPixel(this->m_dcGrid, i, nMidGridPix,    this->m_crGridColor);
@@ -267,20 +267,20 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
     /*  (these may need to be adjusted depending on the display) */
     axisFont = CreateFont (14, 0, 0, 0, 300,
                            FALSE, FALSE, 0, ANSI_CHARSET,
-                           OUT_DEFAULT_PRECIS, 
+                           OUT_DEFAULT_PRECIS,
                            CLIP_DEFAULT_PRECIS,
-                           DEFAULT_QUALITY, 
+                           DEFAULT_QUALITY,
                            DEFAULT_PITCH|FF_SWISS, "Arial");
     yUnitFont = CreateFont (14, 0, 900, 0, 300,
                             FALSE, FALSE, 0, ANSI_CHARSET,
-                            OUT_DEFAULT_PRECIS, 
+                            OUT_DEFAULT_PRECIS,
                             CLIP_DEFAULT_PRECIS,
-                            DEFAULT_QUALITY, 
+                            DEFAULT_QUALITY,
                             DEFAULT_PITCH|FF_SWISS, "Arial");
-  
+
     /*  grab the horizontal font */
     oldFont = (HFONT)SelectObject(m_dcGrid, axisFont);
-  
+
     /*  y max */
     SetTextColor(m_dcGrid, m_crGridColor);
     SetTextAlign(m_dcGrid, TA_RIGHT|TA_TOP);
@@ -298,12 +298,12 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
 
     /*  x max */
     SetTextAlign(m_dcGrid, TA_RIGHT|TA_TOP);
-    sprintf(strTemp, "%d", m_nPlotWidth/m_nShiftPixels); 
+    sprintf(strTemp, "%d", m_nPlotWidth/m_nShiftPixels);
     TextOut(m_dcGrid, m_rectPlot.right, m_rectPlot.bottom+4, strTemp, _tcslen(strTemp));
 
     /*  x units */
     SetTextAlign(m_dcGrid, TA_CENTER|TA_TOP);
-    TextOut(m_dcGrid, (m_rectPlot.left+m_rectPlot.right)/2, 
+    TextOut(m_dcGrid, (m_rectPlot.left+m_rectPlot.right)/2,
             m_rectPlot.bottom+4, m_strXUnitsString, _tcslen(m_strXUnitsString));
 
     /*  restore the font */
@@ -312,15 +312,15 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
     /*  y units */
     oldFont = (HFONT)SelectObject(m_dcGrid, yUnitFont);
     SetTextAlign(m_dcGrid, TA_CENTER|TA_BASELINE);
-    TextOut(m_dcGrid, (m_rectClient.left+m_rectPlot.left)/2, 
+    TextOut(m_dcGrid, (m_rectClient.left+m_rectPlot.left)/2,
             (m_rectPlot.bottom+m_rectPlot.top)/2, m_strYUnitsString, _tcslen(m_strYUnitsString));
     SelectObject(m_dcGrid, oldFont);
 #endif
     /*  at this point we are done filling the the grid bitmap,  */
     /*  no more drawing to this bitmap is needed until the setting are changed */
-  
+
     /*  if we don't have one yet, set up a memory dc for the plot */
-    if (this->m_dcPlot == NULL) 
+    if (this->m_dcPlot == NULL)
     {
         this->m_dcPlot = CreateCompatibleDC(dc);
         this->m_bitmapPlot = CreateCompatibleBitmap(dc, this->m_nClientWidth, this->m_nClientHeight);
@@ -336,13 +336,13 @@ void GraphCtrl_InvalidateCtrl(TGraphCtrl* this)
     ReleaseDC(this->m_hParentWnd, dc);
 }
 
-double GraphCtrl_AppendPoint(TGraphCtrl* this, 
+double GraphCtrl_AppendPoint(TGraphCtrl* this,
                              double dNewPoint0, double dNewPoint1,
                              double dNewPoint2, double dNewPoint3)
 {
     /*  append a data point to the plot & return the previous point */
     double dPrevious;
-  
+
     dPrevious = this->m_dCurrentPosition[0];
     this->m_dCurrentPosition[0] = dNewPoint0;
     this->m_dCurrentPosition[1] = dNewPoint1;
@@ -353,7 +353,7 @@ double GraphCtrl_AppendPoint(TGraphCtrl* this,
     return dPrevious;
 }
 
-void GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc) 
+void GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc)
 {
     HDC memDC;
     HBITMAP memBitmap;
@@ -367,14 +367,14 @@ void GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc)
 
     /*  no real plotting work is performed here,  */
     /*  just putting the existing bitmaps on the client */
-    
+
     /*  to avoid flicker, establish a memory dc, draw to it */
     /*  and then BitBlt it to the client */
     memDC = CreateCompatibleDC(dc);
     memBitmap = (HBITMAP)CreateCompatibleBitmap(dc, this->m_nClientWidth, this->m_nClientHeight);
     oldBitmap = (HBITMAP)SelectObject(memDC, memBitmap);
 
-    if (memDC != NULL) 
+    if (memDC != NULL)
     {
         /*  first drop the grid on the memory dc */
         BitBlt(memDC, 0, 0, this->m_nClientWidth, this->m_nClientHeight, this->m_dcGrid, 0, 0, SRCCOPY);
@@ -400,19 +400,19 @@ void GraphCtrl_DrawPoint(TGraphCtrl* this)
     HPEN oldPen;
     RECT rectCleanUp;
     int i;
-    
-    if (this->m_dcPlot != NULL) 
+
+    if (this->m_dcPlot != NULL)
     {
-        /*  shift the plot by BitBlt'ing it to itself 
+        /*  shift the plot by BitBlt'ing it to itself
          *  note: the m_dcPlot covers the entire client
-         *        but we only shift bitmap that is the size 
+         *        but we only shift bitmap that is the size
          *        of the plot rectangle
          *  grab the right side of the plot (exluding m_nShiftPixels on the left)
          *  move this grabbed bitmap to the left by m_nShiftPixels
          */
-        BitBlt(this->m_dcPlot, this->m_rectPlot.left, this->m_rectPlot.top+1, 
-               this->m_nPlotWidth, this->m_nPlotHeight, this->m_dcPlot, 
-               this->m_rectPlot.left+this->m_nShiftPixels, this->m_rectPlot.top+1, 
+        BitBlt(this->m_dcPlot, this->m_rectPlot.left, this->m_rectPlot.top+1,
+               this->m_nPlotWidth, this->m_nPlotHeight, this->m_dcPlot,
+               this->m_rectPlot.left+this->m_nShiftPixels, this->m_rectPlot.top+1,
                SRCCOPY);
 
         /*  establish a rectangle over the right side of plot */
@@ -424,14 +424,14 @@ void GraphCtrl_DrawPoint(TGraphCtrl* this)
         FillRect(this->m_dcPlot, &rectCleanUp, this->m_brushBack);
 
         /*  draw the next line segement */
-        for (i = 0; i < MAX_PLOTS; i++) 
+        for (i = 0; i < MAX_PLOTS; i++)
         {
             /*  grab the plotting pen */
             oldPen = (HPEN)SelectObject(this->m_dcPlot, this->m_penPlot[i]);
 
             /*  move to the previous point */
             prevX = this->m_rectPlot.right-this->m_nPlotShiftPixels;
-            prevY = this->m_rectPlot.bottom - 
+            prevY = this->m_rectPlot.bottom -
                 (long)((this->m_dPreviousPosition[i] - this->m_dLowerLimit) * this->m_dVerticalFactor);
             MoveToEx(this->m_dcPlot, prevX, prevY, NULL);
 
@@ -449,7 +449,7 @@ void GraphCtrl_DrawPoint(TGraphCtrl* this)
              *  this will facilitate clipping on an as needed basis
              *  as opposed to always calling IntersectClipRect
              */
-            if ((prevY <= this->m_rectPlot.top) || (currY <= this->m_rectPlot.top)) 
+            if ((prevY <= this->m_rectPlot.top) || (currY <= this->m_rectPlot.top))
             {
                 RECT rc;
                 rc.bottom = this->m_rectPlot.top+1;
@@ -458,7 +458,7 @@ void GraphCtrl_DrawPoint(TGraphCtrl* this)
                 rc.top = this->m_rectClient.top;
                 FillRect(this->m_dcPlot, &rc, this->m_brushBack);
             }
-            if ((prevY >= this->m_rectPlot.bottom) || (currY >= this->m_rectPlot.bottom)) 
+            if ((prevY >= this->m_rectPlot.bottom) || (currY >= this->m_rectPlot.bottom))
             {
                 RECT rc;
                 rc.bottom = this->m_rectClient.bottom+1;
@@ -475,7 +475,7 @@ void GraphCtrl_DrawPoint(TGraphCtrl* this)
     }
 }
 
-void GraphCtrl_Resize(TGraphCtrl* this) 
+void GraphCtrl_Resize(TGraphCtrl* this)
 {
     /*  NOTE: Resize automatically gets called during the setup of the control */
     GetClientRect(this->m_hWnd, &this->m_rectClient);
@@ -487,12 +487,12 @@ void GraphCtrl_Resize(TGraphCtrl* this)
     /*  the "left" coordinate and "width" will be modified in  */
     /*  InvalidateCtrl to be based on the width of the y axis scaling */
 #if 0
-    this->m_rectPlot.left   = 20;  
+    this->m_rectPlot.left   = 20;
     this->m_rectPlot.top    = 10;
     this->m_rectPlot.right  = this->m_rectClient.right-10;
     this->m_rectPlot.bottom = this->m_rectClient.bottom-25;
 #else
-    this->m_rectPlot.left   = 0;  
+    this->m_rectPlot.left   = 0;
     this->m_rectPlot.top    = -1;
     this->m_rectPlot.right  = this->m_rectClient.right-0;
     this->m_rectPlot.bottom = this->m_rectClient.bottom-0;
@@ -504,7 +504,7 @@ void GraphCtrl_Resize(TGraphCtrl* this)
 
     /*  set the scaling factor for now, this can be adjusted  */
     /*  in the SetRange functions */
-    this->m_dVerticalFactor = (double)this->m_nPlotHeight / this->m_dRange; 
+    this->m_dVerticalFactor = (double)this->m_nPlotHeight / this->m_dRange;
 }
 
 #if 0
@@ -527,14 +527,14 @@ GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     RECT        rcClient;
     HDC            hdc;
     PAINTSTRUCT     ps;
-    
-    switch (message) 
+
+    switch (message)
     {
     case WM_ERASEBKGND:
         return TRUE;
-    /* 
+    /*
      *  Filter out mouse  & keyboard messages
-     */ 
+     */
     /* case WM_APPCOMMAND: */
     case WM_CAPTURECHANGED:
     case WM_LBUTTONDBLCLK:
@@ -590,12 +590,12 @@ GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
         return 0;
 
     case WM_SIZE:
-        if (hWnd == hPerformancePageMemUsageHistoryGraph) 
+        if (hWnd == hPerformancePageMemUsageHistoryGraph)
         {
             GraphCtrl_Resize(&PerformancePageMemUsageHistoryGraph);
             GraphCtrl_InvalidateCtrl(&PerformancePageMemUsageHistoryGraph);
         }
-        if (hWnd == hPerformancePageCpuUsageHistoryGraph) 
+        if (hWnd == hPerformancePageCpuUsageHistoryGraph)
         {
             GraphCtrl_Resize(&PerformancePageCpuUsageHistoryGraph);
             GraphCtrl_InvalidateCtrl(&PerformancePageCpuUsageHistoryGraph);
@@ -612,9 +612,9 @@ GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
         EndPaint(hWnd, &ps);
         return 0;
     }
-    
-    /* 
+
+    /*
      *  We pass on all non-handled messages
-     */ 
+     */
     return CallWindowProc((WNDPROC)OldGraphCtrlWndProc, hWnd, message, wParam, lParam);
 }
index 5a2e22b..265d5b9 100644 (file)
@@ -54,7 +54,7 @@ typedef struct
   COLORREF m_crBackColor;                 /* background color */
   COLORREF m_crGridColor;                 /* grid color */
   COLORREF m_crPlotColor[MAX_PLOTS];      /* data color   */
-  
+
   double m_dCurrentPosition[MAX_PLOTS];   /* current position */
   double m_dPreviousPosition[MAX_PLOTS];  /* previous position */
 
@@ -86,22 +86,22 @@ typedef struct
 } TGraphCtrl;
 
 extern LONG OldGraphCtrlWndProc;
-double  GraphCtrl_AppendPoint(TGraphCtrl* this, 
+double  GraphCtrl_AppendPoint(TGraphCtrl* this,
                               double dNewPoint0, double dNewPoint1,
                               double dNewPoint2, double dNewPoint3);
-BOOL    GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd, 
+BOOL    GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd,
 UINT nID);
 void    GraphCtrl_DrawPoint(TGraphCtrl* this);
 void    GraphCtrl_InvalidateCtrl(TGraphCtrl* this);
 void    GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc);
 void    GraphCtrl_Reset(TGraphCtrl* this);
-void    GraphCtrl_Resize(TGraphCtrl* this); 
-void    GraphCtrl_SetBackgroundColor(TGraphCtrl* this, COLORREF 
+void    GraphCtrl_Resize(TGraphCtrl* this);
+void    GraphCtrl_SetBackgroundColor(TGraphCtrl* this, COLORREF
 color);
 void    GraphCtrl_SetGridColor(TGraphCtrl* this, COLORREF color);
-void    GraphCtrl_SetPlotColor(TGraphCtrl* this, int plot, COLORREF 
+void    GraphCtrl_SetPlotColor(TGraphCtrl* this, int plot, COLORREF
 color);
-void    GraphCtrl_SetRange(TGraphCtrl* this, double dLower, double 
+void    GraphCtrl_SetRange(TGraphCtrl* this, double dLower, double
 dUpper, int nDecimalPlaces);
 
 INT_PTR CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
index 5377b58..8bc4dd1 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 /*
  * options.c
  *
index 22e5d5b..75c4c21 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 /*
  * Menu item handlers for the options menu.
  */
index 8583dba..e2be4b0 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 CRITICAL_SECTION                 PerfDataCriticalSection;
@@ -42,16 +42,16 @@ PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorTimeInfo = NULL;
 BOOL PerfDataInitialize(void)
 {
     NTSTATUS    status;
-    
+
     InitializeCriticalSection(&PerfDataCriticalSection);
-    
+
     /*
      * Get number of processors in the system
      */
     status = NtQuerySystemInformation(SystemBasicInformation, &SystemBasicInfo, sizeof(SystemBasicInfo), NULL);
     if (status != NO_ERROR)
         return FALSE;
-    
+
     return TRUE;
 }
 
@@ -148,7 +148,7 @@ void PerfDataRefresh(void)
      * Save system cache info
      */
     memcpy(&SystemCacheInfo, &SysCacheInfo, sizeof(SYSTEM_CACHE_INFORMATION));
-    
+
     /*
      * Save system processor time info
      */
@@ -156,13 +156,13 @@ void PerfDataRefresh(void)
         HeapFree(GetProcessHeap(), 0, SystemProcessorTimeInfo);
     }
     SystemProcessorTimeInfo = SysProcessorTimeInfo;
-    
+
     /*
      * Save system handle info
      */
     memcpy(&SystemHandleInfo, SysHandleInfoData, sizeof(SYSTEM_HANDLE_INFORMATION));
     HeapFree(GetProcessHeap(), 0, SysHandleInfoData);
-    
+
     for (CurrentKernelTime=0, Idx=0; Idx<SystemBasicInfo.NumberProcessors; Idx++) {
         CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].KernelTime);
         CurrentKernelTime += Li2Double(SystemProcessorTimeInfo[Idx].DpcTime);
@@ -179,7 +179,7 @@ void PerfDataRefresh(void)
         /*  CurrentCpuIdle = IdleTime / SystemTime */
         dbIdleTime = dbIdleTime / dbSystemTime;
         dbKernelTime = dbKernelTime / dbSystemTime;
-        
+
         /*  CurrentCpuUsage% = 100 - (CurrentCpuIdle * 100) / NumberOfProcessors */
         dbIdleTime = 100.0 - dbIdleTime * 100.0 / (double)SystemBasicInfo.NumberProcessors; /* + 0.5; */
         dbKernelTime = 100.0 - dbKernelTime * 100.0 / (double)SystemBasicInfo.NumberProcessors; /* + 0.5; */
@@ -259,7 +259,7 @@ void PerfDataRefresh(void)
         pPerfData[Idx].HandleCount = pSPI->HandleCount;
         pPerfData[Idx].ThreadCount = pSPI->NumberOfThreads;
         pPerfData[Idx].SessionId = pSPI->SessionId;
-        
+
         if (pSPI->UniqueProcessId != NULL) {
             hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pSPI->UniqueProcessId);
             if (hProcess) {
index 27f8dc8..987243a 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __PERFDATA_H
 #define __PERFDATA_H
 
index 17d7b99..2c82d10 100644 (file)
@@ -19,7 +19,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-       
+
 #include "precomp.h"
 
 TGraphCtrl PerformancePageCpuUsageHistoryGraph;
@@ -93,17 +93,17 @@ void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference,
     }
     InvalidateRect(hCntrl, NULL, TRUE);
 }
-                
+
 void AdjustControlPostion(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference)
 {
     AdjustFrameSize(hCntrl, hDlg, nXDifference, nYDifference, 0);
 }
-                
+
 void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
 {
     AdjustFrameSize(GetDlgItem(hDlg, ctrl_id), hDlg, nXDifference, nYDifference, 0);
 }
-                
+
 INT_PTR CALLBACK
 PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 {
@@ -116,7 +116,7 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
     switch (message) {
        case WM_INITDIALOG:
-               
+
                /*  Save the width and height */
                GetClientRect(hDlg, &rc);
                nPerformancePageWidth = rc.right;
@@ -125,9 +125,9 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
                /*  Update window position */
                SetWindowPos(hDlg, NULL, 15, 30, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
 
-               /* 
+               /*
                 *  Get handles to all the controls
-                */ 
+                */
                hPerformancePageTotalsFrame = GetDlgItem(hDlg, IDC_TOTALS_FRAME);
                hPerformancePageCommitChargeFrame = GetDlgItem(hDlg, IDC_COMMIT_CHARGE_FRAME);
                hPerformancePageKernelMemoryFrame = GetDlgItem(hDlg, IDC_KERNEL_MEMORY_FRAME);
@@ -155,7 +155,7 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
                hPerformancePageMemUsageGraph = GetDlgItem(hDlg, IDC_MEM_USAGE_GRAPH);
                hPerformancePageMemUsageHistoryGraph = GetDlgItem(hDlg, IDC_MEM_USAGE_HISTORY_GRAPH);
         hPerformancePageCpuUsageHistoryGraph = GetDlgItem(hDlg, IDC_CPU_USAGE_HISTORY_GRAPH);
-               
+
                GetClientRect(hPerformancePageCpuUsageHistoryGraph, &rc);
         /*  create the control */
         /* PerformancePageCpuUsageHistoryGraph.Create(0, rc, hDlg, IDC_CPU_USAGE_HISTORY_GRAPH); */
@@ -183,9 +183,9 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
         CreateThread(NULL, 0, PerformancePageRefreshThread, NULL, 0, NULL);
 #endif
 
-               /* 
+               /*
                 *  Subclass graph buttons
-                */ 
+                */
         OldGraphWndProc = SetWindowLongPtr(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (DWORD_PTR)Graph_WndProc);
         SetWindowLongPtr(hPerformancePageMemUsageGraph, GWL_WNDPROC, (DWORD_PTR)Graph_WndProc);
                OldGraphCtrlWndProc = SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC, (DWORD_PTR)GraphCtrl_WndProc);
@@ -255,9 +255,9 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
         AdjustControlPostion(hPerformancePageTotalsProcessCountEdit, hDlg, 0, nYDifference);
         AdjustControlPostion(hPerformancePageTotalsThreadCountEdit, hDlg, 0, nYDifference);
 
-        nXDifference += lastX; 
-        nYDifference += lastY; 
-        lastX = lastY = 0; 
+        nXDifference += lastX;
+        nYDifference += lastY;
+        lastX = lastY = 0;
         if (nXDifference % 2) {
             if (nXDifference > 0) {
                 nXDifference--;
@@ -349,9 +349,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
                        /*  Reset our event */
                        ResetEvent(hPerformancePageEvent);
 
-                       /* 
+                       /*
                         *  Update the commit charge info
-                        */ 
+                        */
                        CommitChargeTotal = PerfDataGetCommitChargeTotalK();
                        CommitChargeLimit = PerfDataGetCommitChargeLimitK();
                        CommitChargePeak = PerfDataGetCommitChargePeakK();
@@ -364,9 +364,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
                        wsprintf(Text, szMemUsage, CommitChargeTotal, CommitChargeLimit);
                        SendMessage(hStatusWnd, SB_SETTEXT, 2, (LPARAM)Text);
 
-                       /* 
+                       /*
                         *  Update the kernel memory info
-                        */ 
+                        */
                        KernelMemoryTotal = PerfDataGetKernelMemoryTotalK();
                        KernelMemoryPaged = PerfDataGetKernelMemoryPagedK();
                        KernelMemoryNonPaged = PerfDataGetKernelMemoryNonPagedK();
@@ -377,9 +377,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
                        _ultot(KernelMemoryNonPaged, Text, 10);
                        SetWindowText(hPerformancePageKernelMemoryNonPagedEdit, Text);
 
-                       /* 
+                       /*
                         *  Update the physical memory info
-                        */ 
+                        */
                        PhysicalMemoryTotal = PerfDataGetPhysicalMemoryTotalK();
                        PhysicalMemoryAvailable = PerfDataGetPhysicalMemoryAvailableK();
                        PhysicalMemorySystemCache = PerfDataGetPhysicalMemorySystemCacheK();
@@ -390,9 +390,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
                        _ultot(PhysicalMemorySystemCache, Text, 10);
                        SetWindowText(hPerformancePagePhysicalMemorySystemCacheEdit, Text);
 
-                       /* 
+                       /*
                         *  Update the totals info
-                        */ 
+                        */
                        TotalHandles = PerfDataGetSystemHandleCount();
                        TotalThreads = PerfDataGetTotalThreadCount();
                        TotalProcesses = PerfDataGetProcessCount();
@@ -403,15 +403,15 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
                        _ultot(TotalProcesses, Text, 10);
                        SetWindowText(hPerformancePageTotalsProcessCountEdit, Text);
 
-                       /* 
+                       /*
                         *  Redraw the graphs
-                        */ 
+                        */
                        InvalidateRect(hPerformancePageCpuUsageGraph, NULL, FALSE);
                        InvalidateRect(hPerformancePageMemUsageGraph, NULL, FALSE);
 
-               /* 
+               /*
                 *  Get the CPU usage
-                */ 
+                */
                CpuUsage = PerfDataGetProcessorUsage();
                CpuKernelUsage = PerfDataGetProcessorSystemUsage();
                if (CpuUsage < 0 )        CpuUsage = 0;
@@ -419,9 +419,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
                if (CpuKernelUsage < 0)   CpuKernelUsage = 0;
                if (CpuKernelUsage > 100) CpuKernelUsage = 100;
 
-            /* 
+            /*
              *  Get the memory usage
-             */ 
+             */
             CommitChargeTotal = (ULONGLONG)PerfDataGetCommitChargeTotalK();
             CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK();
             nBarsUsed1 = CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0;
index c92e048..b5e803e 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __PERFORMANCEPAGE_H
 #define __PERFORMANCEPAGE_H
 
index 888d7ab..4d5fc85 100644 (file)
@@ -20,7 +20,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 TCHAR                szTemp[256];
index 6a1b8d5..a87e8da 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __PRIORITY_H
 #define __PRIORITY_H
 
index 281147c..2614880 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 
@@ -99,7 +99,7 @@ ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
          * saved earlier
          */
         RestoreDC(hDC, DcSave);
-        
+
         return TRUE;
     }
 
index d9fbb18..3bc8de7 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __PROCLIST_H
 #define __PROCLIST_H
 
index 018376d..2fb59fe 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 HWND hProcessPage;                        /* Process List Property Page */
@@ -121,14 +121,14 @@ ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
         cy = (rc.bottom - rc.top) + nYDifference;
         SetWindowPos(hProcessPageListCtrl, NULL, 0, 0, cx, cy, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
         InvalidateRect(hProcessPageListCtrl, NULL, TRUE);
-        
+
         GetClientRect(hProcessPageEndProcessButton, &rc);
         MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
            cx = rc.left + nXDifference;
         cy = rc.top + nYDifference;
         SetWindowPos(hProcessPageEndProcessButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
         InvalidateRect(hProcessPageEndProcessButton, NULL, TRUE);
-        
+
         GetClientRect(hProcessPageShowAllProcessesButton, &rc);
         MapWindowPoints(hProcessPageShowAllProcessesButton, hDlg, (LPPOINT)(PRECT)(&rc), (sizeof(RECT)/sizeof(POINT)) );
            cx = rc.left;
@@ -175,12 +175,12 @@ void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
             ProcessPageUpdate();
             break;
         #endif
-            
+
         case LVN_GETDISPINFO:
 
             if (!(pnmdi->item.mask & LVIF_TEXT))
                 break;
-            
+
             ColumnIndex = pnmdi->item.iSubItem;
             Index = pnmdi->item.iItem;
 
@@ -432,7 +432,7 @@ void ProcessPageShowContextMenu(DWORD dwProcessId)
 
     if (si.dwNumberOfProcessors < 2)
         RemoveMenu(hSubMenu, ID_PROCESS_PAGE_SETAFFINITY, MF_BYCOMMAND);
-    
+
     if (!DebugChannelsAreSupported())
         RemoveMenu(hSubMenu, ID_PROCESS_PAGE_DEBUGCHANNELS, MF_BYCOMMAND);
 
index 1d4268d..439e2a9 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __PROCESSPAGE_H
 #define __PROCESSPAGE_H
 
index d5fc2d7..921707a 100644 (file)
 
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        157
index a3c3b7c..92f3989 100644 (file)
@@ -20,7 +20,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 void TaskManager_OnFileNew(void)
@@ -46,12 +46,12 @@ void TaskManager_OnFileNew(void)
         {
             WCHAR wTitle[40];
             WCHAR wText[256];
-            
+
             /* RunFileDlg is always unicode on NT systems, convert the ansi
                strings to unicode */
             MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szTitle, -1, wTitle, sizeof(szTitle) / sizeof(szTitle[0]));
             MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szText, -1, wText, sizeof(szText) / sizeof(szText[0]));
-            
+
             RunFileDlg(hMainWnd, 0, NULL, wTitle, wText, RFF_CALCDIRECTORY);
         }
         else
index 1cf1783..349e76a 100644 (file)
@@ -18,7 +18,7 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *     
+ *
  * run.h - definitions necessary to use Microsoft's "Run" dialog
  * Undocumented Windows call
  * use the type below to declare a function pointer
 void TaskManager_OnFileNew(void);
 
 typedef        void (WINAPI *RUNFILEDLG)(
-HWND    hwndOwner, 
-HICON   hIcon, 
+HWND    hwndOwner,
+HICON   hIcon,
 LPCWSTR lpstrDirectory,
 LPCWSTR lpstrTitle,
 LPCWSTR  lpstrDescription,
-UINT    uFlags); 
+UINT    uFlags);
 
 /*
  * Flags for RunFileDlg
index 72df058..66ae882 100644 (file)
@@ -49,8 +49,8 @@ int APIENTRY WinMain(HINSTANCE hInstance,
                      int       nCmdShow)
 {
     HANDLE hProcess;
-    HANDLE hToken; 
-    TOKEN_PRIVILEGES tkp; 
+    HANDLE hToken;
+    TOKEN_PRIVILEGES tkp;
 
     /* Initialize global variables */
     hInst = hInstance;
@@ -61,19 +61,19 @@ int APIENTRY WinMain(HINSTANCE hInstance,
     CloseHandle(hProcess);
 
     /* Now lets get the SE_DEBUG_NAME privilege
-     * so that we can debug processes 
+     * so that we can debug processes
      */
 
     /* Get a token for this process.  */
     if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {
         /* Get the LUID for the debug privilege.  */
-        LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid); 
+        LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
 
         tkp.PrivilegeCount = 1;  /* one privilege to set */
-        tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 
+        tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
 
         /* Get the debug privilege for this process. */
-        AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0); 
+        AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);
     }
 
     /* Load our settings from the registry */
@@ -85,7 +85,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
     }
 
     DialogBox(hInst, (LPCTSTR)IDD_TASKMGR_DIALOG, NULL, TaskManagerWndProc);
+
     /* Save our settings to the registry */
     SaveSettings();
     PerfDataUninitialize();
@@ -237,7 +237,7 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
         case ID_FILE_EXIT:
             EndDialog(hDlg, IDOK);
             break;
-        }     
+        }
         break;
 
     case WM_ONTRAYICON:
@@ -248,14 +248,14 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
             POINT pt;
             BOOL OnTop;
             HMENU hMenu, hPopupMenu;
-            
+
             GetCursorPos(&pt);
-            
+
             OnTop = ((GetWindowLong(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
-            
+
             hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_TRAY_POPUP));
             hPopupMenu = GetSubMenu(hMenu, 0);
-            
+
             if(IsWindowVisible(hMainWnd))
             {
               DeleteMenu(hPopupMenu, ID_RESTORE, MF_BYCOMMAND);
@@ -264,15 +264,15 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
             {
               SetMenuDefaultItem(hPopupMenu, ID_RESTORE, FALSE);
             }
-            
+
             if(OnTop)
             {
               CheckMenuItem(hPopupMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND | MF_CHECKED);
             }
-            
+
             SetForegroundWindow(hMainWnd);
             TrackPopupMenuEx(hPopupMenu, 0, pt.x, pt.y, hMainWnd, NULL);
-            
+
             DestroyMenu(hMenu);
             break;
             }
@@ -356,7 +356,7 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
         else
             TaskManagerSettings.Maximized = FALSE;
         return DefWindowProc(hDlg, message, wParam, lParam);
-        
+
     case WM_TIMER:
         /* Refresh the performance data */
         PerfDataRefresh();
@@ -651,13 +651,13 @@ void OnSize( UINT nType, int cx, int cy )
     cx = (rc.right - rc.left) + nXDifference;
     cy = (rc.bottom - rc.top) + nYDifference;
     SetWindowPos(hApplicationPage, NULL, 0, 0, cx, cy, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
-    
+
     /* Resize the process page */
     GetWindowRect(hProcessPage, &rc);
     cx = (rc.right - rc.left) + nXDifference;
     cy = (rc.bottom - rc.top) + nYDifference;
     SetWindowPos(hProcessPage, NULL, 0, 0, cx, cy, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
-    
+
     /* Resize the performance page */
     GetWindowRect(hPerformancePage, &rc);
     cx = (rc.right - rc.left) + nXDifference;
@@ -802,7 +802,7 @@ void TaskManager_OnRestoreMainWindow(void)
   hMenu = GetMenu(hMainWnd);
   hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX);
   OnTop = ((GetWindowLong(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0);
-  
+
   OpenIcon(hMainWnd);
   SetForegroundWindow(hMainWnd);
   SetWindowPos(hMainWnd, (OnTop ? HWND_TOPMOST : HWND_TOP), 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW);
index 32682bf..ad01d5e 100644 (file)
@@ -68,7 +68,7 @@ typedef struct
 
        /* Update speed settings */
        /* How many half-seconds in between updates (i.e. 0 - Paused, 1 - High, 2 - Normal, 4 - Low) */
-       int     UpdateSpeed; 
+       int     UpdateSpeed;
 
        /* Applications page settings */
        BOOL    View_LargeIcons;
index dfc4e5a..79f8bf8 100644 (file)
@@ -20,7 +20,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-    
+
 #include "precomp.h"
 
 HICON TrayIcon_GetProcessorUsageIcon(void)
@@ -43,7 +43,7 @@ HICON TrayIcon_GetProcessorUsageIcon(void)
     hScreenDC = GetDC(NULL);
     if (!hScreenDC)
         goto done;
-    
+
     /*
      * Create our own DC from it
      */
@@ -62,7 +62,7 @@ HICON TrayIcon_GetProcessorUsageIcon(void)
     hBitmapBrush = CreateSolidBrush(RGB(0, 255, 0));
     if (!hBitmapBrush)
         goto done;
-    
+
     /*
      * Select the bitmap into our device context
      * so we can draw on it.
@@ -98,7 +98,7 @@ HICON TrayIcon_GetProcessorUsageIcon(void)
      */
     SelectObject(hDC, hOldBitmap);
     hOldBitmap = NULL;
-    
+
     iconInfo.fIcon = TRUE;
     iconInfo.xHotspot = 0;
     iconInfo.yHotspot = 0;
@@ -123,7 +123,7 @@ done:
         DeleteObject(hBitmap);
     if (hBitmapMask)
         DeleteObject(hBitmapMask);
-    
+
     /*
      * Return the newly created tray icon (if successful)
      */
@@ -160,17 +160,17 @@ BOOL TrayIcon_ShellRemoveTrayIcon(void)
 {
     NOTIFYICONDATA    nid;
     BOOL            bRetVal;
-    
+
     memset(&nid, 0, sizeof(NOTIFYICONDATA));
-    
+
     nid.cbSize = sizeof(NOTIFYICONDATA);
     nid.hWnd = hMainWnd;
     nid.uID = 0;
     nid.uFlags = 0;
     nid.uCallbackMessage = WM_ONTRAYICON;
-    
+
     bRetVal = Shell_NotifyIcon(NIM_DELETE, &nid);
-    
+
     return bRetVal;
 }
 
@@ -180,11 +180,11 @@ BOOL TrayIcon_ShellUpdateTrayIcon(void)
     HICON           hIcon = NULL;
     BOOL            bRetVal;
     TCHAR           szTemp[256];
-    
+
     memset(&nid, 0, sizeof(NOTIFYICONDATA));
-    
+
     hIcon = TrayIcon_GetProcessorUsageIcon();
-    
+
     nid.cbSize = sizeof(NOTIFYICONDATA);
     nid.hWnd = hMainWnd;
     nid.uID = 0;
@@ -193,11 +193,11 @@ BOOL TrayIcon_ShellUpdateTrayIcon(void)
     nid.hIcon = hIcon;
     LoadString(hInst, IDS_MSG_TRAYICONCPUUSAGE, szTemp, 256);
     wsprintf(nid.szTip, szTemp, PerfDataGetProcessorUsage());
-    
+
     bRetVal = Shell_NotifyIcon(NIM_MODIFY, &nid);
-    
+
     if (hIcon)
         DestroyIcon(hIcon);
-    
+
     return bRetVal;
 }
index 7bd0834..4e44357 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-       
+
 #ifndef __TRAYICON_H
 #define __TRAYICON_H
 
index 9edd5bf..eb4292c 100644 (file)
@@ -38,9 +38,9 @@ BOOL GetShell(WCHAR *CommandLine)
   DWORD Type, Size;
   WCHAR Shell[MAX_PATH];
   BOOL Ret = FALSE;
-  
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
-                  L"SOFTWARE\\ReactOS\\Windows NT\\CurrentVersion\\Winlogon", 
+
+  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                  L"SOFTWARE\\ReactOS\\Windows NT\\CurrentVersion\\Winlogon",
                   0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
   {
     Size = MAX_PATH * sizeof(WCHAR);
@@ -59,7 +59,7 @@ BOOL GetShell(WCHAR *CommandLine)
     }
     RegCloseKey(hKey);
   }
-  
+
   if(!Ret)
   {
     if(GetWindowsDirectory(CommandLine, MAX_PATH - 13))
@@ -67,7 +67,7 @@ BOOL GetShell(WCHAR *CommandLine)
     else
       wcscpy(CommandLine, L"explorer.exe");
   }
-  
+
   return Ret;
 }
 
@@ -79,15 +79,15 @@ void StartShell(void)
   WCHAR Shell[MAX_PATH];
   WCHAR ExpandedShell[MAX_PATH];
   TCHAR szMsg[RC_STRING_MAX_SIZE];
-  
+
   GetShell(Shell);
-  
+
   ZeroMemory(&si, sizeof(STARTUPINFO));
   si.cb = sizeof(STARTUPINFO);
   ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
-  
+
   ExpandEnvironmentStrings(Shell, ExpandedShell, MAX_PATH);
-  
+
   if(CreateProcess(NULL,
                    ExpandedShell,
                    NULL,
@@ -116,7 +116,7 @@ void SetUserSettings(void)
   HKEY hKey;
   DWORD Type, Size;
   WCHAR szWallpaper[MAX_PATH + 1];
-  
+
   if(RegOpenKeyEx(HKEY_CURRENT_USER,
                   L"Control Panel\\Desktop",
                   0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
index 5e50130..b1216d0 100644 (file)
@@ -173,7 +173,7 @@ CreateCommonFreeLoaderSections(PINICACHE IniCache)
                    INSERT_LAST,
                    L"SelectedColor",
                    L"Gray");
-                   
+
   /* TimeOut=5 */
   IniCacheInsertKey(IniSection,
                    NULL,
index 64dedeb..c876a6e 100755 (executable)
@@ -140,7 +140,7 @@ MSZipCodecUncompress(PVOID OutputBuffer,
       DPRINT("Bad MSZIP block header magic (0x%X)\n", Magic);
       return CS_BADSTREAM;
     }
-       
+
        ZStream.next_in   = (PUCHAR)((ULONG)InputBuffer + 2);
        ZStream.avail_in  = InputLength - 2;
        ZStream.next_out  = (PUCHAR)OutputBuffer;
@@ -210,10 +210,10 @@ SeekInFile(HANDLE hFile,
   NTSTATUS errCode;
   IO_STATUS_BLOCK IoStatusBlock;
   LARGE_INTEGER Distance;
-  
+
   DPRINT("SeekInFile(hFile %x, lDistanceToMove %d, dwMoveMethod %d)\n",
     hFile,lDistanceToMove,dwMoveMethod);
-  
+
   Distance.u.LowPart = lDistanceToMove;
   if (lpDistanceToMoveHigh)
     {
@@ -227,7 +227,7 @@ SeekInFile(HANDLE hFile,
     {
       Distance.u.HighPart = -1;
     }
-  
+
   if (dwMoveMethod == SEEK_CURRENT)
     {
       NtQueryInformationFile(hFile,
@@ -251,7 +251,7 @@ SeekInFile(HANDLE hFile,
     {
       FilePosition.CurrentByteOffset.QuadPart = Distance.QuadPart;
     }
-  
+
 //  DPRINT1("GOTO FILE OFFSET: %I64d\n", FilePosition.CurrentByteOffset.QuadPart);
 
   errCode = NtSetInformationFile(hFile,
@@ -267,7 +267,7 @@ SeekInFile(HANDLE hFile,
         }
       return -1;
     }
-  
+
   if (lpDistanceToMoveHigh != NULL)
     {
       *lpDistanceToMoveHigh = FilePosition.CurrentByteOffset.u.HighPart;
@@ -282,12 +282,12 @@ SeekInFile(HANDLE hFile,
 
 static BOOL
 ConvertSystemTimeToFileTime(
-  CONST SYSTEMTIME *  lpSystemTime,    
+  CONST SYSTEMTIME *  lpSystemTime,
   LPFILETIME  lpFileTime)
 {
   TIME_FIELDS TimeFields;
   LARGE_INTEGER liTime;
-  
+
   TimeFields.Year = lpSystemTime->wYear;
   TimeFields.Month = lpSystemTime->wMonth;
   TimeFields.Day = lpSystemTime->wDay;
@@ -295,7 +295,7 @@ ConvertSystemTimeToFileTime(
   TimeFields.Minute = lpSystemTime->wMinute;
   TimeFields.Second = lpSystemTime->wSecond;
   TimeFields.Milliseconds = lpSystemTime->wMilliseconds;
-  
+
   if (RtlTimeFieldsToTime(&TimeFields, &liTime))
     {
       lpFileTime->dwLowDateTime = liTime.u.LowPart;
@@ -315,21 +315,21 @@ ConvertDosDateTimeToFileTime(
   PDOSTIME  pdtime = (PDOSTIME) &wFatTime;
   PDOSDATE  pddate = (PDOSDATE) &wFatDate;
   SYSTEMTIME SystemTime;
-  
+
   if (lpFileTime == NULL)
     return FALSE;
-  
+
   SystemTime.wMilliseconds = 0;
   SystemTime.wSecond = pdtime->Second;
   SystemTime.wMinute = pdtime->Minute;
   SystemTime.wHour = pdtime->Hour;
-  
+
   SystemTime.wDay = pddate->Day;
   SystemTime.wMonth = pddate->Month;
   SystemTime.wYear = 1980 + pddate->Year;
-  
+
   ConvertSystemTimeToFileTime(&SystemTime,lpFileTime);
-  
+
   return TRUE;
 }
 
@@ -345,9 +345,9 @@ GetFileName(PWCHAR Path)
  */
 {
   ULONG i, j;
-  
+
   j = i = 0;
-  
+
   while (Path [i++])
     {
       if (Path[i - 1] == L'\\') j = i;
@@ -366,10 +366,10 @@ RemoveFileName(PWCHAR Path)
 {
   PWCHAR FileName;
   DWORD i;
-  
+
   i = 0;
   FileName = GetFileName(Path + i);
-  
+
   if ((FileName != (Path + i)) && (FileName [-1] == L'\\'))
     FileName--;
   if ((FileName == (Path + i)) && (FileName [0] == L'\\'))
@@ -487,13 +487,13 @@ NewFolderNode()
   Node = (PCFFOLDER_NODE)RtlAllocateHeap (ProcessHeap, 0, sizeof(CFFOLDER_NODE));
   if (!Node)
     return NULL;
-  
+
   RtlZeroMemory(Node, sizeof(CFFOLDER_NODE));
-  
+
   Node->Folder.CompressionType = CAB_COMP_NONE;
-  
+
   Node->Prev = FolderListTail;
-  
+
   if (FolderListTail != NULL)
     {
       FolderListTail->Next = Node;
@@ -503,7 +503,7 @@ NewFolderNode()
       FolderListHead = Node;
     }
   FolderListTail = Node;
-  
+
   return Node;
 }
 
@@ -753,7 +753,7 @@ LocateFolderNode(ULONG Index)
  */
 {
   PCFFOLDER_NODE Node;
-  
+
   switch (Index)
     {
       case CAB_FILE_SPLIT:
@@ -763,7 +763,7 @@ LocateFolderNode(ULONG Index)
       case CAB_FILE_PREV_NEXT:
         return FolderListHead;
     }
-  
+
   Node = FolderListHead;
   while (Node != NULL)
     {
@@ -1135,15 +1135,15 @@ CloseCabinet(VOID)
  */
 {
   DestroyFileNodes();
-  
+
   DestroyFolderNodes();
-  
+
   if (InputBuffer)
     {
       RtlFreeHeap(ProcessHeap, 0, InputBuffer);
       InputBuffer = NULL;
     }
-  
+
   if (OutputBuffer)
     {
       RtlFreeHeap(ProcessHeap, 0, OutputBuffer);
@@ -1167,15 +1167,15 @@ CabinetInitialize(VOID)
 
   FileOpen = FALSE;
   wcscpy(DestPath, L"");
-  
+
   FolderListHead = NULL;
   FolderListTail = NULL;
   FileListHead   = NULL;
   FileListTail   = NULL;
-  
+
   CodecId       = CAB_CODEC_RAW;
   CodecSelected = TRUE;
-  
+
   OutputBuffer = NULL;
   CurrentOBuffer = NULL;
   CurrentOBufferSize = 0;
@@ -1221,7 +1221,7 @@ CabinetNormalizePath(PWCHAR Path,
 {
   ULONG n;
   BOOL OK = TRUE;
-  
+
   if ((n = wcslen(Path)) &&
     (Path[n - 1] != L'\\') &&
     (OK = ((n + 1) < Length)))
@@ -1295,7 +1295,7 @@ CabinetOpen(VOID)
   PCFFOLDER_NODE FolderNode;
   ULONG Status;
   ULONG Index;
-  
+
   if (!FileOpen)
     {
       OBJECT_ATTRIBUTES ObjectAttributes;
@@ -1304,7 +1304,7 @@ CabinetOpen(VOID)
       NTSTATUS NtStatus;
       ULONG BytesRead;
       ULONG Size;
-    
+
       OutputBuffer = RtlAllocateHeap(ProcessHeap, 0, CAB_BLOCKSIZE + 12); // This should be enough
       if (!OutputBuffer)
         return CAB_STATUS_NOMEMORY;
@@ -1329,16 +1329,16 @@ CabinetOpen(VOID)
           DPRINT("Cannot open file (%S) (%x).\n", CabinetName, NtStatus);
           return CAB_STATUS_CANNOT_OPEN;
         }
-    
+
       FileOpen = TRUE;
-    
+
       /* Load CAB header */
       if ((Status = ReadBlock(&CABHeader, sizeof(CFHEADER), &BytesRead)) != CAB_STATUS_SUCCESS)
         {
           DPRINT("Cannot read from file (%d).\n", (UINT)Status);
           return CAB_STATUS_INVALID_CAB;
         }
-    
+
       /* Check header */
       if ((BytesRead               != sizeof(CFHEADER)) ||
         (CABHeader.Signature       != CAB_SIGNATURE   ) ||
@@ -1350,9 +1350,9 @@ CabinetOpen(VOID)
         DPRINT("File has invalid header.\n");
         return CAB_STATUS_INVALID_CAB;
       }
-  
+
       Size = 0;
-  
+
       /* Read/skip any reserved bytes */
       if (CABHeader.Flags & CAB_FLAG_RESERVE)
         {
@@ -1388,7 +1388,7 @@ CabinetOpen(VOID)
             }
 #endif
         }
-  
+
       if ((CABHeader.Flags & CAB_FLAG_HASPREV) > 0)
         {
           /* Read name of previous cabinet */
@@ -1412,7 +1412,7 @@ CabinetOpen(VOID)
           wcscpy(CabinetPrev, L"");
           wcscpy(DiskPrev, L"");
         }
-    
+
       if ((CABHeader.Flags & CAB_FLAG_HASNEXT) > 0)
         {
           /* Read name of next cabinet */
@@ -1436,7 +1436,7 @@ CabinetOpen(VOID)
           wcscpy(CabinetNext, L"");
           wcscpy(DiskNext,    L"");
         }
-  
+
       /* Read all folders */
       for (Index = 0; Index < CABHeader.FolderCount; Index++)
         {
@@ -1446,12 +1446,12 @@ CabinetOpen(VOID)
               DPRINT("Insufficient resources.\n");
               return CAB_STATUS_NOMEMORY;
             }
-  
+
           if (Index == 0)
             FolderNode->UncompOffset = FolderUncompSize;
-    
+
           FolderNode->Index = Index;
-  
+
           if ((Status = ReadBlock(&FolderNode->Folder,
             sizeof(CFFOLDER), &BytesRead)) != CAB_STATUS_SUCCESS)
             {
@@ -1459,7 +1459,7 @@ CabinetOpen(VOID)
               return CAB_STATUS_INVALID_CAB;
             }
         }
-  
+
       /* Read file entries */
       Status = ReadFileTable();
       if (Status != CAB_STATUS_SUCCESS)
@@ -1467,7 +1467,7 @@ CabinetOpen(VOID)
           DPRINT("ReadFileTable() failed (%d).\n", (UINT)Status);
           return Status;
         }
-  
+
       /* Read data blocks for all folders */
       FolderNode = FolderListHead;
       while (FolderNode != NULL)
@@ -1570,7 +1570,7 @@ CabinetFindNext(PCAB_SEARCH Search)
             }
 
           Status = CabinetOpen();
-          if (Status != CAB_STATUS_SUCCESS) 
+          if (Status != CAB_STATUS_SUCCESS)
             return Status;
 
           Search->Next = FileListHead;
@@ -1634,7 +1634,7 @@ CabinetExtractFile(PWCHAR FileName)
     }
 
   LastFileOffset = File->File.FileOffset;
-  
+
   switch (CurrentFolderNode->Folder.CompressionType & CAB_COMP_MASK)
     {
       case CAB_COMP_NONE:
@@ -1646,7 +1646,7 @@ CabinetExtractFile(PWCHAR FileName)
       default:
         return CAB_STATUS_UNSUPPCOMP;
     }
-  
+
   DPRINT("Extracting file at uncompressed offset (0x%X)  Size (%d bytes)  AO (0x%X)  UO (0x%X).\n",
     (UINT)File->File.FileOffset,
     (UINT)File->File.FileSize,
@@ -1714,7 +1714,7 @@ CabinetExtractFile(PWCHAR FileName)
           return CAB_STATUS_FILE_EXISTS;
         }
     }
-  
+
   if (!ConvertDosDateTimeToFileTime(File->File.FileDate, File->File.FileTime, &FileTime))
     {
       NtClose(DestFile);
@@ -1747,21 +1747,21 @@ CabinetExtractFile(PWCHAR FileName)
     }
 
   SetAttributesOnFile(File, DestFile);
-  
+
   Buffer = RtlAllocateHeap(ProcessHeap, 0, CAB_BLOCKSIZE + 12); // This should be enough
   if (!Buffer)
     {
       NtClose(DestFile);
       DPRINT("Insufficient memory.\n");
-      return CAB_STATUS_NOMEMORY; 
+      return CAB_STATUS_NOMEMORY;
     }
-  
+
   /* Call extract event handler */
   if (ExtractHandler != NULL)
     {
       ExtractHandler(&File->File, FileName);
     }
-  
+
   /* Search to start of file */
   Offset = SeekInFile(FileHandle,
     File->DataBlock->AbsoluteOffset,
@@ -1773,13 +1773,13 @@ CabinetExtractFile(PWCHAR FileName)
       DPRINT("SeekInFile() failed (%x).\n", NtStatus);
       return CAB_STATUS_INVALID_CAB;
     }
-  
+
   Size   = File->File.FileSize;
   Offset = File->File.FileOffset;
   CurrentOffset = File->DataBlock->UncompOffset;
-  
+
   Skip = TRUE;
-  
+
   ReuseBlock = (CurrentDataNode == File->DataBlock);
   if (Size > 0)
     {
@@ -1788,18 +1788,18 @@ CabinetExtractFile(PWCHAR FileName)
          DPRINT("CO (0x%X)    ReuseBlock (%d)    Offset (0x%X)   Size (%d)  BytesLeftInBlock (%d)\n",
                  File->DataBlock->UncompOffset, (UINT)ReuseBlock, Offset, Size,
                  BytesLeftInBlock);
-      
+
          if (/*(CurrentDataNode != File->DataBlock) &&*/ (!ReuseBlock) || (BytesLeftInBlock <= 0))
             {
                    DPRINT("Filling buffer. ReuseBlock (%d)\n", (UINT)ReuseBlock);
-      
+
               CurrentBuffer  = Buffer;
               TotalBytesRead = 0;
               do
                 {
                   DPRINT("Size (%d bytes).\n", Size);
-  
-                  if (((Status = ReadBlock(&CFData, sizeof(CFDATA), &BytesRead)) != 
+
+                  if (((Status = ReadBlock(&CFData, sizeof(CFDATA), &BytesRead)) !=
                     CAB_STATUS_SUCCESS) || (BytesRead != sizeof(CFDATA)))
                     {
                       NtClose(DestFile);
@@ -1807,21 +1807,21 @@ CabinetExtractFile(PWCHAR FileName)
                       DPRINT("Cannot read from file (%d).\n", (UINT)Status);
                       return CAB_STATUS_INVALID_CAB;
                     }
-      
+
                   DPRINT("Data block: Checksum (0x%X)  CompSize (%d bytes)  UncompSize (%d bytes)  Offset (0x%X).\n",
                     (UINT)CFData.Checksum,
                     (UINT)CFData.CompSize,
                     (UINT)CFData.UncompSize,
                                      (UINT)SeekInFile(FileHandle, 0, NULL, SEEK_CURRENT, &NtStatus));
-    
+
                   //ASSERT(CFData.CompSize <= CAB_BLOCKSIZE + 12);
-    
+
                   BytesToRead = CFData.CompSize;
-    
+
                                DPRINT("Read: (0x%X,0x%X).\n",
                                        CurrentBuffer, Buffer);
 
-                  if (((Status = ReadBlock(CurrentBuffer, BytesToRead, &BytesRead)) != 
+                  if (((Status = ReadBlock(CurrentBuffer, BytesToRead, &BytesRead)) !=
                       CAB_STATUS_SUCCESS) || (BytesToRead != BytesRead))
                     {
                       NtClose(DestFile);
@@ -1846,9 +1846,9 @@ CabinetExtractFile(PWCHAR FileName)
                     }
 */
                   TotalBytesRead += BytesRead;
-    
+
                   CurrentBuffer += BytesRead;
-    
+
                   if (CFData.UncompSize == 0)
                     {
                       if (wcslen(DiskNext) == 0)
@@ -1858,20 +1858,20 @@ CabinetExtractFile(PWCHAR FileName)
                          FileName refers to the FileName field of a CFFOLDER_NODE
                          structure, we have to save a copy of the filename */
                       wcscpy(TempName, FileName);
-  
+
                       CloseCabinet();
-  
+
                       CabinetSetCabinetName(CabinetNext);
-  
+
                       if (DiskChangeHandler != NULL)
                         {
                           DiskChangeHandler(CabinetNext, DiskNext);
                         }
-  
+
                       Status = CabinetOpen();
-                      if (Status != CAB_STATUS_SUCCESS) 
+                      if (Status != CAB_STATUS_SUCCESS)
                         return Status;
-  
+
                       /* The first data block of the file will not be
                          found as it is located in the previous file */
                       Status = LocateFile(TempName, &File);
@@ -1880,10 +1880,10 @@ CabinetExtractFile(PWCHAR FileName)
                           DPRINT("Cannot locate file (%d).\n", (UINT)Status);
                           return Status;
                         }
-    
+
                       /* The file is continued in the first data block in the folder */
                       File->DataBlock = CurrentFolderNode->DataListHead;
-  
+
                       /* Search to start of file */
                       SeekInFile(FileHandle,
                         File->DataBlock->AbsoluteOffset,
@@ -1895,13 +1895,13 @@ CabinetExtractFile(PWCHAR FileName)
                           DPRINT("SeekInFile() failed (%x).\n", NtStatus);
                           return CAB_STATUS_INVALID_CAB;
                         }
-    
+
                       DPRINT("Continuing extraction of file at uncompressed offset (0x%X)  Size (%d bytes)  AO (0x%X)  UO (0x%X).\n",
                           (UINT)File->File.FileOffset,
                           (UINT)File->File.FileSize,
                           (UINT)File->DataBlock->AbsoluteOffset,
                           (UINT)File->DataBlock->UncompOffset);
-    
+
                       CurrentDataNode = File->DataBlock;
                       ReuseBlock = TRUE;
 
@@ -1910,7 +1910,7 @@ CabinetExtractFile(PWCHAR FileName)
                 } while (CFData.UncompSize == 0);
 
               DPRINT("TotalBytesRead (%d).\n", TotalBytesRead);
-  
+
               Status = CodecUncompress(OutputBuffer, Buffer, TotalBytesRead, &BytesToWrite);
               if (Status != CS_SUCCESS)
                 {
@@ -1934,14 +1934,14 @@ CabinetExtractFile(PWCHAR FileName)
           else
             {
               DPRINT("Using same buffer. ReuseBlock (%d)\n", (UINT)ReuseBlock);
-    
+
               BytesToWrite = BytesLeftInBlock;
-    
+
                        DPRINT("Seeking to absolute offset 0x%X.\n",
                                CurrentDataNode->AbsoluteOffset + sizeof(CFDATA) +
                   CurrentDataNode->Data.CompSize);
-    
-                       if (((Status = ReadBlock(&CFData, sizeof(CFDATA), &BytesRead)) != 
+
+                       if (((Status = ReadBlock(&CFData, sizeof(CFDATA), &BytesRead)) !=
                                CAB_STATUS_SUCCESS) || (BytesRead != sizeof(CFDATA)))
                 {
                                NtClose(DestFile);
@@ -1949,10 +1949,10 @@ CabinetExtractFile(PWCHAR FileName)
                                DPRINT("Cannot read from file (%d).\n", (UINT)Status);
                                return CAB_STATUS_INVALID_CAB;
                        }
-    
+
                        DPRINT("CFData.CompSize 0x%X  CFData.UncompSize 0x%X.\n",
                                CFData.CompSize, CFData.UncompSize);
-    
+
               /* Go to next data block */
               SeekInFile(FileHandle,
                 CurrentDataNode->AbsoluteOffset + sizeof(CFDATA) +
@@ -1973,9 +1973,9 @@ CabinetExtractFile(PWCHAR FileName)
               BytesSkipped = (Offset - CurrentOffset);
           else
               BytesSkipped = 0;
-  
+
              BytesToWrite -= BytesSkipped;
-  
+
                if (Size < BytesToWrite)
             BytesToWrite = Size;
 
@@ -1985,7 +1985,7 @@ CabinetExtractFile(PWCHAR FileName)
             (UINT)BytesToWrite,
             (UINT)BytesSkipped, (UINT)Skip,
             (UINT)Size);
-  
+
 //          if (!WriteFile(DestFile, (PVOID)((ULONG)OutputBuffer + BytesSkipped),
 //            BytesToWrite, &BytesWritten, NULL) ||
 //              (BytesToWrite != BytesWritten))
@@ -1995,7 +1995,7 @@ CabinetExtractFile(PWCHAR FileName)
             NULL,
             NULL,
             &IoStatusBlock,
-            (PVOID)((ULONG)OutputBuffer + BytesSkipped), 
+            (PVOID)((ULONG)OutputBuffer + BytesSkipped),
             BytesToWrite,
             NULL,
             NULL);
@@ -2003,14 +2003,14 @@ CabinetExtractFile(PWCHAR FileName)
           if (!NT_SUCCESS(NtStatus))
             {
                    DPRINT("Status 0x%X.\n", NtStatus);
-  
+
               NtClose(DestFile);
               RtlFreeHeap(ProcessHeap, 0, Buffer);
               DPRINT("Cannot write to file.\n");
               return CAB_STATUS_CANNOT_WRITE;
             }
           Size -= BytesToWrite;
-  
+
            CurrentOffset += BytesToWrite;
 
           /* Don't skip any more bytes */
index a528394..876aede 100644 (file)
@@ -488,7 +488,7 @@ GetConsoleMode(
 {
     CONSOLE_MODE Buffer;
     DWORD   dwBytesReturned;
-       
+
     if (DeviceIoControl (hConsoleHandle,
                          IOCTL_CONSOLE_GET_MODE,
                          NULL,
@@ -520,7 +520,7 @@ GetConsoleCursorInfo(
        )
 {
     DWORD   dwBytesReturned;
-       
+
     if (DeviceIoControl (hConsoleOutput,
                          IOCTL_CONSOLE_GET_CURSOR_INFO,
                          NULL,
index 20d4b06..37a2af0 100644 (file)
@@ -61,8 +61,8 @@ CreateDirectory(PWCHAR DirectoryName)
        PathName.Length -= sizeof(WCHAR);
        PathName.Buffer[PathName.Length / sizeof(WCHAR)] = 0;
     }
-      
-  if (PathName.Length > sizeof(WCHAR) && 
+
+  if (PathName.Length > sizeof(WCHAR) &&
       PathName.Buffer[PathName.Length / sizeof(WCHAR) - 1] == L'\\')
     {
       PathName.Length -= sizeof(WCHAR);
index e2bf0c7..df7df12 100644 (file)
@@ -726,7 +726,7 @@ PrintEmptyLine (PPARTLIST List)
   coPos.Y = List->Top + 1 + List->Line;
 
   if (List->Line >= 0 && List->Line <= Height)
-    { 
+    {
       FillConsoleOutputAttribute (0x17,
                                  Width,
                                  coPos,
@@ -955,7 +955,7 @@ PrintDiskData (PPARTLIST List,
                                  Width,
                                  coPos,
                                  &Written);
-    
+
       FillConsoleOutputCharacter (' ',
                                  Width,
                                  coPos,
@@ -1027,7 +1027,7 @@ DrawPartitionList (PPARTLIST List)
          PartEntry = CONTAINING_RECORD (Entry2, PARTENTRY, ListEntry);
          if (PartEntry == List->CurrentPartition)
            {
-             CurrentPartLineFound = TRUE;;
+             CurrentPartLineFound = TRUE;
            }
           Entry2 = Entry2->Flink;
          if (CurrentPartLineFound == FALSE)
@@ -1055,8 +1055,8 @@ DrawPartitionList (PPARTLIST List)
          LastLine--;
        }
     }
-  
-  /* If it possible, make the disk name visible */ 
+
+  /* If it possible, make the disk name visible */
   if (CurrentPartLine < List->Offset)
     {
       List->Offset = CurrentPartLine;
@@ -1757,7 +1757,7 @@ DeleteCurrentPartition (PPARTLIST List)
       /* Merge previous, current and next unpartitioned entry */
 
       /* Adjust the previous entries length */
-      PrevPartEntry->UnpartitionedLength += 
+      PrevPartEntry->UnpartitionedLength +=
        (PartEntry->PartInfo[0].PartitionLength.QuadPart + DiskEntry->TrackSize +
         NextPartEntry->UnpartitionedLength);
 
@@ -1781,7 +1781,7 @@ DeleteCurrentPartition (PPARTLIST List)
       /* Merge current and previous unpartitioned entry */
 
       /* Adjust the previous entries length */
-      PrevPartEntry->UnpartitionedLength += 
+      PrevPartEntry->UnpartitionedLength +=
        (PartEntry->PartInfo[0].PartitionLength.QuadPart + DiskEntry->TrackSize);
 
       /* Remove the current entry */
@@ -1798,9 +1798,9 @@ DeleteCurrentPartition (PPARTLIST List)
       /* Merge current and next unpartitioned entry */
 
       /* Adjust the next entries offset and length */
-      NextPartEntry->UnpartitionedOffset = 
+      NextPartEntry->UnpartitionedOffset =
        PartEntry->PartInfo[0].StartingOffset.QuadPart - DiskEntry->TrackSize;
-      NextPartEntry->UnpartitionedLength += 
+      NextPartEntry->UnpartitionedLength +=
        (PartEntry->PartInfo[0].PartitionLength.QuadPart + DiskEntry->TrackSize);
 
       /* Remove the current entry */
@@ -1817,9 +1817,9 @@ DeleteCurrentPartition (PPARTLIST List)
       /* Nothing to merge but change current entry */
       PartEntry->New = FALSE;
       PartEntry->Unpartitioned = TRUE;
-      PartEntry->UnpartitionedOffset = 
+      PartEntry->UnpartitionedOffset =
        PartEntry->PartInfo[0].StartingOffset.QuadPart - DiskEntry->TrackSize;
-      PartEntry->UnpartitionedLength = 
+      PartEntry->UnpartitionedLength =
        PartEntry->PartInfo[0].PartitionLength.QuadPart + DiskEntry->TrackSize;
 
       /* Wipe the partition table */
index c5944ee..81dc3ac 100644 (file)
@@ -358,20 +358,20 @@ ProcessComputerFiles(HINF InfFile, PGENERIC_LIST List, PWCHAR* AdditionalSection
 {
        PGENERIC_LIST_ENTRY Entry;
        static WCHAR SectionName[128];
-       
+
        DPRINT("ProcessComputerFiles() called\n");
-       
+
        Entry = GetGenericListEntry(List);
        if (Entry == NULL)
        {
                DPRINT("GetGenericListEntry() failed\n");
                return FALSE;
        }
-       
+
        wcscpy(SectionName, L"Files.");
        wcscat(SectionName, Entry->UserData);
        *AdditionalSectionName = SectionName;
-       
+
        return TRUE;
 }
 
index 512e86f..fd08b78 100644 (file)
@@ -778,7 +778,7 @@ LicensePage(PINPUT_RECORD Ir)
   SetTextXY(8, 22, "If for some reason you did not receive a copy of the");
   SetTextXY(8, 23, "GNU General Public License with ReactOS please visit");
   SetHighlightedTextXY(8, 25, "http://www.gnu.org/licenses/licenses.html");
-  
+
   SetStatusText("ENTER = Continue   F3 = Quit");
 
   while (TRUE)
@@ -2773,7 +2773,7 @@ AddSectionToCopyQueue(HINF InfFile,
   PWCHAR FileKeyValue;
   PWCHAR DirKeyValue;
   PWCHAR TargetFileName;
-  
+
   /* Search for the SectionName section */
   if (!InfFindFirstLine (InfFile, SectionName, NULL, &FilesContext))
     {
@@ -2840,7 +2840,7 @@ AddSectionToCopyQueue(HINF InfFile,
        }
     }
   while (InfFindNextLine(&FilesContext, &FilesContext));
-  
+
   return TRUE;
 }
 
@@ -2859,7 +2859,7 @@ PrepareCopyPageInfFile(HINF InfFile,
   /* Add common files */
   if (!AddSectionToCopyQueue(InfFile, L"SourceFiles", SourceCabinet, Ir))
     return FALSE;
-  
+
   /* Add specific files depending of computer type */
   if (SourceCabinet == NULL)
   {
@@ -2871,7 +2871,7 @@ PrepareCopyPageInfFile(HINF InfFile,
         return FALSE;
     }
   }
-  
+
   /* Create directories */
 
   /*
index 3fd9e30..1405c2b 100644 (file)
@@ -67,10 +67,10 @@ BOOL
 DetectVMware(int *Version)
 {
   int magic, ver;
-  
+
   magic = 0;
   ver = 0;
-  
+
   /* Try using a VMware I/O port. If not running in VMware this'll throw an
      exception! */
   __asm__ __volatile__("inl  %%dx, %%eax"
@@ -82,7 +82,7 @@ DetectVMware(int *Version)
     *Version = ver;
     return TRUE;
   }
-  
+
   return FALSE;
 }
 
@@ -111,13 +111,13 @@ FileExists(WCHAR *Path, WCHAR *File)
 {
   WCHAR FileName[MAX_PATH + 1];
   HANDLE FileHandle;
-  
+
   FileName[0] = L'\0';
   wcscat(FileName, Path);
   wcscat(FileName, File);
 
   FileHandle = CreateFile(FileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-  
+
   if(FileHandle == INVALID_HANDLE_VALUE)
   {
     return FALSE;
@@ -128,7 +128,7 @@ FileExists(WCHAR *Path, WCHAR *File)
     CloseHandle(FileHandle);
     return FALSE;
   }
-  
+
   CloseHandle(FileHandle);
   return TRUE;
 }
@@ -166,14 +166,14 @@ InstallFile(WCHAR *Destination, WCHAR *File)
   WCHAR DestFileName[MAX_PATH + 1];
   HANDLE SourceFileHandle, DestFileHandle;
   DWORD DataRead, DataWritten;
-  
+
   SourceFileName[0] = L'\0';
   DestFileName[0] = L'\0';
   wcscat(SourceFileName, SrcPath);
   wcscat(SourceFileName, File);
   wcscat(DestFileName, Destination);
   wcscat(DestFileName, File);
-  
+
   SourceFileHandle = CreateFile(SourceFileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
   if(SourceFileHandle == INVALID_HANDLE_VALUE)
   {
@@ -185,7 +185,7 @@ InstallFile(WCHAR *Destination, WCHAR *File)
     CloseHandle(SourceFileHandle);
     return FALSE;
   }
-  
+
   while(ReadFile(SourceFileHandle, Buffer, sizeof(Buffer), &DataRead, NULL) && DataRead > 0)
   {
     if(!WriteFile(DestFileHandle, Buffer, DataRead, &DataWritten, NULL) ||
@@ -197,7 +197,7 @@ InstallFile(WCHAR *Destination, WCHAR *File)
       return FALSE;
     }
   }
-  
+
   CloseHandle(SourceFileHandle);
   CloseHandle(DestFileHandle);
   return TRUE;
@@ -209,7 +209,7 @@ IsVMwareCDInDrive(WCHAR *Drv)
 {
   static WCHAR Drive[4] = L"X:\\";
   WCHAR Current;
-  
+
   *Drv = L'\0';
   for(Current = 'C'; Current <= 'Z'; Current++)
   {
@@ -229,7 +229,7 @@ IsVMwareCDInDrive(WCHAR *Drv)
         SetCurrentDirectory(DestinationPath);
         continue;
       }
-      
+
       if(FileExists(SrcPath, vmx_fb) &&
          FileExists(SrcPath, vmx_mode) &&
          FileExists(SrcPath, vmx_svga))
@@ -241,7 +241,7 @@ IsVMwareCDInDrive(WCHAR *Drv)
     }
 #endif
   }
-  
+
   return FALSE;
 }
 
@@ -250,9 +250,9 @@ LoadResolutionSettings(DWORD *ResX, DWORD *ResY, DWORD *ColDepth)
 {
   HKEY hReg;
   DWORD Type, Size;
-  
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
-                  L"SYSTEM\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Services\\vmx_svga\\Device0", 
+
+  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                  L"SYSTEM\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Services\\vmx_svga\\Device0",
                   0, KEY_QUERY_VALUE, &hReg) != ERROR_SUCCESS)
   {
     return FALSE;
@@ -263,21 +263,21 @@ LoadResolutionSettings(DWORD *ResX, DWORD *ResY, DWORD *ColDepth)
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   if(RegQueryValueEx(hReg, L"DefaultSettings.XResolution", 0, &Type, (BYTE*)ResX, &Size) != ERROR_SUCCESS ||
      Type != REG_DWORD)
   {
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   if(RegQueryValueEx(hReg, L"DefaultSettings.YResolution", 0, &Type, (BYTE*)ResY, &Size) != ERROR_SUCCESS ||
      Type != REG_DWORD)
   {
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   RegCloseKey(hReg);
   return TRUE;
 }
@@ -287,9 +287,9 @@ IsVmwSVGAEnabled(VOID)
 {
   HKEY hReg;
   DWORD Type, Size, Value;
-  
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
-                  L"SYSTEM\\CurrentControlSet\\Services\\vmx_svga", 
+
+  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                  L"SYSTEM\\CurrentControlSet\\Services\\vmx_svga",
                   0, KEY_QUERY_VALUE, &hReg) != ERROR_SUCCESS)
   {
     return FALSE;
@@ -300,7 +300,7 @@ IsVmwSVGAEnabled(VOID)
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   RegCloseKey(hReg);
   return (Value == 1);
 }
@@ -311,9 +311,9 @@ BOOL
 SaveResolutionSettings(DWORD ResX, DWORD ResY, DWORD ColDepth)
 {
   HKEY hReg;
-  
-  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
-                  L"SYSTEM\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Services\\vmx_svga\\Device0", 
+
+  if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                  L"SYSTEM\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Services\\vmx_svga\\Device0",
                   0, KEY_QUERY_VALUE, &hReg) != ERROR_SUCCESS)
   {
     return FALSE;
@@ -323,19 +323,19 @@ SaveResolutionSettings(DWORD ResX, DWORD ResY, DWORD ColDepth)
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   if(RegSetValueEx(hReg, L"DefaultSettings.XResolution", 0, REG_DWORD, (BYTE*)&ResX, sizeof(DWORD)) != ERROR_SUCCESS)
   {
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   if(RegSetValueEx(hReg, L"DefaultSettings.YResolution", 0, REG_DWORD, (BYTE*)&ResY, sizeof(DWORD)) != ERROR_SUCCESS)
   {
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   RegCloseKey(hReg);
   return TRUE;
 }
@@ -345,9 +345,9 @@ EnableDriver(WCHAR *Key, BOOL Enable)
 {
   DWORD Value;
   HKEY hReg;
-  
+
   Value = (Enable ? 1 : 4);
-  
+
   if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, Key, 0, KEY_SET_VALUE, &hReg) != ERROR_SUCCESS)
   {
     return FALSE;
@@ -357,7 +357,7 @@ EnableDriver(WCHAR *Key, BOOL Enable)
     RegCloseKey(hReg);
     return FALSE;
   }
-  
+
   RegCloseKey(hReg);
   return TRUE;
 }
@@ -378,7 +378,7 @@ EnableVmwareDriver(BOOL VBE, BOOL VGA, BOOL VMX)
   {
     return FALSE;
   }
-  
+
   return TRUE;
 }
 
@@ -411,7 +411,7 @@ PageWelcomeProc(
       HWND hwndControl;
 
       /* Center the wizard window */
-      hwndControl = GetParent(hwndDlg);     
+      hwndControl = GetParent(hwndDlg);
       CenterWindow (hwndControl);
 
       LPNMHDR pnmh = (LPNMHDR)lParam;
@@ -499,10 +499,10 @@ InstInstallationThread(LPVOID lpParameter)
   HANDLE hThread;
   BOOL DriveAvailable;
   int DrivesTested = 0;
-  
+
   if(AbortInstall != 0) goto done;
   PostMessage(hInstallationNotifyWnd, WM_INSTSTATUSUPDATE, IDS_SEARCHINGFORCDROM, 0);
-  
+
   while(AbortInstall == 0)
   {
     Sleep(500);
@@ -518,32 +518,32 @@ InstInstallationThread(LPVOID lpParameter)
 
   if(AbortInstall != 0) goto done;
   PostMessage(hInstallationNotifyWnd, WM_INSTSTATUSUPDATE, IDS_COPYINGFILES, 0);
-  
+
   if(AbortInstall != 0) goto done;
   if(!InstallFile(DestinationPath, vmx_fb))
   {
     PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOCOPYFILES, 0);
     goto cleanup;
   }
-  
+
   Sleep(250);
-  
+
   if(AbortInstall != 0) goto done;
   if(!InstallFile(DestinationPath, vmx_mode))
   {
     PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOCOPYFILES, 0);
     goto cleanup;
   }
-  
+
   Sleep(250);
-  
+
   if(AbortInstall != 0) goto done;
   if(!InstallFile(DestinationDriversPath, vmx_svga))
   {
     PostMessage(hInstallationNotifyWnd, WM_INSTABORT, IDS_FAILEDTOCOPYFILES, 0);
     goto cleanup;
   }
-  
+
   Sleep(250);
 
   if(AbortInstall != 0) goto done;
@@ -566,7 +566,7 @@ done:
       SendMessage(hInstallationNotifyWnd, WM_INSTABORT, 0, 0);
       break;
   }
-  
+
 cleanup:
   hThread = (HANDLE)InterlockedExchange((LONG*)&hInstallationThread, 0);
   if(hThread != NULL)
@@ -702,7 +702,7 @@ FillComboBox(HWND Dlg, int idComboBox, int From, int To)
 {
   int i;
   WCHAR Text[256];
-  
+
   for(i = From; i <= To; i++)
   {
     if(LoadString(hAppInstance, i, Text, 255) > 0)
@@ -734,7 +734,7 @@ PageConfigProc(
     {
       DWORD ResX = 0, ResY = 0, ColDepth = 0;
       int cbSel;
-      
+
       FillComboBox(hwndDlg, IDC_COLORQUALITY, 10001, 10003);
       if(LoadResolutionSettings(&ResX, &ResY, &ColDepth))
       {
@@ -763,7 +763,7 @@ PageConfigProc(
       HWND hwndControl;
 
       /* Center the wizard window */
-      hwndControl = GetParent(hwndDlg);     
+      hwndControl = GetParent(hwndDlg);
       CenterWindow (hwndControl);
 
       LPNMHDR pnmh = (LPNMHDR)lParam;
@@ -814,7 +814,7 @@ PageConfigProc(
               break;
             }
           }
-          
+
           switch(SendDlgItemMessage(hwndDlg, IDC_COLORQUALITY, CB_GETCURSEL, 0, 0))
           {
             case 0:
@@ -827,7 +827,7 @@ PageConfigProc(
               cd = 32;
               break;
           }
-          
+
           SaveResolutionSettings(rx, ry, cd);
           break;
         }
@@ -869,7 +869,7 @@ PageChooseActionProc(
         {
           static ULONG SelPage[4] = {IDD_CONFIG, IDD_SELECTDRIVER, IDD_SELECTDRIVER, IDD_CHOOSEACTION};
           int i;
-          
+
           for(i = IDC_CONFIGSETTINGS; i <= IDC_UNINSTALL; i++)
           {
             if(SendDlgItemMessage(hwndDlg, i, BM_GETCHECK, 0, 0) == BST_CHECKED)
@@ -877,9 +877,9 @@ PageChooseActionProc(
               break;
             }
           }
-          
+
           UninstallDriver = (i == IDC_UNINSTALL);
-          
+
           SetWindowLong(hwndDlg, DWL_MSGRESULT, SelPage[i - IDC_CONFIGSETTINGS]);
           return TRUE;
         }
@@ -1011,7 +1011,7 @@ CreateWizard(VOID)
   HPROPSHEETPAGE ahpsp[8];
   PROPSHEETPAGE psp;
   WCHAR Caption[1024];
-  
+
   LoadString(hAppInstance, IDS_WIZARD_NAME, Caption, sizeof(Caption) / sizeof(TCHAR));
 
   /* Create the Welcome page */
@@ -1069,7 +1069,7 @@ CreateWizard(VOID)
   psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_SELECTDRIVERSUBTITLE);
   psp.pfnDlgProc = PageSelectDriverProc;
   psp.pszTemplate = MAKEINTRESOURCE(IDD_SELECTDRIVER);
-  ahpsp[6] = CreatePropertySheetPage(&psp); 
+  ahpsp[6] = CreatePropertySheetPage(&psp);
 
   /* Create the DOUNINSTALL page */
   psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
@@ -1077,7 +1077,7 @@ CreateWizard(VOID)
   psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDD_DOUNINSTALLSUBTITLE);
   psp.pfnDlgProc = PageDoUninstallProc;
   psp.pszTemplate = MAKEINTRESOURCE(IDD_DOUNINSTALL);
-  ahpsp[7] = CreatePropertySheetPage(&psp); 
+  ahpsp[7] = CreatePropertySheetPage(&psp);
 
   /* Create the property sheet */
   psh.dwSize = sizeof(PROPSHEETHEADER);
@@ -1094,17 +1094,17 @@ CreateWizard(VOID)
   return (LONG)(PropertySheet(&psh) != -1);
 }
 
-int WINAPI 
+int WINAPI
 WinMain(HINSTANCE hInstance,
        HINSTANCE hPrevInstance,
        LPSTR lpszCmdLine,
        int nCmdShow)
 {
-  
+
   LPTOP_LEVEL_EXCEPTION_FILTER OldHandler;
   int Version;
   WCHAR *lc;
-  
+
   hAppInstance = hInstance;
 
   /* Setup our exception "handler" ;-) */
@@ -1118,7 +1118,7 @@ WinMain(HINSTANCE hInstance,
 
   /* restore the exception handler */
   SetUnhandledExceptionFilter(OldHandler);
-  
+
   lc = DestinationPath;
   lc += GetSystemDirectory(DestinationPath, MAX_PATH) - 1;
   if(lc >= DestinationPath && *lc != L'\\')
@@ -1128,18 +1128,18 @@ WinMain(HINSTANCE hInstance,
   DestinationDriversPath[0] = L'\0';
   wcscat(DestinationDriversPath, DestinationPath);
   wcscat(DestinationDriversPath, L"drivers\\");
-  
+
   SetCurrentDirectory(DestinationPath);
-  
+
   DriverFilesFound = FileExists(DestinationPath, vmx_fb) &&
                      FileExists(DestinationPath, vmx_mode) &&
                      FileExists(DestinationDriversPath, vmx_svga);
-  
+
   StartVMwConfigWizard = DriverFilesFound && IsVmwSVGAEnabled();
-  
+
   /* Show the wizard */
   CreateWizard();
+
   return 2;
 }
 
index 723182d..2e8d371 100755 (executable)
@@ -110,7 +110,7 @@ WinMain(HINSTANCE hInst,
   RECT rcWindow;
   HICON hMainIcon;
   HMENU hSystemMenu;
-  DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | 
+  DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
                   WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
   BITMAP BitmapInfo;
 
@@ -190,14 +190,14 @@ WinMain(HINSTANCE hInst,
                          0,
                          hInstance,
                          NULL);
-  
+
   hSystemMenu = GetSystemMenu(hwndMain, FALSE);
   if(hSystemMenu)
   {
     RemoveMenu(hSystemMenu, SC_SIZE, MF_BYCOMMAND);
     RemoveMenu(hSystemMenu, SC_MAXIMIZE, MF_BYCOMMAND);
   }
-  
+
   ShowWindow(hwndMain, nCmdShow);
   UpdateWindow(hwndMain);
 
@@ -354,7 +354,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
     {
       hTopicBitmap[i] = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_TOPICBITMAP0+i));
     }
-  
+
   ScreenDC = GetWindowDC(hWnd);
   hdcMem = CreateCompatibleDC (ScreenDC);
   ReleaseDC(hWnd, ScreenDC);
index 2343274..9f028c4 100644 (file)
@@ -2008,7 +2008,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
                                        if (activate_fs_window(RS(b1,IDS_UNIXFS)))
                                                break;
 
-       
+
 #ifdef UNICODE
                                        call_getcwd(cpath, MAX_PATH);
                                        MultiByteToWideChar(CP_UNIXCP, 0, cpath, -1, path, MAX_PATH);
index 7bf981d..006b56f 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            services/winlogon/sas.c
- * PURPOSE:         Secure Attention Sequence 
+ * PURPOSE:         Secure Attention Sequence
  * PROGRAMMER:      Thomas Weidenmueller (w3seek@users.sourceforge.net)
  * UPDATE HISTORY:
  *                  Created 28/03/2004
@@ -36,7 +36,7 @@ void
 DispatchSAS(PWLSESSION Session, DWORD dwSasType)
 {
   Session->SASAction = dwSasType;
-  
+
 }
 
 void
@@ -58,7 +58,7 @@ SetupSAS(PWLSESSION Session, HWND hwndSAS)
     DPRINT1("WL-SAS: Unable to register Ctrl+Alt+Del hotkey!\n");
     return FALSE;
   }
-  
+
   /* Register Ctrl+Shift+Esc */
   Session->TaskManHotkey = RegisterHotKey(hwndSAS, HK_CTRL_SHIFT_ESC, MOD_CONTROL | MOD_SHIFT, VK_ESCAPE);
   if(!Session->TaskManHotkey)
@@ -72,14 +72,14 @@ BOOL
 DestroySAS(PWLSESSION Session, HWND hwndSAS)
 {
   /* Unregister hotkeys */
-  
+
   UnregisterHotKey(hwndSAS, HK_CTRL_ALT_DEL);
-  
+
   if(Session->TaskManHotkey)
   {
     UnregisterHotKey(hwndSAS, HK_CTRL_SHIFT_ESC);
   }
-  
+
   return TRUE;
 }
 
@@ -204,7 +204,7 @@ BOOL
 InitializeSAS(PWLSESSION Session)
 {
   WNDCLASSEX swc;
-  
+
   /* register SAS window class.
      WARNING! MAKE SURE WE ARE IN THE WINLOGON DESKTOP! */
   swc.cbSize = sizeof(WNDCLASSEXW);
@@ -220,7 +220,7 @@ InitializeSAS(PWLSESSION Session)
   swc.lpszClassName = WINLOGON_SAS_CLASS;
   swc.hIconSm = NULL;
   RegisterClassEx(&swc);
-  
+
   /* create invisible SAS window */
   Session->SASWindow = CreateWindowEx(0, WINLOGON_SAS_CLASS, WINLOGON_SAS_TITLE, WS_POPUP,
                                       0, 0, 0, 0, 0, 0, hAppInstance, NULL);
@@ -229,10 +229,10 @@ InitializeSAS(PWLSESSION Session)
     DPRINT1("WL: Failed to create SAS window\n");
     return FALSE;
   }
-  
+
   /* Save the Session pointer so the window proc can access it */
   SetWindowLongPtr(Session->SASWindow, GWL_USERDATA, (DWORD_PTR)Session);
-  
+
   /* Register SAS window to receive SAS notifications */
   if(!SetLogonNotifyWindow(Session->SASWindow, Session->InteractiveWindowStation))
   {
@@ -240,7 +240,7 @@ InitializeSAS(PWLSESSION Session)
     DPRINT1("WL: Failed to register SAS window\n");
     return FALSE;
   }
-  
+
   return TRUE;
 }
 
index f8ec295..2458e06 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            services/winlogon/winlogon.c
- * PURPOSE:         Logon 
+ * PURPOSE:         Logon
  * PROGRAMMER:      David Welch (welch@cwcom.net)
  * UPDATE HISTORY:
  *                  Created 22/05/98
@@ -102,8 +102,8 @@ StartServices (VOID)
    PROCESS_INFORMATION ProcessInformation;
    DWORD Count;
 
-   /* Start the service control manager (services.exe) */   
-      
+   /* Start the service control manager (services.exe) */
+
    StartupInfo.cb = sizeof(StartupInfo);
    StartupInfo.lpReserved = NULL;
    StartupInfo.lpDesktop = NULL;
@@ -112,7 +112,7 @@ StartServices (VOID)
    StartupInfo.cbReserved2 = 0;
    StartupInfo.lpReserved2 = 0;
 
-#if 0   
+#if 0
    PrintString(L"WL: Creating new process - \"services.exe\".\n");
 #endif
 
@@ -131,12 +131,12 @@ StartServices (VOID)
         PrintString(L"WL: Failed to execute services\n");
         return FALSE;
      }
-   
+
    /* wait for event creation (by SCM) for max. 20 seconds */
    for (Count = 0; Count < 20; Count++)
      {
         Sleep(1000);
-   
+
         //DbgPrint("WL: Attempting to open event \"SvcctrlStartEvent_A3725DX\"\n");
         ServicesInitEvent = OpenEvent(EVENT_ALL_ACCESS, //SYNCHRONIZE,
                                       FALSE,
@@ -146,7 +146,7 @@ StartServices (VOID)
              break;
           }
      }
-   
+
    if (ServicesInitEvent == NULL)
      {
         DbgPrint("WL: Failed to open event \"SvcctrlStartEvent_A3725DX\"\n");
@@ -159,7 +159,7 @@ StartServices (VOID)
    //DbgPrint("WL: Closing event object \"SvcctrlStartEvent_A3725DX\"\n");
    CloseHandle(ServicesInitEvent);
    //DbgPrint("WL: StartServices() Done.\n");
-      
+
    return TRUE;
 }
 
@@ -171,20 +171,20 @@ StartLsass (VOID)
    BOOLEAN Result;
    STARTUPINFO StartupInfo;
    PROCESS_INFORMATION ProcessInformation;
-   
+
    LsassInitEvent = CreateEvent(NULL,
                                 TRUE,
                                 FALSE,
                                 L"\\LsassInitDone");
-   
+
    if (LsassInitEvent == NULL)
      {
         DbgPrint("WL: Failed to create lsass notification event\n");
         return(FALSE);
      }
-   
+
    /* Start the local security authority subsystem (lsass.exe) */
-   
+
    StartupInfo.cb = sizeof(StartupInfo);
    StartupInfo.lpReserved = NULL;
    StartupInfo.lpDesktop = NULL;
@@ -192,7 +192,7 @@ StartLsass (VOID)
    StartupInfo.dwFlags = 0;
    StartupInfo.cbReserved2 = 0;
    StartupInfo.lpReserved2 = 0;
-   
+
    Result = CreateProcess(L"lsass.exe",
                           NULL,
                           NULL,
@@ -208,11 +208,11 @@ StartLsass (VOID)
         DbgPrint("WL: Failed to execute lsass\n");
         return(FALSE);
      }
-   
+
    DPRINT("WL: Waiting for lsass\n");
    WaitForSingleObject(LsassInitEvent, INFINITE);
    CloseHandle(LsassInitEvent);
-   
+
    return(TRUE);
 }
 #endif
@@ -264,7 +264,7 @@ static BOOL RestartShell(void)
 {
   HKEY WinLogonKey;
   DWORD Type, Size, Value;
-  
+
   if(OpenRegistryKey(&WinLogonKey))
   {
     Size = sizeof(DWORD);
@@ -282,7 +282,7 @@ static BOOL RestartShell(void)
       }
     }
     RegCloseKey(WinLogonKey);
-  }  
+  }
   return FALSE;
 }
 */
@@ -340,7 +340,7 @@ static BOOL StartIntoGUI(VOID)
 {
   HKEY WinLogonKey;
   DWORD Type, Size, Value;
-  
+
   if(OpenRegistryKey(&WinLogonKey))
   {
     Size = sizeof(DWORD);
@@ -358,7 +358,7 @@ static BOOL StartIntoGUI(VOID)
       }
     }
     RegCloseKey(WinLogonKey);
-  }  
+  }
   return FALSE;
 }
 
@@ -557,7 +557,7 @@ WinMain(HINSTANCE hInstance,
 #endif
 
   hAppInstance = hInstance;
-  
+
   if(!RegisterLogonProcess(GetCurrentProcessId(), TRUE))
   {
     DbgPrint("WL: Could not register logon process\n");
@@ -565,7 +565,7 @@ WinMain(HINSTANCE hInstance,
     ExitProcess(0);
     return 0;
   }
-  
+
 #if START_LSASS
    if (StartProcess(L"StartLsass"))
      {
@@ -575,7 +575,7 @@ WinMain(HINSTANCE hInstance,
          }
      }
 #endif
-  
+
   if(!(WLSession = MsGinaInit()))
   {
     DbgPrint("WL: Failed to initialize msgina.dll\n");
@@ -583,16 +583,16 @@ WinMain(HINSTANCE hInstance,
     ExitProcess(0);
     return 0;
   }
-  
+
   WLSession->LogonStatus = LOGON_INITIALIZING;
-  
+
   if(!WlxCreateWindowStationAndDesktops(WLSession))
   {
     NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, 0, 0, 0, 0, 0);
     ExitProcess(1);
     return 1;
   }
-  
+
   /*
    * Switch to winlogon desktop
    */
@@ -602,20 +602,20 @@ WinMain(HINSTANCE hInstance,
   {
     DbgPrint("WL: Cannot switch to Winlogon desktop (0x%X)\n", GetLastError());
   }
-  
+
   /* Check for pending setup */
   if (GetSetupType () != 0)
   {
     DPRINT ("Winlogon: CheckForSetup() in setup mode\n");
-    
+
     /* Run setup and reboot when done */
     RunSetup();
-    
+
     NtShutdownSystem(ShutdownReboot);
     ExitProcess(0);
     return 0;
   }
-  
+
 #if SUPPORT_CONSOLESTART
  StartConsole = !StartIntoGUI();
 #endif
@@ -625,9 +625,9 @@ WinMain(HINSTANCE hInstance,
     ExitProcess(2);
     return 2;
   }
-  
+
   InitServices();
-   
+
 #if 0
    /* real winlogon uses "Winlogon" */
    RtlInitUnicodeString((PUNICODE_STRING)&ProcessName, L"Winlogon");
@@ -650,7 +650,7 @@ WinMain(HINSTANCE hInstance,
      }
      return(1);
    }
-   
+
    RtlInitUnicodeString((PUNICODE_STRING)&PackageName, L"Kerberos");
    Status = LsaLookupAuthenticationPackage(LsaHandle, &PackageName, &AuthenticationPackage);
    if (!NT_SUCCESS(Status))
@@ -660,13 +660,13 @@ WinMain(HINSTANCE hInstance,
      return(1);
    }
 #endif
-   
+
    /* FIXME: Create a window class and associate a Winlogon
     *        window procedure with it.
     *        Register SAS with the window.
     *        Register for logoff notification
     */
-   
+
    /* Main loop */
 #if 0
    /* Display login prompt */
@@ -686,7 +686,7 @@ WinMain(HINSTANCE hInstance,
        i++;
      } while (LoginName[i - 1] != '\n');
    LoginName[i - 1] = 0;
-       
+
    /* Display password prompt */
    WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
                 PasswordPrompt,
@@ -713,7 +713,7 @@ WinMain(HINSTANCE hInstance,
    if (! DoLogonUser(L"Administrator", L"Secret"))
      {
      }
-   
+
    NtShutdownSystem(ShutdownNoReboot);
    ExitProcess(0);
  }
@@ -722,13 +722,13 @@ WinMain(HINSTANCE hInstance,
 #endif
 
    RegisterHotKeys();
-  
+
    SessionLoop(WLSession);
-  
+
    UnregisterHotKeys();
 
    /* FIXME - Flush disks and registry, ... */
-   
+
    if(WLSession->LogonStatus == LOGON_SHUTDOWN)
    {
      /* FIXME - only show this dialog if it's a shutdown and the computer doesn't support APM */
@@ -751,7 +751,7 @@ WinMain(HINSTANCE hInstance,
 #if SUPPORT_CONSOLESTART
  }
 #endif
-   
+
    return 0;
 }
 
@@ -762,7 +762,7 @@ DisplayStatusMessage(PWLSESSION Session, HDESK hDesktop, DWORD dwOptions, PWSTR
   {
     return TRUE;
   }
-  
+
   #if SUPPORT_CONSOLESTART
   if(StartConsole)
   {
@@ -773,7 +773,7 @@ DisplayStatusMessage(PWLSESSION Session, HDESK hDesktop, DWORD dwOptions, PWSTR
     return TRUE;
   }
   #endif
-  
+
   return Session->MsGina.Functions.WlxDisplayStatusMessage(Session->MsGina.Context, hDesktop, dwOptions, pTitle, pMessage);
 }
 
@@ -793,7 +793,7 @@ InitServices(void)
       DbgPrint("WL: Failed to start Services (0x%X)\n", GetLastError());
     }
   }
-  
+
   return TRUE;
 }
 
@@ -805,14 +805,14 @@ DoLogin(PWLSESSION Session)
   PWLX_PROFILE_V2_0 Profile;
   PSID LogonSid = NULL;
   HANDLE Token;
-  
+
   /* FIXME - Create a Logon Sid
   if(!(LogonSid = CreateUserLogonSid(NULL)))
   {
     return WLX_SAS_ACTION_NONE;
   }
   */
-  
+
   Options = 0;
   WlxAction = Session->MsGina.Functions.WlxLoggedOutSAS(Session->MsGina.Context,
                                                         Session->SASAction,
@@ -822,7 +822,7 @@ DoLogin(PWLSESSION Session)
                                                         &Token,
                                                         &MprNotifyInfo,
                                                         (PVOID*)&Profile);
-  
+
   return WlxAction;
 }
 
@@ -833,7 +833,7 @@ SessionLoop(PWLSESSION Session)
  // HANDLE hShutdownEvent;
   DWORD WlxAction;
   MSG Msg;
-  
+
   WlxAction = WLX_SAS_ACTION_NONE;
   Session->LogonStatus = LOGON_NONE;
   while(WlxAction == WLX_SAS_ACTION_NONE)
@@ -852,7 +852,7 @@ SessionLoop(PWLSESSION Session)
       #endif
       DisplaySASNotice(Session);
       Session->SuppressStatus = FALSE;
-      
+
       if(Session->SASAction == WLX_SAS_ACTION_LOGOFF)
       {
         /* the system wants to log off here */
@@ -860,7 +860,7 @@ SessionLoop(PWLSESSION Session)
         break;
       }
     }
-    
+
     WlxAction = DoLogin(Session);
     if(WlxAction == WLX_SAS_ACTION_LOGOFF)
     {
@@ -881,7 +881,7 @@ SessionLoop(PWLSESSION Session)
       Session->LogonStatus = LOGON_NONE;
       continue;
     }
-    
+
     /* FIXME - don't leave the loop when suspending the computer */
     if(WLX_SUSPENDING(WlxAction))
     {
@@ -890,14 +890,14 @@ SessionLoop(PWLSESSION Session)
       /* don't leave the loop */
       continue;
     }
-    
+
     if(WLX_SHUTTINGDOWN(WlxAction))
     {
       Session->LogonStatus = LOGON_SHUTDOWN;
       /* leave the loop here */
       break;
     }
-    
+
     /* Message loop for the SAS window */
     while(GetMessage(&Msg, 0, 0, 0))
     {
@@ -914,27 +914,27 @@ SessionLoop(PWLSESSION Session)
                                                   0,
                                                   NULL,
                                                   StatusMsg);
-   
+
 
    Sleep(150);
-   
+
    LoadString(hAppInstance, IDS_APPLYINGCOMPUTERSETTINGS, StatusMsg, 256 * sizeof(WCHAR));
    MsGinaInst->Functions->WlxDisplayStatusMessage(MsGinaInst->Context,
                                                   ApplicationDesktop,
                                                   0,
                                                   NULL,
                                                   StatusMsg);
-   
+
 
    Sleep(150);
 
    MsGinaInst->Functions->WlxRemoveStatusMessage(MsGinaInst->Context);
    MsGinaInst->Functions->WlxRemoveStatusMessage(MsGinaInst->Context);
    MsGinaInst->Functions->WlxRemoveStatusMessage(MsGinaInst->Context);
-      
+
 
     Sleep(250);
-   
+
    LoadString(hAppInstance, IDS_LOADINGYOURPERSONALSETTINGS, StatusMsg, 256 * sizeof(WCHAR));
    MsGinaInst->Functions->WlxDisplayStatusMessage(MsGinaInst->Context,
                                                   ApplicationDesktop,
@@ -943,20 +943,20 @@ SessionLoop(PWLSESSION Session)
                                                   StatusMsg);
 
    Sleep(150);
-   
+
    LoadString(hAppInstance, IDS_APPLYINGYOURPERSONALSETTINGS, StatusMsg, 256 * sizeof(WCHAR));
    MsGinaInst->Functions->WlxDisplayStatusMessage(MsGinaInst->Context,
                                                   ApplicationDesktop,
                                                   0,
                                                   NULL,
                                                   StatusMsg);
-   
+
 
    Sleep(150);
-   
+
    MsGinaInst->Functions->WlxRemoveStatusMessage(MsGinaInst->Context);
    MsGinaInst->Functions->WlxRemoveStatusMessage(MsGinaInst->Context);
-   
+
    if(!MsGinaInst->Functions->WlxActivateUserShell(MsGinaInst->Context,
                                                    L"WinSta0\\Default",
                                                    NULL,
@@ -966,8 +966,8 @@ SessionLoop(PWLSESSION Session)
      MessageBox(0, StatusMsg, NULL, MB_ICONERROR);
      SetEvent(hShutdownEvent);
    }
-   
-   
+
+
    WaitForSingleObject(hShutdownEvent, INFINITE);
    CloseHandle(hShutdownEvent);
 
@@ -977,22 +977,22 @@ SessionLoop(PWLSESSION Session)
                                                   0,
                                                   NULL,
                                                   StatusMsg);
-   
+
 
    Sleep(150);
-   
+
    MsGinaInst->Functions->WlxShutdown(MsGinaInst->Context, WLX_SAS_ACTION_SHUTDOWN);
-   
+
    LoadString(hAppInstance, IDS_REACTOSISSHUTTINGDOWN, StatusMsg, 256 * sizeof(WCHAR));
    MsGinaInst->Functions->WlxDisplayStatusMessage(MsGinaInst->Context,
                                                   ApplicationDesktop,
                                                   0,
                                                   NULL,
                                                   StatusMsg);
-   
+
 
    Sleep(250);
-   
+
    MsGinaInst->Functions->WlxRemoveStatusMessage(MsGinaInst->Context);
    MsGinaInst->Functions->WlxRemoveStatusMessage(MsGinaInst->Context);
    */
index d064782..504d26c 100644 (file)
@@ -21,7 +21,7 @@
  * PROJECT:         ReactOS winlogon
  * FILE:            subsys/system/winlogon/winlogon.h
  * PURPOSE:         Winlogon
- * PROGRAMMER:      
+ * PROGRAMMER:
  */
 
 #ifndef __WINLOGON_MAIN_H__
@@ -61,7 +61,7 @@ typedef BOOL (WINAPI * PFWLXNEGOTIATE)  (DWORD, DWORD *);
 typedef BOOL (WINAPI * PFWLXINITIALIZE) (LPWSTR, HANDLE, PVOID, PVOID, PVOID *);
 typedef VOID (WINAPI * PFWLXDISPLAYSASNOTICE) (PVOID);
 typedef int  (WINAPI * PFWLXLOGGEDOUTSAS) (PVOID, DWORD, PLUID, PSID, PDWORD,
-                                           PHANDLE, PWLX_MPR_NOTIFY_INFO, 
+                                           PHANDLE, PWLX_MPR_NOTIFY_INFO,
                                            PVOID *);
 typedef BOOL (WINAPI * PFWLXACTIVATEUSERSHELL) (PVOID, PWSTR, PWSTR, PVOID);
 typedef int  (WINAPI * PFWLXLOGGEDONSAS) (PVOID, DWORD, PVOID);
@@ -98,10 +98,10 @@ typedef struct _MSGINAFUNCTIONS
   PFWLXISLOGOFFOK           WlxIsLogoffOk;
   PFWLXLOGOFF               WlxLogoff;
   PFWLXSHUTDOWN             WlxShutdown;
-  
+
   PFWLXSCREENSAVERNOTIFY    WlxScreenSaverNotify;
   PFWLXSTARTAPPLICATION     WlxStartApplication;
-  
+
   PFWLXNETWORKPROVIDERLOAD  WlxNetworkProviderLoad;
   PFWLXDISPLAYSTATUSMESSAGE WlxDisplayStatusMessage;
   PFWLXGETSTATUSMESSAGE     WlxGetStatusMessage;
index aec4dfc..3684a90 100644 (file)
@@ -1,9 +1,9 @@
 /* $Id$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            services/winlogon/winlogon.c
- * PURPOSE:         Logon 
+ * PURPOSE:         Logon
  * PROGRAMMER:      David Welch (welch@cwcom.net)
  * UPDATE HISTORY:
  *                  Created 22/05/98
@@ -294,7 +294,7 @@ WlxSetOption(
 )
 {
   PWLSESSION Session = (PWLSESSION)hWlx;
-  
+
   if(Session || !Value)
   {
     switch(Option)
@@ -306,12 +306,12 @@ WlxSetOption(
         *OldValue = (ULONG_PTR)Session->MsGina.Context;
         Session->MsGina.Context = (PVOID)Value;
         return TRUE;
-      }    
+      }
       case WLX_OPTION_USE_SMART_CARD:
         return FALSE;
     }
   }
-  
+
   return FALSE;
 }
 
@@ -369,7 +369,7 @@ WlxGetOption(
       }
     }
   }
-  
+
   return FALSE;
 }
 
@@ -495,7 +495,7 @@ GetMsGinaPath(WCHAR *path)
 {
   DWORD Status, Type, Size;
   HKEY hKey;
-  
+
   Status = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
                         L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
                         0,
@@ -506,7 +506,7 @@ GetMsGinaPath(WCHAR *path)
     wcscpy(path, L"msgina.dll");
     return;
   }
-  
+
   Size = MAX_PATH * sizeof(WCHAR);
   Status = RegQueryValueEx(hKey,
                            L"GinaDLL",
@@ -545,11 +545,11 @@ GinaLoadFailedProc(
     {
       int len;
       WCHAR str[MAX_PATH], str2[MAX_PATH];
-      
+
       if(lParam)
       {
         len = GetDlgItemText(hwndDlg, IDC_GINALOADFAILED, str, MAX_PATH);
-        
+
         if(len)
         {
           wsprintf(str2, str, (LPWSTR)lParam);
@@ -573,26 +573,26 @@ LoadGina(PMSGINAFUNCTIONS Functions, DWORD *DllVersion, HMODULE *GinaInstance)
 {
   HMODULE hGina;
   WCHAR GinaDll[MAX_PATH + 1];
-  
+
   GetMsGinaPath(GinaDll);
-  
+
   if(!(hGina = LoadLibrary(GinaDll)))
   {
     DialogBoxParam(hAppInstance, MAKEINTRESOURCE(IDD_GINALOADFAILED), 0, GinaLoadFailedProc, (LPARAM)&GinaDll);
     return FALSE;
   }
   *GinaInstance = hGina;
-  
+
   Functions->WlxNegotiate = (PFWLXNEGOTIATE)GetProcAddress(hGina, "WlxNegotiate");
   Functions->WlxInitialize = (PFWLXINITIALIZE)GetProcAddress(hGina, "WlxInitialize");
-  
+
   if(Functions->WlxNegotiate)
   {
     if(!Functions->WlxNegotiate(WLX_VERSION_1_3, DllVersion))
     {
       return FALSE;
     }
-    
+
     if(*DllVersion >= WLX_VERSION_1_0)
     {
       Functions->WlxActivateUserShell = (PFWLXACTIVATEUSERSHELL)GetProcAddress(hGina, "WlxActivateUserShell");
@@ -606,13 +606,13 @@ LoadGina(PMSGINAFUNCTIONS Functions, DWORD *DllVersion, HMODULE *GinaInstance)
       Functions->WlxShutdown = (PFWLXSHUTDOWN)GetProcAddress(hGina, "WlxShutdown");
       Functions->WlxWkstaLockedSAS = (PFWLXWKSTALOCKEDSAS)GetProcAddress(hGina, "WlxWkstaLockedSAS");
     }
-    
+
     if(*DllVersion >= WLX_VERSION_1_1)
     {
       Functions->WlxScreenSaverNotify = (PFWLXSCREENSAVERNOTIFY)GetProcAddress(hGina, "WlxScreenSaverNotify");
       Functions->WlxStartApplication = (PFWLXSTARTAPPLICATION)GetProcAddress(hGina, "WlxStartApplication");
     }
-    
+
     if(*DllVersion >= WLX_VERSION_1_3)
     {
       Functions->WlxDisplayStatusMessage = (PFWLXDISPLAYSTATUSMESSAGE)GetProcAddress(hGina, "WlxDisplayStatusMessage");
@@ -620,13 +620,13 @@ LoadGina(PMSGINAFUNCTIONS Functions, DWORD *DllVersion, HMODULE *GinaInstance)
       Functions->WlxNetworkProviderLoad = (PFWLXNETWORKPROVIDERLOAD)GetProcAddress(hGina, "WlxNetworkProviderLoad");
       Functions->WlxRemoveStatusMessage = (PFWLXREMOVESTATUSMESSAGE)GetProcAddress(hGina, "WlxRemoveStatusMessage");
     }
-    
+
     if(*DllVersion >= WLX_VERSION_1_4)
     {
-      
+
     }
   }
-  
+
   return (Functions->WlxNegotiate != NULL) && (Functions->WlxInitialize != NULL);
 }
 
@@ -635,23 +635,23 @@ MsGinaInit(void)
 {
   PWLSESSION WLSession;
   DWORD GinaDllVersion;
-  
+
   WLSession = (PWLSESSION)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WLSESSION));
   if(!WLSession)
   {
     return NULL;
   }
-  
+
   if(!LoadGina(&WLSession->MsGina.Functions, &GinaDllVersion, &WLSession->MsGina.hDllInstance))
   {
     HeapFree(GetProcessHeap(), 0, WLSession);
     return NULL;
   }
-  
+
   WLSession->MsGina.Context = NULL;
   WLSession->MsGina.Version = GinaDllVersion;
   WLSession->SuppressStatus = FALSE;
-  
+
   if(!WLSession->MsGina.Functions.WlxInitialize(WLSession->InteractiveWindowStationName,
                                                (HANDLE)WLSession,
                                                NULL,
@@ -679,7 +679,7 @@ WlxCreateWindowStationAndDesktops(PWLSESSION Session)
     return FALSE;
   }
   SetProcessWindowStation(Session->InteractiveWindowStation);
-  
+
   /*
    * Create the application desktop
    */
@@ -694,7 +694,7 @@ WlxCreateWindowStationAndDesktops(PWLSESSION Session)
     DbgPrint("WL: Failed to create Default desktop (0x%X)\n", GetLastError());
     return FALSE;
   }
-  
+
   /*
    * Create the winlogon desktop
    */
@@ -709,7 +709,7 @@ WlxCreateWindowStationAndDesktops(PWLSESSION Session)
     DbgPrint("WL: Failed to create Winlogon desktop (0x%X)\n", GetLastError());
     return FALSE;
   }
-  
+
   /*
    * Create the screen saver desktop
    */
@@ -724,7 +724,7 @@ WlxCreateWindowStationAndDesktops(PWLSESSION Session)
     DbgPrint("WL: Failed to create Screen-Saver desktop (0x%X)\n", GetLastError());
     return FALSE;
   }
-  
+
   return TRUE;
 }