diff options
Diffstat (limited to 'ptee.c')
-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; |