Give preference with HELP dev SHOW and HELP dev SET for unit modifiers to be displayed with a unit number as an example (unless the device has only one unit).
This commit is contained in:
parent
6b4353f257
commit
ad4d5be6ab
2 changed files with 7 additions and 0 deletions
4
scp.c
4
scp.c
|
@ -1105,6 +1105,8 @@ if (dptr->modifiers) {
|
|||
for (mptr = dptr->modifiers; mptr->mask != 0; mptr++) {
|
||||
if (!MODMASK(mptr,MTAB_VDV) && MODMASK(mptr,MTAB_VUN))
|
||||
continue; /* skip unit only modifiers */
|
||||
if ((dptr->numunits != 1) && !(mptr->mask & MTAB_XTD))
|
||||
continue;
|
||||
if (mptr->mstring) {
|
||||
sprintf (buf, "set %s %s%s", sim_dname (dptr), mptr->mstring, (strchr(mptr->mstring, '=')) ? "" : (MODMASK(mptr,MTAB_VALR) ? "=val" : (MODMASK(mptr,MTAB_VALO) ? "{=val}" : "")));
|
||||
fprintf (st, "%-30s\t%s\n", buf, (strchr(mptr->mstring, '=')) ? "" : (mptr->help ? mptr->help : ""));
|
||||
|
@ -1161,6 +1163,8 @@ if (dptr->modifiers) {
|
|||
continue; /* skip unit only modifiers */
|
||||
if ((!mptr->disp) || (!mptr->pstring) || !(*mptr->pstring))
|
||||
continue;
|
||||
if ((dptr->numunits != 1) && !(mptr->mask & MTAB_XTD))
|
||||
continue;
|
||||
sprintf (buf, "show %s %s%s", sim_dname (dptr), mptr->pstring, MODMASK(mptr,MTAB_SHP) ? "=arg" : "");
|
||||
fprintf (st, "%-30s\t%s\n", buf, mptr->help ? mptr->help : "");
|
||||
}
|
||||
|
|
3
scp.h
3
scp.h
|
@ -114,6 +114,9 @@ char *get_range (DEVICE *dptr, char *cptr, t_addr *lo, t_addr *hi,
|
|||
uint32 rdx, t_addr max, char term);
|
||||
t_value strtotv (const char *cptr, char **endptr, uint32 radix);
|
||||
t_stat fprint_val (FILE *stream, t_value val, uint32 rdx, uint32 wid, uint32 fmt);
|
||||
void fprint_reg_help (FILE *st, DEVICE *dptr);
|
||||
void fprint_set_help (FILE *st, DEVICE *dptr);
|
||||
void fprint_show_help (FILE *st, DEVICE *dptr);
|
||||
CTAB *find_cmd (char *gbuf);
|
||||
DEVICE *find_dev (char *ptr);
|
||||
DEVICE *find_unit (char *ptr, UNIT **uptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue