Since the mode commands are ignored anyway, we're now also accepting a "?"

starting parameter (or better, we silently ignore it) that's used for
private DEC modes. Vim uses those for whatever reason.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11395 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-02-16 21:56:14 +00:00
parent a7c89acd59
commit be6b98a967
1 changed files with 18 additions and 0 deletions

View File

@ -563,6 +563,10 @@ _console_write(struct console_desc *con, const void *buf, size_t len)
con->args[con->arg_ptr] = *c - '0';
con->state = CONSOLE_STATE_PARSING_ARG;
break;
case '?':
// private DEC mode parameter follows - we ignore those anyway
// ToDo: check if it was really used in combination with a mode command
break;
default:
process_vt100_command(con, *c, true, con->args, con->arg_ptr + 1);
con->state = CONSOLE_STATE_NORMAL;
@ -655,6 +659,20 @@ console_write(void *cookie, off_t pos, const void *buffer, size_t *_length)
struct console_desc *con = (struct console_desc *)cookie;
ssize_t written;
#if 0
{
const char *input = (const char *)buffer;
dprintf("console_write (%lu bytes): \"", *_length);
for (int32 i = 0; i < *_length; i++) {
if (input[i] < ' ')
dprintf("(%d:0x%x)", input[i], input[i]);
else
dprintf("%c", input[i]);
}
dprintf("\"\n");
}
#endif
mutex_lock(&con->lock);
update_cursor(con, -1, -1); // hide it