[FORMATTING]

Fix indentation, no code change

svn path=/trunk/; revision=38086
This commit is contained in:
Timo Kreuzer 2008-12-14 22:52:51 +00:00
parent 41dd7167ea
commit 39324400b9

View file

@ -317,9 +317,9 @@ OutputDebugStringA(LPCSTR _OutputString)
#if 0 #if 0
__try __try
#else #else
do do
#endif #endif
{ {
/* size of the current output block */ /* size of the current output block */
SIZE_T nRoundLen; SIZE_T nRoundLen;
@ -337,60 +337,60 @@ OutputDebugStringA(LPCSTR _OutputString)
/* move to the next block */ /* move to the next block */
_OutputString += nRoundLen, nOutputStringLen -= nRoundLen _OutputString += nRoundLen, nOutputStringLen -= nRoundLen
) )
{
/* we're connected to the debug monitor: write the current block to the
shared buffer */
if(hDBMonDataReady)
{ {
/* wait a maximum of 10 seconds for the debug monitor to finish processing /* we're connected to the debug monitor:
the shared buffer */ write the current block to the shared buffer */
if(WaitForSingleObject(hDBMonBufferReady, 10000) != WAIT_OBJECT_0) if(hDBMonDataReady)
{ {
/* timeout or failure: give up */ /* wait a maximum of 10 seconds for the debug monitor
break; to finish processing the shared buffer */
if(WaitForSingleObject(hDBMonBufferReady, 10000) != WAIT_OBJECT_0)
{
/* timeout or failure: give up */
break;
}
/* write the process id into the buffer */
pDBMonBuffer->ProcessId = GetCurrentProcessId();
/* write only as many bytes as they fit in the buffer */
if(nOutputStringLen > (PAGE_SIZE - sizeof(DWORD) - 1))
nRoundLen = PAGE_SIZE - sizeof(DWORD) - 1;
else
nRoundLen = nOutputStringLen;
/* copy the current block into the buffer */
memcpy(pDBMonBuffer->Buffer, _OutputString, nRoundLen);
/* null-terminate the current block */
pDBMonBuffer->Buffer[nRoundLen] = 0;
/* signal that the data contains meaningful data and can be read */
SetEvent(hDBMonDataReady);
} }
/* else, send the current block to the kernel debugger */
/* write the process id into the buffer */
pDBMonBuffer->ProcessId = GetCurrentProcessId();
/* write only as many bytes as they fit in the buffer */
if(nOutputStringLen > (PAGE_SIZE - sizeof(DWORD) - 1))
nRoundLen = PAGE_SIZE - sizeof(DWORD) - 1;
else else
nRoundLen = nOutputStringLen; {
/* output in blocks of 512 characters */
CHAR a_cBuffer[512];
/* copy the current block into the buffer */ /* write a maximum of 511 bytes */
memcpy(pDBMonBuffer->Buffer, _OutputString, nRoundLen); if(nOutputStringLen > (sizeof(a_cBuffer) - 1))
nRoundLen = sizeof(a_cBuffer) - 1;
else
nRoundLen = nOutputStringLen;
/* null-terminate the current block */ /* copy the current block */
pDBMonBuffer->Buffer[nRoundLen] = 0; memcpy(a_cBuffer, _OutputString, nRoundLen);
/* signal that the data contains meaningful data and can be read */ /* null-terminate the current block */
SetEvent(hDBMonDataReady); a_cBuffer[nRoundLen] = 0;
}
/* else, send the current block to the kernel debugger */
else
{
/* output in blocks of 512 characters */
CHAR a_cBuffer[512];
/* write a maximum of 511 bytes */ /* send the current block to the kernel debugger */
if(nOutputStringLen > (sizeof(a_cBuffer) - 1)) DbgPrint("%s", a_cBuffer);
nRoundLen = sizeof(a_cBuffer) - 1; }
else
nRoundLen = nOutputStringLen;
/* copy the current block */
memcpy(a_cBuffer, _OutputString, nRoundLen);
/* null-terminate the current block */
a_cBuffer[nRoundLen] = 0;
/* send the current block to the kernel debugger */
DbgPrint("%s", a_cBuffer);
} }
} }
}
#if 0 #if 0
/* ignore access violations and let other exceptions fall through */ /* ignore access violations and let other exceptions fall through */
__except __except