* The VERASE char (the one generated by backspace) is 0x7f.

* With output processing enabled, replace the VERASE char by
  BS SPACE BS instead of VERASE SPACE VERASE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26135 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-06-26 13:11:17 +00:00
parent 3899803680
commit 66b9ba2a0b
+4 -4
View File
@@ -789,7 +789,7 @@ reset_termios(struct termios &termios)
// control characters // control characters
termios.c_cc[VINTR] = CTRL('C'); termios.c_cc[VINTR] = CTRL('C');
termios.c_cc[VQUIT] = CTRL('\\'); termios.c_cc[VQUIT] = CTRL('\\');
termios.c_cc[VERASE] = CTRL('H'); termios.c_cc[VERASE] = 0x7f;
termios.c_cc[VKILL] = CTRL('U'); termios.c_cc[VKILL] = CTRL('U');
termios.c_cc[VEOF] = CTRL('D'); termios.c_cc[VEOF] = CTRL('D');
termios.c_cc[VEOL] = '\0'; termios.c_cc[VEOL] = '\0';
@@ -1231,10 +1231,10 @@ process_output_char(struct tty* tty, char c, char* buffer,
if (flags & OPOST) { if (flags & OPOST) {
if (echoed && c == tty->settings->termios.c_cc[VERASE]) { if (echoed && c == tty->settings->termios.c_cc[VERASE]) {
if (tty->settings->termios.c_lflag & ECHOE) { if (tty->settings->termios.c_lflag & ECHOE) {
// ERASE -> ERASE SPACE ERASE // ERASE -> BS SPACE BS
buffer[0] = tty->settings->termios.c_cc[VERASE]; buffer[0] = CTRL('H');
buffer[1] = ' '; buffer[1] = ' ';
buffer[2] = tty->settings->termios.c_cc[VERASE]; buffer[2] = CTRL('H');;
*_bytesWritten = 3; *_bytesWritten = 3;
return; return;
} }