linux/drivers/tty/vt
Mike Frysinger fa471f6926 vt: change SGR 21 to follow the standards
commit 65d9982d7e upstream.

ECMA-48 [1] (aka ISO 6429) has defined SGR 21 as "doubly underlined"
since at least March 1984.  The Linux kernel has treated it as SGR 22
"normal intensity" since it was added in Linux-0.96b in June 1992.
Before that, it was simply ignored.  Other terminal emulators have
either ignored it, or treat it as double underline now.  xterm for
example added support in its 304 release (May 2014) [2] where it was
previously ignoring it.

Changing this behavior shouldn't be an issue:
- It isn't a named capability in ncurses's terminfo database, so no
  script is using libtinfo/libcurses to look this up, or using tput
  to query & output the right sequence.
- Any script assuming SGR 21 will reset intensity in all terminals
  already do not work correctly on non-Linux VTs (including running
  under screen/tmux/etc...).
- If someone has written a script that only runs in the Linux VT, and
  they're using SGR 21 (instead of SGR 22), the output should still
  be readable.

imo it's important to change this as the Linux VT's non-conformance
is sometimes used as an argument for other terminal emulators to not
implement SGR 21 at all, or do so incorrectly.

[1]: https://www.ecma-international.org/publications/standards/Ecma-048.htm
[2]: 2fd29cb98d

Signed-off-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: adjust indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-10-21 08:44:55 +01:00
..
.gitignore TTY: move .gitignore from drivers/char/ to drivers/tty/vt/ 2010-11-05 22:18:23 -07:00
consolemap.c tty/vt: don't set font mappings on vc not supporting this 2014-11-14 15:20:00 +00:00
cp437.uni TTY: create drivers/tty/vt and move the vt code there 2010-11-05 08:16:52 -07:00
defkeymap.c_shipped TTY: create drivers/tty/vt and move the vt code there 2010-11-05 08:16:52 -07:00
defkeymap.map TTY: create drivers/tty/vt and move the vt code there 2010-11-05 08:16:52 -07:00
keyboard.c tty/vt/keyboard: fix OOB access in do_compute_shiftstate() 2016-11-20 01:16:56 +00:00
Makefile tty: vt/Makefile: set the variables to static 2013-01-15 21:52:24 -08:00
selection.c tty: Fix unsafe vt paste_selection() 2013-07-23 16:47:10 -07:00
vc_screen.c vc: switch to fixed_size_llseek() 2013-06-29 12:57:30 +04:00
vt.c vt: change SGR 21 to follow the standards 2018-10-21 08:44:55 +01:00
vt_ioctl.c tty/vt: Return EBUSY if deallocating VT1 and it is busy 2013-06-17 12:37:29 -07:00