diff options
Diffstat (limited to 'src/blog/termios/disable-xoff-xon.diff')
-rw-r--r-- | src/blog/termios/disable-xoff-xon.diff | 16 |
1 files changed, 16 insertions, 0 deletions
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 <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 */ |