Message when no file args

This commit is contained in:
Bob Polis 2024-01-19 13:15:18 +01:00
parent b7a18125bf
commit 6f07e2f8c6

View File

@ -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';