And finally...
...
... fix whitespace, part 6/6 !!!! (convert tabs into 4-space indent).

Really, CMD is, together with win32k, the worst indented project I've ever seen.
You have lots of non-sensical extra newlines put in the middle of the code,
weird indentation made by a mix of tabs / spaces which take either 4 or 8 or even (!!)
2 spaces per indentation level; sometimes some guy mixed his space key with his tab key
to add a space between a word and another one; a mix of some sh*tty code styles (K&R and personal ones),
many many times no space between a logical keyword and the operand on which it applies, etc... etc...

I tried to put some sense in it, but I may have forgotten some insidious tabs somewhere...

svn path=/trunk/; revision=59389
This commit is contained in:
Hermès Bélusca-Maïto 2013-06-30 13:11:20 +00:00
parent 8e04e7f45a
commit 18857125d2

View file

@ -309,7 +309,6 @@ HANDLE RunFile(DWORD flags, LPTSTR filename, LPTSTR params,
* First - first word on command line
* Rest - rest of command line
*/
static INT
Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
{
@ -489,7 +488,6 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
* first - first word on command line
* rest - rest of command line
*/
INT
DoCommand(LPTSTR first, LPTSTR rest, PARSED_COMMAND *Cmd)
{
@ -560,7 +558,6 @@ DoCommand(LPTSTR first, LPTSTR rest, PARSED_COMMAND *Cmd)
* process the command line and execute the appropriate functions
* full input/output redirection and piping are supported
*/
INT ParseCommandLine (LPTSTR cmd)
{
INT Ret = 0;
@ -1292,8 +1289,10 @@ static LPTSTR FindForVar(TCHAR Var, BOOL *IsParam0)
FOR_CONTEXT *Ctx;
*IsParam0 = FALSE;
for (Ctx = fc; Ctx != NULL; Ctx = Ctx->prev)
{
if ((UINT)(Var - Ctx->firstvar) < Ctx->varcount)
return Ctx->values[Var - Ctx->firstvar];
}
return NULL;
}
@ -1429,7 +1428,6 @@ ProcessInput()
*/
BOOL WINAPI BreakHandler (DWORD dwCtrlType)
{
DWORD dwWritten;
INPUT_RECORD rec;
static BOOL SelfGenerated = FALSE;
@ -1468,8 +1466,7 @@ BOOL WINAPI BreakHandler (DWORD dwCtrlType)
rec.Event.KeyEvent.uChar.UnicodeChar = _T('C');
rec.Event.KeyEvent.dwControlKeyState = RIGHT_CTRL_PRESSED;
WriteConsoleInput(
hIn,
WriteConsoleInput(hIn,
&rec,
1,
&dwWritten);
@ -1479,7 +1476,6 @@ BOOL WINAPI BreakHandler (DWORD dwCtrlType)
//ConOutPrintf(_T("^C"));
return TRUE;
}
@ -1674,7 +1670,6 @@ Initialize()
/* add ctrl break handler */
AddBreakHandler ();
SetConsoleMode (hIn, ENABLE_PROCESSED_INPUT);
cmdLine = GetCommandLine();