Message when no file args
This commit is contained in:
parent
b7a18125bf
commit
6f07e2f8c6
@ -50,11 +50,11 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
if (optind == argc) {
|
||||
// here when no file args
|
||||
print_help();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
for (int i = optind; i < argc; ++i) {
|
||||
try {
|
||||
// process file argv[i]
|
||||
write_image(std::cout, argv[i]);
|
||||
} catch (const std::runtime_error& ex) {
|
||||
std::cerr << "termage: " << ex.what() << '\n';
|
||||
|
Loading…
x
Reference in New Issue
Block a user