From 083b0b53e450f317ca6e99cc1d077b10a5ac7d4d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 28 Oct 2024 02:18:06 +0100 Subject: Add a new article on termios --- src/blog/termios/disable-xoff-xon.diff | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/blog/termios/disable-xoff-xon.diff (limited to 'src/blog/termios/disable-xoff-xon.diff') diff --git a/src/blog/termios/disable-xoff-xon.diff b/src/blog/termios/disable-xoff-xon.diff new file mode 100644 index 0000000..482cca7 --- /dev/null +++ b/src/blog/termios/disable-xoff-xon.diff @@ -0,0 +1,16 @@ + #include + #include ++#include ++#include + #include + + 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 */ -- cgit v1.2.3