mirror of
https://github.com/simh/simh.git
synced 2026-04-24 19:33:40 +00:00
SCP: Fix display of multi-bit masks and HELP dev SET output
This commit is contained in:
12
scp.c
12
scp.c
@@ -2375,7 +2375,10 @@ if (dptr->modifiers) {
|
|||||||
if (mptr->mstring) {
|
if (mptr->mstring) {
|
||||||
fprint_header (st, &found, header);
|
fprint_header (st, &found, header);
|
||||||
sprintf (buf, "set %s %s%s", sim_dname (dptr), mptr->mstring, (strchr(mptr->mstring, '=')) ? "" : (MODMASK(mptr,MTAB_VALR) ? "=val" : (MODMASK(mptr,MTAB_VALO) ? "{=val}" : "")));
|
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 : ""));
|
if ((strlen (buf) < 30) || (!mptr->help))
|
||||||
|
fprintf (st, "%-30s\t%s\n", buf, mptr->help ? mptr->help : "");
|
||||||
|
else
|
||||||
|
fprintf (st, "%s\n%-30s\t%s\n", buf, "", mptr->help);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4758,9 +4761,12 @@ if (dptr->flags & DEV_DEBUG) {
|
|||||||
else if (dptr->debflags == NULL)
|
else if (dptr->debflags == NULL)
|
||||||
fputs ("Debugging enabled", st);
|
fputs ("Debugging enabled", st);
|
||||||
else {
|
else {
|
||||||
|
uint32 dctrl = dptr->dctrl;
|
||||||
|
|
||||||
fputs ("Debug=", st);
|
fputs ("Debug=", st);
|
||||||
for (dep = dptr->debflags; dep->name != NULL; dep++) {
|
for (dep = dptr->debflags; (dctrl != 0) && (dep->name != NULL); dep++) {
|
||||||
if ((dptr->dctrl & dep->mask) == dep->mask) {
|
if ((dctrl & dep->mask) == dep->mask) {
|
||||||
|
dctrl &= ~dep->mask;
|
||||||
if (any)
|
if (any)
|
||||||
fputc (';', st);
|
fputc (';', st);
|
||||||
fputs (dep->name, st);
|
fputs (dep->name, st);
|
||||||
|
|||||||
Reference in New Issue
Block a user