From: Brian Henning Date: Tue, 11 Oct 2016 20:25:18 +0000 (-0400) Subject: Embettered the usage statement; changed "--list-cores" to "-list-cores" to match... X-Git-Tag: v1.4~11^2~1 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=e8e419e6684519ccf0d97bac3e9bef26724aac2f;p=sx%2Fsimavr.git Embettered the usage statement; changed "--list-cores" to "-list-cores" to match "-help" --- diff --git a/simavr/sim/run_avr.c b/simavr/sim/run_avr.c index 8d5d5bf..127f0a1 100644 --- a/simavr/sim/run_avr.c +++ b/simavr/sim/run_avr.c @@ -34,13 +34,14 @@ void display_usage(char * app) { - printf("Usage: %s [-t] [-g] [-v] [-m ] [-f ] firmware\n", app); - printf(" -t: Run full scale decoder trace\n" + printf("Usage: %s [-list-cores] [-help] [-t] [-g] [-v] [-m ] [-f ] firmware\n", app); + printf( " -list-cores: List all supported AVR cores and exit\n" + " -help: Display this usage message and exit\n" + " -t: Run full scale decoder trace\n" " -g: Listen for gdb connection on port 1234\n" " -ff: Load next .hex file as flash\n" " -ee: Load next .hex file as eeprom\n" - " -v: Raise verbosity level (can be passed more than once)\n" - " --list-cores: List all supported AVR cores\n"); + " -v: Raise verbosity level (can be passed more than once)\n"); exit(1); } @@ -84,7 +85,7 @@ int main(int argc, char *argv[]) display_usage(basename(argv[0])); for (int pi = 1; pi < argc; pi++) { - if (!strcmp(argv[pi], "--list-cores")) { + if (!strcmp(argv[pi], "-list-cores")) { list_cores(); } else if (!strcmp(argv[pi], "-h") || !strcmp(argv[pi], "-help")) { display_usage(basename(argv[0]));