Consolidate handling of some fopen failures.

This commit is contained in:
Matt Kraai 2000-09-27 02:43:35 +00:00
parent e0bcce09ba
commit bbaef66b3f
14 changed files with 32 additions and 73 deletions

View file

@ -82,12 +82,8 @@ extern int more_main(int argc, char **argv)
if (argc == 0) {
file = stdin;
} else
file = fopen(*argv, "r");
file = xfopen(*argv, "r");
if (file == NULL) {
perror(*argv);
exit(FALSE);
}
fstat(fileno(file), &st);
#ifdef BB_FEATURE_USE_TERMIOS