From 2d5f4d891056e6ce1ad585a19d949be984ceb52a Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Tue, 5 Aug 2025 11:22:58 -0400 Subject: [PATCH] More consistent missing-input error messages --- src/asm/main.cpp | 2 +- src/fix/main.cpp | 2 +- src/gfx/main.cpp | 2 +- src/link/main.cpp | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/asm/main.cpp b/src/asm/main.cpp index c9919e4f..f04e455b 100644 --- a/src/asm/main.cpp +++ b/src/asm/main.cpp @@ -507,7 +507,7 @@ int main(int argc, char *argv[]) { verboseOutputConfig(argc, argv); if (argc == musl_optind) { - usage.printAndExit("Please specify an input file (pass `-` to read from standard input)"); + usage.printAndExit("No input file specified (pass `-` to read from standard input)"); } else if (argc != musl_optind + 1) { usage.printAndExit("More than one input file specified"); } diff --git a/src/fix/main.cpp b/src/fix/main.cpp index 6e3da2fc..9c034405 100644 --- a/src/fix/main.cpp +++ b/src/fix/main.cpp @@ -898,7 +898,7 @@ int main(int argc, char *argv[]) { argv += musl_optind; if (!*argv) { - usage.printAndExit("Please specify an input file (pass `-` to read from standard input)"); + usage.printAndExit("No input file specified (pass `-` to read from standard input)"); } if (outputFilename && argc != musl_optind + 1) { diff --git a/src/gfx/main.cpp b/src/gfx/main.cpp index a0f62143..877b0d26 100644 --- a/src/gfx/main.cpp +++ b/src/gfx/main.cpp @@ -862,7 +862,7 @@ int main(int argc, char *argv[]) { && !localOptions.reverse) { processPalettes(); } else { - usage.printAndExit("No input image specified"); + usage.printAndExit("No input file specified (pass `-` to read from standard input)"); } requireZeroErrors(); diff --git a/src/link/main.cpp b/src/link/main.cpp index fd8f7665..5d3945fd 100644 --- a/src/link/main.cpp +++ b/src/link/main.cpp @@ -424,9 +424,8 @@ int main(int argc, char *argv[]) { verboseOutputConfig(argc, argv); - // If no input files were specified, the user must have screwed up if (musl_optind == argc) { - usage.printAndExit("Please specify an input file (pass `-` to read from standard input)"); + usage.printAndExit("No input file specified (pass `-` to read from standard input)"); } // Patch the size array depending on command-line options