Added command alias SHOW MUX for SHOW MULTIPLEXOR. To avoid collision with simulators which may have devices named MUX, the device names/units are examined prior to the standard SHOW arguments. Simulators which have a device named MUX can't use the SHOW MUX alias.
This commit is contained in:
parent
4a3bf9ee17
commit
cd0ef35bbf
1 changed files with 5 additions and 3 deletions
8
scp.c
8
scp.c
|
@ -2075,6 +2075,7 @@ static SHTAB show_glob_tab[] = {
|
||||||
{ "ETHERNET", ð_show_devices, 0 },
|
{ "ETHERNET", ð_show_devices, 0 },
|
||||||
{ "SERIAL", &sim_show_serial, 0 },
|
{ "SERIAL", &sim_show_serial, 0 },
|
||||||
{ "MULTIPLEXER", &tmxr_show_open_devices, 0 },
|
{ "MULTIPLEXER", &tmxr_show_open_devices, 0 },
|
||||||
|
{ "MUX", &tmxr_show_open_devices, 0 },
|
||||||
{ "ON", &show_on, 0 },
|
{ "ON", &show_on, 0 },
|
||||||
{ NULL, NULL, 0 }
|
{ NULL, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
@ -2096,8 +2097,6 @@ GET_SWITCHES (cptr); /* get switches */
|
||||||
if (*cptr == 0) /* must be more */
|
if (*cptr == 0) /* must be more */
|
||||||
return SCPE_2FARG;
|
return SCPE_2FARG;
|
||||||
cptr = get_glyph (cptr, gbuf, 0); /* get next glyph */
|
cptr = get_glyph (cptr, gbuf, 0); /* get next glyph */
|
||||||
if ((shptr = find_shtab (show_glob_tab, gbuf))) /* global? */
|
|
||||||
return shptr->action (ofile, NULL, NULL, shptr->arg, cptr);
|
|
||||||
|
|
||||||
if ((dptr = find_dev (gbuf))) { /* device match? */
|
if ((dptr = find_dev (gbuf))) { /* device match? */
|
||||||
uptr = dptr->units; /* first unit */
|
uptr = dptr->units; /* first unit */
|
||||||
|
@ -2112,7 +2111,10 @@ else if ((dptr = find_unit (gbuf, &uptr))) { /* unit match? */
|
||||||
shtb = show_unit_tab; /* global table */
|
shtb = show_unit_tab; /* global table */
|
||||||
lvl = MTAB_VUN; /* unit match */
|
lvl = MTAB_VUN; /* unit match */
|
||||||
}
|
}
|
||||||
else return SCPE_NXDEV; /* no match */
|
else if ((shptr = find_shtab (show_glob_tab, gbuf))) /* global? */
|
||||||
|
return shptr->action (ofile, NULL, NULL, shptr->arg, cptr);
|
||||||
|
else
|
||||||
|
return SCPE_NXDEV; /* no match */
|
||||||
|
|
||||||
if (*cptr == 0) { /* now eol? */
|
if (*cptr == 0) { /* now eol? */
|
||||||
return (lvl == MTAB_VDV)?
|
return (lvl == MTAB_VDV)?
|
||||||
|
|
Loading…
Add table
Reference in a new issue