Bug 724: terminal: Correct parsing of ECMA-48 control sequences.
commitb7319a75db60f4d38fd9012a535e8329ab252044
authorKalle Olavi Niemitalo <kon@iki.fi>
Sun, 29 Oct 2006 16:41:16 +0000 (29 18:41 +0200)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sun, 29 Oct 2006 16:41:16 +0000 (29 18:41 +0200)
tree59d877cfbd8b861c034fca4a46b5829883586353
parent23ca645054edbd030047c8d3fc1d0c54328c3034
Bug 724: terminal: Correct parsing of ECMA-48 control sequences.

The previous version assumed the first non-digit after the CSI was the
Final Byte, for example the first semicolon in the "\E[?1;2c" report.
It then treated all subsequent bytes as typed characters.
According to Standard ECMA-48 (Fifth Edition - June 1991), there may
be any number of Parameter Bytes in the range 0x30 to 0x3F, and then
any number of Intermediate Bytes in the range 0x20 to 0x2F, between
the CSI and the Final Byte.

This version still does not support control sequences longer than
ITRM_IN_QUEUE_SIZE bytes.
src/terminal/kbd.c