summaryrefslogtreecommitdiffhomepage
path: root/src/blog/termios/disable-xoff-xon.diff
blob: 482cca7270d8ff237fd9d9e43916e2c9599dc274 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 #include <curses.h>
 #include <stdio.h>
+#include <termios.h>
+#include <unistd.h>
 #include <vis.h>

 int
 main(void)
 {
+	struct termios tp;
+	tcgetattr(STDIN_FILENO, &tp);
+	tp.c_iflag &= ~(IXANY | IXON | IXOFF);
+	tcsetattr(STDIN_FILENO, TCSANOW, &tp);
+
 	initscr();                  /* Init screen */
 	noecho();                   /* Don’t echo keypresses */