It is more compatible with DOS to not insert carriage returns in the console device.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4114
This commit is contained in:
parent
fdc5a06200
commit
31d7e74eac
2 changed files with 4 additions and 6 deletions
|
@ -37,7 +37,6 @@ private:
|
|||
void ClearAnsi(void);
|
||||
void Output(Bit8u chr);
|
||||
Bit8u readcache;
|
||||
Bit8u lastwrite;
|
||||
struct ansi { /* should create a constructor, which would fill them with the appropriate values */
|
||||
bool esc;
|
||||
bool sci;
|
||||
|
@ -136,13 +135,11 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
|
|||
Output(' ');
|
||||
col=CURSOR_POS_COL(page);
|
||||
} while(col%8);
|
||||
lastwrite = data[count++];
|
||||
count++;
|
||||
continue;
|
||||
} else {
|
||||
/* Some sort of "hack" now that '\n' doesn't set col to 0 (int10_char.cpp old chessgame) */
|
||||
if((data[count] == '\n') && (lastwrite != '\r')) Output('\r');
|
||||
Output(data[count]);
|
||||
lastwrite = data[count++];
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -411,7 +408,6 @@ Bit16u device_CON::GetInformation(void) {
|
|||
device_CON::device_CON() {
|
||||
SetName("CON");
|
||||
readcache=0;
|
||||
lastwrite=0;
|
||||
ansi.enabled=false;
|
||||
ansi.attr=0x7;
|
||||
ansi.saverow=0;
|
||||
|
|
|
@ -223,6 +223,7 @@ void DOS_Shell::InputCommand(char * line) {
|
|||
/* Don't care */
|
||||
break;
|
||||
case 0x0d: /* Return */
|
||||
outc('\r');
|
||||
outc('\n');
|
||||
size=0; //Kill the while loop
|
||||
break;
|
||||
|
@ -322,6 +323,7 @@ void DOS_Shell::InputCommand(char * line) {
|
|||
case 0x1b: /* ESC */
|
||||
//write a backslash and return to the next line
|
||||
outc('\\');
|
||||
outc('\r');
|
||||
outc('\n');
|
||||
*line = 0; // reset the line.
|
||||
if (l_completion.size()) l_completion.clear(); //reset the completion list.
|
||||
|
|
Loading…
Add table
Reference in a new issue