Use FatalError()

-Erik
This commit is contained in:
Eric Andersen 2000-07-19 17:36:27 +00:00
parent ae6eae02dd
commit a16c66335e
2 changed files with 4 additions and 8 deletions

View File

@ -136,16 +136,14 @@ int wc_main(int argc, char **argv)
} else if (argc == 1) {
file = fopen(*argv, "r");
if (file == NULL) {
perror(*argv);
exit(FALSE);
fatalError(*argv);
}
wc_file(file, *argv);
} else {
while (argc-- > 0) {
file = fopen(*argv, "r");
if (file == NULL) {
perror(*argv);
exit(FALSE);
fatalError(*argv);
}
wc_file(file, *argv);
argv++;

6
wc.c
View File

@ -136,16 +136,14 @@ int wc_main(int argc, char **argv)
} else if (argc == 1) {
file = fopen(*argv, "r");
if (file == NULL) {
perror(*argv);
exit(FALSE);
fatalError(*argv);
}
wc_file(file, *argv);
} else {
while (argc-- > 0) {
file = fopen(*argv, "r");
if (file == NULL) {
perror(*argv);
exit(FALSE);
fatalError(*argv);
}
wc_file(file, *argv);
argv++;