mirror of
https://github.com/reactos/reactos.git
synced 2024-09-04 17:49:15 +00:00
Revers the change after reboot it did carcgh for me hole time.
svn path=/trunk/; revision=17633
This commit is contained in:
parent
7fca436afd
commit
49766a2024
|
@ -1037,14 +1037,13 @@ static INT
|
||||||
ProcessInput (BOOL bFlag)
|
ProcessInput (BOOL bFlag)
|
||||||
{
|
{
|
||||||
TCHAR commandline[CMDLINE_LENGTH];
|
TCHAR commandline[CMDLINE_LENGTH];
|
||||||
TCHAR *readline = NULL;
|
TCHAR readline[CMDLINE_LENGTH];
|
||||||
LPTSTR tp = NULL;
|
LPTSTR tp = NULL;
|
||||||
LPTSTR ip;
|
LPTSTR ip;
|
||||||
LPTSTR cp;
|
LPTSTR cp;
|
||||||
BOOL bEchoThisLine;
|
BOOL bEchoThisLine;
|
||||||
|
|
||||||
readline = malloc(CMDLINE_LENGTH * sizeof(TCHAR));
|
|
||||||
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* if no batch input then... */
|
/* if no batch input then... */
|
||||||
|
@ -1053,7 +1052,7 @@ ProcessInput (BOOL bFlag)
|
||||||
if (bFlag)
|
if (bFlag)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
readline = ReadCommand (readline, CMDLINE_LENGTH);
|
ReadCommand (readline, CMDLINE_LENGTH);
|
||||||
ip = readline;
|
ip = readline;
|
||||||
bEchoThisLine = FALSE;
|
bEchoThisLine = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ extern HANDLE CMD_ModuleHandle;
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for CMDINPUT.C */
|
/* Prototypes for CMDINPUT.C */
|
||||||
TCHAR * ReadCommand (LPTSTR, INT);
|
VOID ReadCommand (LPTSTR, INT);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for CMDTABLE.C */
|
/* Prototypes for CMDTABLE.C */
|
||||||
|
|
|
@ -124,7 +124,7 @@ ClearCommandLine (LPTSTR str, INT maxlen, SHORT orgx, SHORT orgy)
|
||||||
|
|
||||||
|
|
||||||
/* read in a command line */
|
/* read in a command line */
|
||||||
TCHAR * ReadCommand (LPTSTR str, INT maxlen)
|
VOID ReadCommand (LPTSTR str, INT maxlen)
|
||||||
{
|
{
|
||||||
SHORT orgx; /* origin x/y */
|
SHORT orgx; /* origin x/y */
|
||||||
SHORT orgy;
|
SHORT orgy;
|
||||||
|
@ -508,15 +508,10 @@ TCHAR * ReadCommand (LPTSTR str, INT maxlen)
|
||||||
default:
|
default:
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
ch = ir.Event.KeyEvent.uChar.UnicodeChar;
|
ch = ir.Event.KeyEvent.uChar.UnicodeChar;
|
||||||
charcount ++;
|
if ((ch >= 32 && ch <= 255) && (charcount != (maxlen - 2)))
|
||||||
str = realloc(str, charcount);
|
|
||||||
|
|
||||||
if ((ch >= 32 && ch <= 255))
|
|
||||||
#else
|
#else
|
||||||
ch = ir.Event.KeyEvent.uChar.AsciiChar;
|
ch = ir.Event.KeyEvent.uChar.AsciiChar;
|
||||||
str = realloc(str, 2 + current * sizeof(TCHAR));
|
if ((UCHAR)ch >= 32 && (charcount != (maxlen - 2)))
|
||||||
|
|
||||||
if ((UCHAR)ch >= 32 )
|
|
||||||
#endif /* _UNICODE */
|
#endif /* _UNICODE */
|
||||||
{
|
{
|
||||||
/* insert character into string... */
|
/* insert character into string... */
|
||||||
|
@ -525,8 +520,6 @@ TCHAR * ReadCommand (LPTSTR str, INT maxlen)
|
||||||
/* If this character insertion will cause screen scrolling,
|
/* If this character insertion will cause screen scrolling,
|
||||||
* adjust the saved origin of the command prompt. */
|
* adjust the saved origin of the command prompt. */
|
||||||
tempscreen = _tcslen(str + current) + curx;
|
tempscreen = _tcslen(str + current) + curx;
|
||||||
str = realloc(str, tempscreen * sizeof(TCHAR));
|
|
||||||
|
|
||||||
if ((tempscreen % maxx) == (maxx - 1) &&
|
if ((tempscreen % maxx) == (maxx - 1) &&
|
||||||
(tempscreen / maxx) + cury == (maxy - 1))
|
(tempscreen / maxx) + cury == (maxy - 1))
|
||||||
{
|
{
|
||||||
|
@ -534,8 +527,6 @@ TCHAR * ReadCommand (LPTSTR str, INT maxlen)
|
||||||
cury--;
|
cury--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (count = charcount; count > current; count--)
|
for (count = charcount; count > current; count--)
|
||||||
str[count] = str[count - 1];
|
str[count] = str[count - 1];
|
||||||
str[current++] = ch;
|
str[current++] = ch;
|
||||||
|
@ -579,6 +570,4 @@ TCHAR * ReadCommand (LPTSTR str, INT maxlen)
|
||||||
while (ir.Event.KeyEvent.wVirtualKeyCode != VK_RETURN);
|
while (ir.Event.KeyEvent.wVirtualKeyCode != VK_RETURN);
|
||||||
|
|
||||||
SetCursorType (bInsert, TRUE);
|
SetCursorType (bInsert, TRUE);
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue