xref: /OK3568_Linux_fs/buildroot/package/uemacs/01-clear-ixon-termios-flag.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1[PATCH] clear ixon termios flag on initialization
2
3Otherwise ctrl-S/Q gets intercepted by the tty layer instead of
4handled by uemacs.
5
6Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
7diff --git a/posix.c b/posix.c
8index 97edd9f052b1..352c4712b689 100644
9--- a/posix.c
10+++ b/posix.c
11@@ -53,17 +53,17 @@ void ttopen(void)
12 	/*
13 	 * base new settings on old ones - don't change things
14 	 * we don't know about
15 	 */
16 	ntermios = otermios;
17
18 	/* raw CR/NL etc input handling, but keep ISTRIP if we're on a 7-bit line */
19 	ntermios.c_iflag &= ~(IGNBRK | BRKINT | IGNPAR | PARMRK
20-			      | INPCK | INLCR | IGNCR | ICRNL);
21+			      | INPCK | INLCR | IGNCR | ICRNL | IXON);
22
23 	/* raw CR/NR etc output handling */
24 	ntermios.c_oflag &=
25 	    ~(OPOST | ONLCR | OLCUC | OCRNL | ONOCR | ONLRET);
26
27 	/* No signal handling, no echo etc */
28 	ntermios.c_lflag &= ~(ISIG | ICANON | XCASE | ECHO | ECHOE | ECHOK
29 			      | ECHONL | NOFLSH | TOSTOP | ECHOCTL |
30