From 16d04a15ec81d6571a5087b44f692807b760ac6f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 5 Feb 2013 11:37:56 -0800 Subject: [PATCH] simplified the generic help command output to avoid excess clutter --- scp.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/scp.c b/scp.c index 3310fcc5..3caf635d 100644 --- a/scp.c +++ b/scp.c @@ -773,7 +773,11 @@ static CTAB cmd_table[] = { "h{elp} type this message\n" "h{elp} type help for command\n" "h{elp} type help for device\n" - "h{elp} type help for device command (ATTACH, SET, SHOW)\n" }, + "h{elp} registers type help for device register variables\n" + "h{elp} attach type help for device specific ATTACH command\n" + "h{elp} set type help for device specific SET commands\n" + "h{elp} show type help for device specific SHOW commands\n" + "h{elp} type help for device specific command\n" }, { NULL, NULL, 0 } }; @@ -1002,8 +1006,6 @@ return SCPE_EXIT; void fprint_help (FILE *st) { CTAB *cmdp; -DEVICE *dptr; -int i; for (cmdp = sim_vm_cmd; cmdp && (cmdp->name != NULL); cmdp++) { if (cmdp->help) @@ -1013,26 +1015,6 @@ for (cmdp = cmd_table; cmdp && (cmdp->name != NULL); cmdp++) { if (cmdp->help && (!sim_vm_cmd || !find_ctab (sim_vm_cmd, cmdp->name))) fputs (cmdp->help, st); } -for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { - if (dptr->help) - fprintf (st, "h{elp} %-17s type help for device %s\n", dptr->name, dptr->name); - if (dptr->attach_help || - (DEV_TYPE(dptr) == DEV_MUX) || - (DEV_TYPE(dptr) == DEV_ETHER) || - (DEV_TYPE(dptr) == DEV_DISK) || - (DEV_TYPE(dptr) == DEV_TAPE)) { - if (dptr->numunits == 1) - fprintf (st, "h{elp} %s ATTACH\t type help for device %s ATTACH command\n", dptr->name, dptr->name); - else { - fprintf (st, "h{elp} %s ATTACH\t type help for device %s ATTACH command\n", dptr->name, dptr->name); - fprintf (st, "h{elp} %sn ATTACH\t type help for unit %sn ATTACH command\n", dptr->name, dptr->name); - } - } - if (dptr->registers) { - if (dptr->registers->name != NULL) - fprintf (st, "h{elp} %s REGISTERS\t type help for device %s register variables\n", dptr->name, dptr->name); - } - } return; }