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

View file

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