Author: hpoussin
Date: Fri Sep 28 11:34:30 2007
New Revision: 29270
URL:
http://svn.reactos.org/svn/reactos?rev=29270&view=rev
Log:
[FORMATTING] Replace spaces by tabs
No code change
Modified:
trunk/reactos/base/shell/cmd/cmdinput.c
Modified: trunk/reactos/base/shell/cmd/cmdinput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdinput.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmdinput.c (original)
+++ trunk/reactos/base/shell/cmd/cmdinput.c Fri Sep 28 11:34:30 2007
@@ -137,11 +137,11 @@
WORD wLastKey = 0;
TCHAR ch;
BOOL bContinue=FALSE;/*is TRUE the second case will not be executed*/
- BOOL bReturn = FALSE;
- BOOL bCharInput;
- #ifdef FEATURE_4NT_FILENAME_COMPLETION
- TCHAR szPath[MAX_PATH];
- #endif
+ BOOL bReturn = FALSE;
+ BOOL bCharInput;
+#ifdef FEATURE_4NT_FILENAME_COMPLETION
+ TCHAR szPath[MAX_PATH];
+#endif
/* get screen size */
GetScreenSize (&maxx, &maxy);
@@ -159,9 +159,9 @@
do
{
-
- bReturn = FALSE;
-
+
+ bReturn = FALSE;
+
ConInKey (&ir);
if (ir.Event.KeyEvent.dwControlKeyState &
@@ -213,11 +213,7 @@
}
- //if (bContinue)
- // continue;
-
-
- bCharInput = FALSE;
+ bCharInput = FALSE;
switch (ir.Event.KeyEvent.wVirtualKeyCode)
{
@@ -367,12 +363,12 @@
}
#endif
#ifdef FEATURE_4NT_FILENAME_COMPLETION
-
+
/* used to later see if we went down to the next line */
tempscreen = charcount;
szPath[0]=_T('\0');
- /* str is the whole things that is on the current line
+ /* str is the whole things that is on the current line
that is and and out. arg 2 is weather it goes back
one file or forward one file */
CompleteFilename(str, !(ir.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED),
szPath, current);
@@ -380,12 +376,11 @@
ClearCommandLine (str, maxlen, orgx, orgy);
curx = orgx;
cury = orgy;
- current = charcount = 0;
- //str[0]=_T('\0');
-
+ current = charcount = 0;
+
/* Everything is deleted, lets add it back in */
_tcscpy(str,szPath);
-
+
/* Figure out where cusor is going to be after we print it */
charcount = _tcslen (str);
current = charcount;
@@ -412,17 +407,17 @@
#endif
break;
-
- case _T('M'):
- case _T('C'):
- /* ^M does the same as return */
- bCharInput = TRUE;
- if(!(ir.Event.KeyEvent.dwControlKeyState &
- (RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
- {
- break;
- }
-
+
+ case _T('M'):
+ case _T('C'):
+ /* ^M does the same as return */
+ bCharInput = TRUE;
+ if(!(ir.Event.KeyEvent.dwControlKeyState &
+ (RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
+ {
+ break;
+ }
+
case VK_RETURN:
/* end input, return to main */
#ifdef FEATURE_HISTORY
@@ -432,7 +427,7 @@
#endif
ConInDummy ();
ConOutChar (_T('\n'));
- bReturn = TRUE;
+ bReturn = TRUE;
break;
case VK_ESCAPE:
@@ -515,58 +510,58 @@
}
break;
- default:
- /* This input is just a normal char */
- bCharInput = TRUE;
+ default:
+ /* This input is just a normal char */
+ bCharInput = TRUE;
}
#ifdef _UNICODE
- ch = ir.Event.KeyEvent.uChar.UnicodeChar;
- if (ch >= 32 && (charcount != (maxlen - 2)) &&
bCharInput)
+ ch = ir.Event.KeyEvent.uChar.UnicodeChar;
+ if (ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
#else
- ch = ir.Event.KeyEvent.uChar.AsciiChar;
- if ((UCHAR)ch >= 32 && (charcount != (maxlen - 2)) &&
bCharInput)
+ ch = ir.Event.KeyEvent.uChar.AsciiChar;
+ if ((UCHAR)ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
#endif /* _UNICODE */
- {
- /* insert character into string... */
- if (bInsert && current != charcount)
- {
- /* If this character insertion will cause screen scrolling,
- * adjust the saved
origin of the command prompt. */
- tempscreen = _tcslen(str + current) + curx;
- if ((tempscreen % maxx) == (maxx - 1) &&
- (tempscreen / maxx) + cury == (maxy - 1))
- {
- orgy--;
- cury--;
- }
-
- for (count = charcount; count > current; count--)
- str[count] = str[count - 1];
- str[current++] = ch;
- if (curx == maxx - 1)
- curx = 0, cury++;
- else
- curx++;
- ConOutPrintf (_T("%s"), &str[current - 1]);
- SetCursorXY (curx, cury);
- charcount++;
- }
- else
- {
- if (current == charcount)
- charcount++;
- str[current++] = ch;
- if (GetCursorX () == maxx - 1 && GetCursorY () == maxy - 1)
- orgy--, cury--;
- if (GetCursorX () == maxx - 1)
- curx = 0, cury++;
- else
- curx++;
- ConOutChar (ch);
- }
- }
-
+ {
+ /* insert character into string... */
+ if (bInsert && current != charcount)
+ {
+ /* If this character insertion will cause screen scrolling,
+ * adjust the saved origin of the command prompt. */
+ tempscreen = _tcslen(str + current) + curx;
+ if ((tempscreen % maxx) == (maxx - 1) &&
+ (tempscreen / maxx) + cury == (maxy - 1))
+ {
+ orgy--;
+ cury--;
+ }
+
+ for (count = charcount; count > current; count--)
+ str[count] = str[count - 1];
+ str[current++] = ch;
+ if (curx == maxx - 1)
+ curx = 0, cury++;
+ else
+ curx++;
+ ConOutPrintf (_T("%s"), &str[current - 1]);
+ SetCursorXY (curx, cury);
+ charcount++;
+ }
+ else
+ {
+ if (current == charcount)
+ charcount++;
+ str[current++] = ch;
+ if (GetCursorX () == maxx - 1 && GetCursorY () == maxy - 1)
+ orgy--, cury--;
+ if (GetCursorX () == maxx - 1)
+ curx = 0, cury++;
+ else
+ curx++;
+ ConOutChar (ch);
+ }
+ }
+
wLastKey = ir.Event.KeyEvent.wVirtualKeyCode;
}
while (!bReturn);