Author: hbelusca Date: Fri Sep 5 21:12:42 2014 New Revision: 64044
URL: http://svn.reactos.org/svn/reactos?rev=64044&view=rev Log: Code formatting mainly (and comments fixes for future usage).
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c URL: http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user/... ============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1] Fri Sep 5 21:12:42 2014 @@ -26,8 +26,9 @@
/* GLOBALS ********************************************************************/
+/* The list of the ConSrv consoles */ static ULONG ConsoleListSize; -static PCONSRV_CONSOLE* ConsoleList; /* The list of the ConSrv consoles */ +static PCONSRV_CONSOLE* ConsoleList; static RTL_RESOURCE ListLock;
#define ConSrvLockConsoleListExclusive() \ @@ -156,9 +157,8 @@ } }
- /* Unlock the console list */ + /* Unlock the console list and return */ ConSrvUnlockConsoleList(); - return STATUS_SUCCESS; }
@@ -188,9 +188,8 @@ if (Index >= ConsoleListSize || (ValidatedConsole = ConsoleList[Index]) == NULL) { - /* Unlock the console list */ + /* Unlock the console list and return */ ConSrvUnlockConsoleList(); - return FALSE; }
@@ -199,7 +198,7 @@ /* Unlock the console list and return */ ConSrvUnlockConsoleList();
- RetVal = ConDrvValidateConsoleUnsafe(ValidatedConsole, + RetVal = ConDrvValidateConsoleUnsafe((PCONSOLE)ValidatedConsole, ExpectedState, LockConsole); if (RetVal) *Console = ValidatedConsole; @@ -214,7 +213,7 @@ ConioPause(PCONSRV_CONSOLE Console, UINT Flags) { Console->PauseFlags |= Flags; - ConDrvPause(Console); + ConDrvPause((PCONSOLE)Console); }
VOID @@ -225,7 +224,7 @@ // if ((Console->PauseFlags & (PAUSED_FROM_KEYBOARD | PAUSED_FROM_SCROLLBAR | PAUSED_FROM_SELECTION)) == 0) if (Console->PauseFlags == 0) { - ConDrvUnpause(Console); + ConDrvUnpause((PCONSOLE)Console);
CsrNotifyWait(&Console->WriteWaitQueue, TRUE, @@ -443,7 +442,10 @@ /* Colour table */ memcpy(Console->Colors, ConsoleInfo.Colors, sizeof(ConsoleInfo.Colors));
- /* Attach the ConSrv terminal to the console */ + /* + * Attach the ConSrv terminal to the console. + * This call makes a copy of our local Terminal variable. + */ Status = ConDrvRegisterTerminal(Console, &Terminal); if (!NT_SUCCESS(Status)) { @@ -481,7 +483,11 @@ HistoryDeleteBuffers(Console);
/* Now, call the driver. ConDrvDeregisterTerminal is called on-demand. */ - ConDrvDeleteConsole(Console); + ConDrvDeleteConsole((PCONSOLE)Console); + + /* Deinit the ConSrv terminal */ + // FIXME!! + // ConSrvDeinitTerminal(&Terminal); // &ConSrvConsole->Console->TermIFace }
@@ -593,7 +599,7 @@ PCONSOLE_PROCESS_DATA current;
/* If the console is already being destroyed, just return */ - if (!ConDrvValidateConsoleState(Console, CONSOLE_RUNNING)) + if (!ConDrvValidateConsoleState((PCONSOLE)Console, CONSOLE_RUNNING)) return STATUS_UNSUCCESSFUL;
/* @@ -789,7 +795,7 @@ { if (Object->Console->InsertMode || Object->Console->QuickEdit) { - /* Windows does this, even if it is not documented on MSDN */ + /* Windows also adds ENABLE_EXTENDED_FLAGS, even if it's not documented on MSDN */ *ConsoleMode |= ENABLE_EXTENDED_FLAGS;
if (Object->Console->InsertMode) *ConsoleMode |= ENABLE_INSERT_MODE; @@ -924,6 +930,7 @@ TitleRequest->Unicode, TitleRequest->Title, TitleRequest->Length); + // FIXME: Keep this call here, or put it in ConDrvSetConsoleTitle ?? if (NT_SUCCESS(Status)) TermChangeTitle(Console);
ConSrvReleaseConsole(Console, TRUE);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c URL: http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user/... ============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1] Fri Sep 5 21:12:42 2014 @@ -296,7 +296,7 @@ pSharedInfo->ci.HistoryNoDup = Console->HistoryNoDup; pSharedInfo->ci.QuickEdit = Console->QuickEdit; pSharedInfo->ci.InsertMode = Console->InsertMode; - pSharedInfo->ci.InputBufferSize = 0; + /////////////pSharedInfo->ci.InputBufferSize = 0; pSharedInfo->ci.ScreenBufferSize = ActiveBuffer->ScreenBufferSize; pSharedInfo->ci.ConsoleSize = ActiveBuffer->ViewSize; pSharedInfo->ci.CursorBlinkOn; @@ -643,7 +643,6 @@ Console->OriginalTitle.Length / sizeof(WCHAR)); wcsncpy(pSharedInfo->ci.ConsoleTitle, Console->OriginalTitle.Buffer, Length); #endif - // ULONG ConInfo.InputBufferSize = pConInfo-> // BOOLEAN ConInfo.CursorBlinkOn = pConInfo-> // BOOLEAN ConInfo.ForceCursorOff = pConInfo->
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c URL: http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user/... ============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Fri Sep 5 21:12:42 2014 @@ -1192,7 +1192,6 @@ // if (SUCCEEDED(hRes)) ConsoleStartInfo->HotKey = HotKey;
/* Get the icon location, if any */ - hRes = IShellLinkW_GetIconLocation(pshl, ConsoleStartInfo->IconPath, sizeof(ConsoleStartInfo->IconPath)/sizeof(ConsoleStartInfo->IconPath[0]) - 1, // == MAX_PATH