From 03cbe708d5009414c846f9a3c9025c1c4800d065 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sun, 28 Jul 2019 15:42:50 -0400 Subject: Remove ptee keybinds --- ptee.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'ptee.c') diff --git a/ptee.c b/ptee.c index 6a9a16b..e760eb3 100644 --- a/ptee.c +++ b/ptee.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -66,8 +65,6 @@ int main(int argc, char *argv[]) { err(EX_NOINPUT, "%s", argv[1]); } - bool stop = false; - byte buf[4096]; struct pollfd fds[2] = { { .events = POLLIN, .fd = STDIN_FILENO }, @@ -78,18 +75,6 @@ int main(int argc, char *argv[]) { ssize_t rlen = read(STDIN_FILENO, buf, sizeof(buf)); if (rlen < 0) err(EX_IOERR, "read"); - if (rlen == 1 && buf[0] == CTRL('S')) { - stop ^= true; - continue; - } - - if (rlen == 1 && buf[0] == CTRL('Q')) { - char dump[] = "\x1B[10i"; - ssize_t wlen = write(STDOUT_FILENO, dump, sizeof(dump) - 1); - if (wlen < 0) err(EX_IOERR, "write"); - continue; - } - ssize_t wlen = write(pty, buf, rlen); if (wlen < 0) err(EX_IOERR, "write"); } @@ -101,10 +86,8 @@ int main(int argc, char *argv[]) { ssize_t wlen = write(STDIN_FILENO, buf, rlen); if (wlen < 0) err(EX_IOERR, "write"); - if (!stop) { - wlen = write(STDOUT_FILENO, buf, rlen); - if (wlen < 0) err(EX_IOERR, "write"); - } + wlen = write(STDOUT_FILENO, buf, rlen); + if (wlen < 0) err(EX_IOERR, "write"); } int status; -- cgit 1.4.1