diff options
author | Cyril Bur <cyrilbur@gmail.com> | 2018-02-14 15:27:43 +1100 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2018-02-16 16:22:23 +1100 |
commit | 8fb428320252d606658bbd25acfb1eadc516bdd2 (patch) | |
tree | a32a24a876eaeb75c5f32e88694318418e5ac5c0 | |
parent | 2f0db42bf79bb0e91cc424dcb71ba78ff4766526 (diff) | |
download | pdbg-8fb428320252d606658bbd25acfb1eadc516bdd2.tar.gz pdbg-8fb428320252d606658bbd25acfb1eadc516bdd2.zip |
pdbg/htm: Force the user to learn the new HTM commands
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
-rw-r--r-- | src/htm.c | 75 |
1 files changed, 65 insertions, 10 deletions
@@ -304,41 +304,96 @@ int run_htm(int optind, int argc, char *argv[]) } /* - * These are all the old handlers that only worked with nest HTM. - * I don't want to break the commands but we've gone with a more - * flexible HTM command structure to better incorporate core HTM. + * Handle the deprecated commands by telling the user what the new + * command is. */ int run_htm_start(int optind, int argc, char *argv[]) { - return run_start(HTM_NEST, optind, argc, argv); + int i; + + fprintf(stderr, "You're running a deprecated command!\n"); + fprintf(stderr, "Please use:\n"); + for (i = 0; i < optind; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "htm nest start\n"); + + return 0; } int run_htm_stop(int optind, int argc, char *argv[]) { - return run_stop(HTM_NEST, optind, argc, argv); + int i; + + fprintf(stderr, "You're running a deprecated command!\n"); + fprintf(stderr, "Please use:\n"); + for (i = 0; i < optind; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "htm nest stop\n"); + + return 0; } int run_htm_status(int optind, int argc, char *argv[]) { - return run_status(HTM_NEST, optind, argc, argv); + int i; + + fprintf(stderr, "You're running a deprecated command!\n"); + fprintf(stderr, "Please use:\n"); + for (i = 0; i < optind; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "htm nest status\n"); + + return 0; } int run_htm_reset(int optind, int argc, char *argv[]) { - return run_reset(HTM_NEST, optind, argc, argv); + int i; + + fprintf(stderr, "You're running a deprecated command!\n"); + fprintf(stderr, "Please use:\n"); + for (i = 0; i < optind; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "htm nest reset\n"); + + return 0; } int run_htm_dump(int optind, int argc, char *argv[]) { - return run_dump(HTM_NEST, optind, argc, argv);; + int i; + + fprintf(stderr, "You're running a deprecated command!\n"); + fprintf(stderr, "Please use:\n"); + for (i = 0; i < optind; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "htm nest dump\n"); + + return 0; } int run_htm_trace(int optind, int argc, char *argv[]) { - return run_trace(HTM_NEST, optind, argc, argv); + int i; + + fprintf(stderr, "You're running a deprecated command!\n"); + fprintf(stderr, "Please use:\n"); + for (i = 0; i < optind; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "htm nest trace\n"); + + return 0; } int run_htm_analyse(int optind, int argc, char *argv[]) { - return run_analyse(HTM_NEST, optind, argc, argv); + int i; + + fprintf(stderr, "You're running a deprecated command!\n"); + fprintf(stderr, "Please use:\n"); + for (i = 0; i < optind; i++) + fprintf(stderr, "%s ", argv[i]); + fprintf(stderr, "htm nest analyse\n"); + + return 0; } |