summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools
diff options
context:
space:
mode:
authorGravatarGravatar Dan Church <amphetamachine@gmail.com>2019-05-03 13:44:15 -0500
committerGravatarGravatar Dan Church <amphetamachine@gmail.com>2019-05-03 13:44:15 -0500
commit3a8afa680e4fc0b5078ab37565dbdaf07a56224e (patch)
tree0ab437430bacb41847c03c2600a743097d5dbcb5 /src/tools
parentc1d33ab8b3d183ffb66d491d44086ff6eba479c0 (diff)
castool: Fix usage message
castool was calling itself castool.exe even on *NIX systems.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/castool.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/castool.cpp b/src/tools/castool.cpp
index bba809cd88d..6c10cfe4ed8 100644
--- a/src/tools/castool.cpp
+++ b/src/tools/castool.cpp
@@ -135,10 +135,10 @@ static std::string get_extension(const char *name)
return s ? std::string(s+1) : "";
}
-static void display_usage(void)
+static void display_usage(const char *argv0)
{
fprintf(stderr, "Usage: \n");
- fprintf(stderr, " castool.exe convert <format> <inputfile> <outputfile.wav>\n");
+ fprintf(stderr, " %s convert <format> <inputfile> <outputfile.wav>\n", argv0);
}
static void display_formats(void)
@@ -168,7 +168,7 @@ int CLIB_DECL main(int argc, char *argv[])
// convert command
if (argc!=5) {
fprintf(stderr, "Wrong parameter number.\n\n");
- display_usage();
+ display_usage(argv[0]);
return -1;
} else {
for (i = 0; formats[i].name; i++) {
@@ -179,7 +179,7 @@ int CLIB_DECL main(int argc, char *argv[])
}
if (found==0) {
fprintf(stderr, "Wrong format name.\n\n");
- display_usage();
+ display_usage(argv[0]);
fprintf(stderr, "\n");
display_formats();
return -1;
@@ -207,11 +207,11 @@ int CLIB_DECL main(int argc, char *argv[])
/* Usage */
fprintf(stderr, "castool - Generic cassette manipulation tool for use with MAME\n\n");
- display_usage();
+ display_usage(argv[0]);
fprintf(stderr, "\n");
display_formats();
fprintf(stderr, "\nExample usage:\n");
- fprintf(stderr, " castool.exe convert tzx game.tzx game.wav\n\n");
+ fprintf(stderr, " %s convert tzx game.tzx game.wav\n\n", argv[0]);
theend :
return 0;