Switched stdout back to stderr to work properly with pipeline.
This commit is contained in:
parent
3a42f31a4a
commit
185f9a6b42
4
ascii.c
4
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;
|
||||
|
Loading…
Reference in New Issue
Block a user