]> git.ipfire.org Git - thirdparty/linux.git/commit
vt: support ITU-T T.416 color subparameters
authorRonan Pigott <ronan@rjp.ie>
Tue, 3 Mar 2026 01:02:22 +0000 (18:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2026 14:25:59 +0000 (15:25 +0100)
commitfa4268cfe899b684d628e9419705a236c2ae589a
tree158369776412fd4d9bc1bfdda83c3ed6d67aede6
parent0b1837c04d2335ec50b9a55b0282dcde7bc12439
vt: support ITU-T T.416 color subparameters

The colon ("bit combination 03/10") is a valid character in parameter
substrings. ECMA-48 says:

  Each parameter sub-string consists of one or more bit combinations
  from 03/00 to 03/10; the bit combinations from 03/00 to 03/09
  represent the digits ZERO to NINE; bit combination 03/10 may be used
  as a separator in a parameter sub-string, for example, to separate
  the fractional part of a decimal number from the integer part of
  that number.

To my knowledge, the only codes where 03/10 is actually used as a
separator are the CSI-m SGR sequences. The colon separated format is
superior as an embedded string for software that doesn't wish to link
ncurses terminal database, because terminals that do not support the
requested SGR sequence can safely skip the sub-parameters rather than
misinterpret them as another sequence. Hence, some software have started
using this "modern" format [1]. We should support the colon separated
format as well.

[1] https://github.com/systemd/systemd/commit/6eabe9f2ff48c1b6924724d5afe64e7b661ccdbf

Signed-off-by: Ronan Pigott <ronan@rjp.ie>
Link: https://patch.msgid.link/20260303010701.631022-1-ronan@rjp.ie
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c