mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
[NTVDM]
DosReadFile echoes the line feed when it encounters it. A backspace should delete the '^' sign for special characters. svn path=/trunk/; revision=69360
This commit is contained in:
@@ -53,15 +53,6 @@ VOID DosEchoCharacter(CHAR Character)
|
||||
break;
|
||||
}
|
||||
|
||||
case '\r':
|
||||
case '\n':
|
||||
{
|
||||
/* Print both a carriage return and a newline */
|
||||
DosPrintCharacter(DOS_OUTPUT_HANDLE, '\r');
|
||||
DosPrintCharacter(DOS_OUTPUT_HANDLE, '\n');
|
||||
break;
|
||||
}
|
||||
|
||||
case '\b':
|
||||
{
|
||||
/* Erase the character */
|
||||
@@ -73,8 +64,11 @@ VOID DosEchoCharacter(CHAR Character)
|
||||
|
||||
default:
|
||||
{
|
||||
/* Check if this is a special character */
|
||||
if (Character < 0x20)
|
||||
/*
|
||||
* Check if this is a special character
|
||||
* NOTE: \r and \n are handled by the underlying driver!
|
||||
*/
|
||||
if (Character < 0x20 && Character != 0x0A && Character != 0x0D)
|
||||
{
|
||||
DosPrintCharacter(DOS_OUTPUT_HANDLE, '^');
|
||||
Character += 'A' - 1;
|
||||
|
||||
@@ -725,14 +725,25 @@ BYTE DosReadLineBuffered(WORD FileHandle, DWORD Buffer, BYTE MaxSize)
|
||||
break;
|
||||
}
|
||||
|
||||
case '\n':
|
||||
{
|
||||
DosEchoCharacter('\r');
|
||||
DosEchoCharacter('\n');
|
||||
break;
|
||||
}
|
||||
|
||||
case '\b':
|
||||
{
|
||||
if (LineSize > 0)
|
||||
{
|
||||
LineSize--;
|
||||
if (Pointer[LineSize] == 0) LineSize--;
|
||||
|
||||
DosEchoCharacter(Character);
|
||||
|
||||
/* Erase the '^' too */
|
||||
if (Pointer[LineSize] > 0x00 && Pointer[LineSize] < 0x20)
|
||||
{
|
||||
DosEchoCharacter(Character);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -813,6 +824,9 @@ WORD DosReadFile(WORD FileHandle,
|
||||
{
|
||||
/* A line feed marks the true end of the line */
|
||||
SysVars->UnreadConInput = 0;
|
||||
|
||||
/* Echo the line feed */
|
||||
DosEchoCharacter('\n');
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user