[FORMATTING] Replace tabs by spaces

Replace some DPRINT1 by DPRINT

svn path=/trunk/; revision=23084
This commit is contained in:
Hervé Poussineau 2006-07-16 17:00:39 +00:00
parent 2f8950ce51
commit 72185bb72b
2 changed files with 124 additions and 124 deletions

View file

@ -60,7 +60,7 @@ ConioConsoleCtrlEventTimeout(DWORD Event, PCSRSS_PROCESS_DATA ProcessData, DWORD
{
HANDLE Thread;
DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n", ProcessData->ProcessId);
DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n", ProcessData->ProcessId);
if (ProcessData->CtrlDispatcher)
{
@ -223,7 +223,7 @@ CsrInitConsole(PCSRSS_CONSOLE Console)
DeleteCriticalSection(&Console->Header.Lock);
CloseHandle(Console->ActiveEvent);
HeapFree(Win32CsrApiHeap, 0, NewBuffer);
DPRINT1("CsrInitConsoleScreenBuffer: failed\n");
DPRINT1("CsrInitConsoleScreenBuffer: failed\n");
return Status;
}
@ -724,7 +724,7 @@ inline BOOLEAN ConioIsEqualRect(
RECT *Rect2)
{
return ((Rect1->left == Rect2->left) && (Rect1->right == Rect2->right) &&
(Rect1->top == Rect2->top) && (Rect1->bottom == Rect2->bottom));
(Rect1->top == Rect2->top) && (Rect1->bottom == Rect2->bottom));
}
inline BOOLEAN ConioGetIntersection(
@ -1096,11 +1096,11 @@ ConioProcessChar(PCSRSS_CONSOLE Console,
DPRINT1("Console_Api Ctrl-C\n");
current_entry = Console->ProcessList.Flink;
while (current_entry != &Console->ProcessList)
{
current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry);
current_entry = current_entry->Flink;
ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current);
}
{
current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry);
current_entry = current_entry->Flink;
ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current);
}
HeapFree(Win32CsrApiHeap, 0, KeyEventRecord);
return;
}
@ -1111,30 +1111,30 @@ ConioProcessChar(PCSRSS_CONSOLE Console,
|| VK_DOWN == KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode))
{
if (KeyEventRecord->InputEvent.Event.KeyEvent.bKeyDown)
{
/* scroll up or down */
if (NULL == Console)
{
DPRINT1("No Active Console!\n");
HeapFree(Win32CsrApiHeap, 0, KeyEventRecord);
return;
}
if (VK_UP == KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode)
{
/* only scroll up if there is room to scroll up into */
if (Console->ActiveBuffer->ShowY != ((Console->ActiveBuffer->CurrentY + 1) %
Console->ActiveBuffer->MaxY))
{
/* scroll up or down */
if (NULL == Console)
{
DPRINT1("No Active Console!\n");
HeapFree(Win32CsrApiHeap, 0, KeyEventRecord);
return;
}
if (VK_UP == KeyEventRecord->InputEvent.Event.KeyEvent.wVirtualKeyCode)
{
/* only scroll up if there is room to scroll up into */
if (Console->ActiveBuffer->ShowY != ((Console->ActiveBuffer->CurrentY + 1) %
Console->ActiveBuffer->MaxY))
{
Console->ActiveBuffer->ShowY = (Console->ActiveBuffer->ShowY +
Console->ActiveBuffer->MaxY - 1) %
Console->ActiveBuffer->MaxY;
}
}
else if (Console->ActiveBuffer->ShowY != Console->ActiveBuffer->CurrentY)
/* only scroll down if there is room to scroll down into */
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 !=
Console->ActiveBuffer->CurrentY)
if (Console->ActiveBuffer->ShowY % Console->ActiveBuffer->MaxY !=
Console->ActiveBuffer->CurrentY)
{
if (((Console->ActiveBuffer->CurrentY + 1) % Console->ActiveBuffer->MaxY) !=
(Console->ActiveBuffer->ShowY + Console->ActiveBuffer->MaxY) %
@ -1208,30 +1208,30 @@ ConioProcessChar(PCSRSS_CONSOLE Console,
{
/* walk the input queue looking for a char to backspace */
for (TempInput = (ConsoleInput *) Console->InputEvents.Blink;
TempInput != (ConsoleInput *) &Console->InputEvents
TempInput != (ConsoleInput *) &Console->InputEvents
&& (KEY_EVENT == TempInput->InputEvent.EventType
|| ! TempInput->InputEvent.Event.KeyEvent.bKeyDown
|| '\b' == TempInput->InputEvent.Event.KeyEvent.uChar.AsciiChar);
TempInput = (ConsoleInput *) TempInput->ListEntry.Blink)
TempInput = (ConsoleInput *) TempInput->ListEntry.Blink)
{
/* NOP */;
}
/* if we found one, delete it, otherwise, wake the client */
if (TempInput != (ConsoleInput *) &Console->InputEvents)
{
/* delete previous key in queue, maybe echo backspace to screen, and do not place backspace on queue */
RemoveEntryList(&TempInput->ListEntry);
if (TempInput->Echoed)
{
/* delete previous key in queue, maybe echo backspace to screen, and do not place backspace on queue */
RemoveEntryList(&TempInput->ListEntry);
if (TempInput->Echoed)
{
ConioWriteConsole(Console, Console->ActiveBuffer,
&KeyEventRecord->InputEvent.Event.KeyEvent.uChar.AsciiChar,
1, TRUE);
}
HeapFree(Win32CsrApiHeap, 0, TempInput);
RemoveEntryList(&KeyEventRecord->ListEntry);
HeapFree(Win32CsrApiHeap, 0, KeyEventRecord);
Console->WaitingChars -= 2;
}
RemoveEntryList(&KeyEventRecord->ListEntry);
HeapFree(Win32CsrApiHeap, 0, KeyEventRecord);
Console->WaitingChars -= 2;
}
else
{
SetEvent(Console->ActiveEvent);
@ -1395,15 +1395,15 @@ ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode)
LastVirtualKey = msg->wParam;
DPRINT ("csrss: %s %s %s %s %02x %02x '%c' %04x\n",
Down ? "down" : "up ",
(msg->message == WM_CHAR || msg->message == WM_SYSCHAR) ?
"char" : "key ",
ConInRec->Fake ? "fake" : "real",
ConInRec->NotChar ? "notc" : "char",
VirtualScanCode,
VirtualKeyCode,
(AsciiChar >= ' ') ? AsciiChar : '.',
ShiftState);
Down ? "down" : "up ",
(msg->message == WM_CHAR || msg->message == WM_SYSCHAR) ?
"char" : "key ",
ConInRec->Fake ? "fake" : "real",
ConInRec->NotChar ? "notc" : "char",
VirtualScanCode,
VirtualKeyCode,
(AsciiChar >= ' ') ? AsciiChar : '.',
ShiftState);
if (! ConInRec->Fake || ! ConInRec->NotChar)
{
@ -1781,9 +1781,9 @@ CSR_API(CsrReadInputEvent)
if (Done && !Input->Fake)
{
Request->Data.ReadInputRequest.MoreEvents = TRUE;
break;
}
Request->Data.ReadInputRequest.MoreEvents = TRUE;
break;
}
RemoveEntryList(&Input->ListEntry);
@ -1794,14 +1794,14 @@ CSR_API(CsrReadInputEvent)
{
ConioInputEventToAnsi(Console, &Request->Data.ReadInputRequest.Input);
}
Done = TRUE;
}
Done = TRUE;
}
if (Input->InputEvent.EventType == KEY_EVENT)
{
if (0 != (Console->Mode & ENABLE_LINE_INPUT)
&& Input->InputEvent.Event.KeyEvent.bKeyDown
&& '\r' == Input->InputEvent.Event.KeyEvent.uChar.AsciiChar)
&& Input->InputEvent.Event.KeyEvent.bKeyDown
&& '\r' == Input->InputEvent.Event.KeyEvent.uChar.AsciiChar)
{
Console->WaitingLines--;
}
@ -2215,7 +2215,7 @@ CSR_API(CsrCreateScreenBuffer)
if (Console->ActiveBuffer)
{
Buff->MaxX = Console->ActiveBuffer->MaxX;
Buff->MaxY = Console->ActiveBuffer->MaxY;
Buff->MaxY = Console->ActiveBuffer->MaxY;
}
if (Buff->MaxX == 0)
@ -2694,15 +2694,15 @@ CSR_API(CsrReadConsoleOutputChar)
Xpos++;
if (Xpos == Buff->MaxX)
{
Xpos = 0;
Ypos++;
{
Xpos = 0;
Ypos++;
if (Ypos == Buff->MaxY)
if (Ypos == Buff->MaxY)
{
Ypos = 0;
}
}
}
}
*ReadBuffer = 0;
@ -2820,7 +2820,7 @@ CSR_API(CsrGetNumberOfConsoleInputEvents)
if (!Input->Fake)
{
NumEvents++;
}
}
}
ConioUnlockConsole(Console);
@ -3045,8 +3045,8 @@ CSR_API(CsrWriteConsoleInput)
Record->Echoed = FALSE;
Record->Fake = FALSE;
//Record->InputEvent = *InputRecord++;
memcpy(&Record->InputEvent, &InputRecord[i], sizeof(INPUT_RECORD));
//Record->InputEvent = *InputRecord++;
memcpy(&Record->InputEvent, &InputRecord[i], sizeof(INPUT_RECORD));
if (KEY_EVENT == Record->InputEvent.EventType)
{
/* FIXME - convert from unicode to ascii!! */
@ -3357,17 +3357,17 @@ CSR_API(CsrStartScreenSaver)
4. Move the code to winlogon SAS and screen saver must run in
the secuar desktop. But current our Winlogon does not working
well with SAS and with Secure desktop, So I (Magnus Olsen aka GreatLord)
add the code here as w3seek recommended
add the code here as w3seek recomandete
*/
result = RegOpenKeyExW(HKEY_CURRENT_USER, L"Control Panel\\Desktop", 0, KEY_ALL_ACCESS, &hKey);
result = RegOpenKeyExW(HKEY_CURRENT_USER, L"Control Panel\\Desktop", 0, KEY_QUERY_VALUE, &hKey);
if (result == ERROR_SUCCESS)
{
result = RegQueryValueExW(hKey, L"SCRNSAVE.EXE", 0, &varType, (LPBYTE)szBuffer, &bufferSize);
if(result == ERROR_SUCCESS)
{
swprintf(szCmdline, L"%s /s",szBuffer);
DPRINT1("CsrStartScreenSaver : OK %S, Name %S\n", szCmdline, szBuffer);
DPRINT("CsrStartScreenSaver : OK %S, Name %S\n", szCmdline, szBuffer);
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
@ -3379,9 +3379,9 @@ CSR_API(CsrStartScreenSaver)
}
else
{
GetSystemDirectoryW(szCmdline,MAX_PATH);
wprintf(szCmdline, L"%s\\%s /s",szCmdline,szBuffer);
DPRINT1("CsrStartScreenSaver : OK %S, Name %S\n", szCmdline, szBuffer);
GetSystemDirectoryW(szCmdline,MAX_PATH);
wprintf(szCmdline, L"%s\\%s /s",szCmdline,szBuffer);
DPRINT("CsrStartScreenSaver : OK %S, Name %S\n", szCmdline, szBuffer);
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
@ -3390,16 +3390,16 @@ CSR_API(CsrStartScreenSaver)
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
else
{
DPRINT1("CsrStartScreenSaver : failed 0x%08X\n", result);
}
else
{
DPRINT("CsrStartScreenSaver : failed 0x%08X\n", result);
}
}
RegCloseKey(hKey);
}
else
{
DPRINT1("CsrStartScreenSaver : failed to RegOpenKeyExW 0x%08X\n", result);
DPRINT1("CsrStartScreenSaver : failed to RegOpenKeyExW (error 0x%lx)\n", result);
}
return Request->Status = STATUS_SUCCESS;
}

View file

@ -167,7 +167,7 @@ ScreenSaverThreadMain(PVOID StartContext)
UINT ScreenSaverTimeOut = 0;
BOOL nPreviousState = FALSE;
NTSTATUS Status;
BOOL FristTime = TRUE;
BOOL FirstTime = TRUE;
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
@ -217,13 +217,13 @@ ScreenSaverThreadMain(PVOID StartContext)
(nPreviousState == FALSE))
{
BOOL nPreviousState = FALSE;
DPRINT1("Keyboard and Mouse TimeOut Starting Screen Saver ...\n");
DPRINT1(" %I64d Keyboard Timeout Value\n",DiffTimeKeyboard.QuadPart);
DPRINT1(" %I64d Mouse Timeout Value \n",DiffTimeMouse.QuadPart);
DPRINT1(" %I64d TimeOut \n",DiffTimeMouse.QuadPart);
DPRINT("Keyboard and Mouse TimeOut Starting Screen Saver ...\n");
DPRINT(" %I64d Keyboard Timeout Value\n",DiffTimeKeyboard.QuadPart);
DPRINT(" %I64d Mouse Timeout Value \n",DiffTimeMouse.QuadPart);
DPRINT(" %I64d TimeOut \n",DiffTimeMouse.QuadPart);
if (FristTime == FALSE)
{
if (FirstTime == FALSE)
{
CSR_API_MESSAGE Request;
CsrInit();
Request.Type = MAKE_CSR_API(START_SCREEN_SAVER, CSR_GUI);
@ -231,11 +231,11 @@ ScreenSaverThreadMain(PVOID StartContext)
co_CsrNotifyScreenSaver(&Request );
IntSystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, &nPreviousState, 0);
}
else
{
FristTime = FALSE;
}
}
else
{
FirstTime = FALSE;
}
}
if ( (DiffTimeMouse.QuadPart < Timeout.QuadPart) &&