diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-04-09 18:42:50 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-04-09 18:42:50 +0000 |
commit | 09d2092d537bbc1ca76871a1c7633a4c15c15705 (patch) | |
tree | 1dbaf96a24875fe8650859470ca03bf3ebca684c /lib/libedit/tty.h | |
parent | ad0d703221e5f3cf2033e381a2346c3c12fbee29 (diff) |
Reset the terminal to its initial state before exiting a program
using libedit, using code from NetBSD tty.c rev. 1.42, 1.48, 1.49,
1.58, and 1.59. Code mostly by Christos Zoulas, one bug report by
John Hein, one additional bugfix by me (rev. 1.59).
While here, switch t_mode to unsigned char, which is sufficient,
also from NetBSD.
OK martijn@.
Also checked by Christian Heckendorf <mbie at ulmus dot me>.
Diffstat (limited to 'lib/libedit/tty.h')
-rw-r--r-- | lib/libedit/tty.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libedit/tty.h b/lib/libedit/tty.h index 49a7541942a..1e004e06404 100644 --- a/lib/libedit/tty.h +++ b/lib/libedit/tty.h @@ -1,5 +1,5 @@ -/* $OpenBSD: tty.h,v 1.10 2016/03/20 22:57:59 schwarze Exp $ */ -/* $NetBSD: tty.h,v 1.12 2009/12/30 22:37:40 christos Exp $ */ +/* $OpenBSD: tty.h,v 1.11 2016/04/09 18:42:49 schwarze Exp $ */ +/* $NetBSD: tty.h,v 1.19 2016/02/27 18:13:21 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -469,12 +469,13 @@ protected void tty_bind_char(EditLine *, int); typedef struct { ttyperm_t t_t; ttychar_t t_c; - struct termios t_ex, t_ed, t_ts; + struct termios t_or, t_ex, t_ed, t_ts; int t_tabs; int t_eight; speed_t t_speed; - int t_mode; + unsigned char t_mode; unsigned char t_vdisable; + unsigned char t_initialized; } el_tty_t; |