diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2017-05-18 23:11:27 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2017-05-18 23:11:27 +0100 |
commit | 83ad7ea3f3f6ab802987cf4a0e677e68c002cb29 (patch) | |
tree | bcebf3da17e9ede54aad7f6abcab6ecfadaeaa50 | |
parent | 3dc1f6c4aba4a382bc63342658910fbecb8e159d (diff) | |
download | hktool-83ad7ea3f3f6ab802987cf4a0e677e68c002cb29.tar.gz hktool-83ad7ea3f3f6ab802987cf4a0e677e68c002cb29.tar.xz hktool-83ad7ea3f3f6ab802987cf4a0e677e68c002cb29.zip |
hktool.c: replace USAGE macro with something less stupid
-rw-r--r-- | hktool.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -32,7 +32,7 @@ #define VERSION "unknown version" #endif -#define USAGE "[-hlvr] [-f file] [--] mcu" +static const char *usage = "[-hlvr] [-f file] [--] mcu"; static void help(void) { @@ -76,7 +76,7 @@ int main(int argc, char **argv) flashfile = optarg; break; case 'h': - fprintf(stderr, "Usage: %s " USAGE "\n", argv[0]); + fprintf(stderr, "Usage: %s %s\n", argv[0], usage); help(); return EXIT_SUCCESS; break; @@ -92,7 +92,7 @@ int main(int argc, char **argv) doreboot = true; break; case '?': - fprintf(stderr, "Usage: %s " USAGE "\n", argv[0]); + fprintf(stderr, "Usage: %s %s\n", argv[0], usage); return EXIT_FAILURE; break; default: @@ -101,13 +101,13 @@ int main(int argc, char **argv) } if (optind >= argc) - eprintf("No MCU specified\nUsage: %s " USAGE, argv[0]); + eprintf("No MCU specified\nUsage: %s %s", argv[0], usage); if (!doflash && !doreboot) eprintf("Nothing to do"); if (argc - optind > 1) - eprintf("Invalid number of arguments\nUsage: %s " USAGE, argv[0]); + eprintf("Invalid number of arguments\nUsage: %s %s", argv[0], usage); if (getparams(&fp, argv[optind]) != 0) return EXIT_FAILURE; |