diff options
author | June McEnroe <june@causal.agency> | 2019-07-28 15:42:50 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-07-28 15:42:50 -0400 |
commit | 03cbe708d5009414c846f9a3c9025c1c4800d065 (patch) | |
tree | 720dbdb581f21f5963f63b80d8a824f00187c5eb | |
parent | Import ptee from src (diff) | |
download | stream-03cbe708d5009414c846f9a3c9025c1c4800d065.tar.gz stream-03cbe708d5009414c846f9a3c9025c1c4800d065.zip |
Remove ptee keybinds
-rw-r--r-- | ptee.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/ptee.c b/ptee.c index 6a9a16b..e760eb3 100644 --- a/ptee.c +++ b/ptee.c @@ -16,7 +16,6 @@ #include <err.h> #include <poll.h> -#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> @@ -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; |