From 185f9a6b4284c6c37ad274a902e15ed3e3241fac Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 5 Jan 2019 19:22:25 -0800 Subject: [PATCH] Switched stdout back to stderr to work properly with pipeline. --- ascii.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ascii.c b/ascii.c index 6b37e3d..fe7a6d4 100644 --- a/ascii.c +++ b/ascii.c @@ -195,7 +195,7 @@ int main(int argc, char *argv[]) perror("fopen(/dev/tty)"); exit(EXIT_FAILURE); } - SCREEN *screen = newterm(term_type, stdout, term_in); + SCREEN *screen = newterm(term_type, stderr, term_in); set_term(screen); set_escdelay(5); W = getmaxx(stdscr); @@ -351,7 +351,7 @@ int main(int argc, char *argv[]) case 'q': case 'Q': case KEY_CANCEL: case KEY_CLOSE: case KEY_EXIT: case 27: endwin(); - write(1, outbuf, buf_i); + write(STDOUT_FILENO, outbuf, buf_i); return 0; default: goto next_input;