diff options
Diffstat (limited to 'more.c')
-rw-r--r-- | more.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -751,15 +751,16 @@ int main(int argc, char *argv[]) return ret; } - if (isatty(STDIN_FILENO)) { - initscr(); - } else { + if (newterm(NULL, stdout, stderr) == NULL) { FILE *tty = fopen("/dev/tty", "r"); if (tty == NULL) { perror("more: couldn't open terminal"); return 1; } - newterm(NULL, stdout, tty); + if (newterm(NULL, stdout, tty) == NULL) { + perror("more: couldn't open terminal"); + return 1; + } } cbreak(); |