SCP: Allow ; and # comments on SET and SHOW command lines

This commit is contained in:
Mark Pizzolato 2021-06-05 12:24:57 -07:00
parent 2d5226a1cd
commit d23942bc37

8
scp.c
View file

@ -5644,12 +5644,14 @@ else {
lvl = MTAB_VDV; /* device match */
uptr = dptr->units; /* first unit */
}
if (*cptr == 0) /* must be more */
if ((*cptr == 0) || (*cptr == ';') || (*cptr == '#')) /* must be more */
return SCPE_2FARG;
GET_SWITCHES (cptr); /* get more switches */
while (*cptr != 0) { /* do all mods */
cptr = get_glyph (svptr = cptr, gbuf, ','); /* get modifier */
if (0 == strcmp (gbuf, ";"))
break;
if ((cvptr = strchr (gbuf, '='))) /* = value? */
*cvptr++ = 0;
for (mptr = dptr->modifiers; mptr && (mptr->mask != 0); mptr++) {
@ -5902,7 +5904,7 @@ MTAB *mptr;
SHTAB *shtb = NULL, *shptr;
GET_SWITCHES (cptr); /* get switches */
if (*cptr == 0) /* must be more */
if ((*cptr == 0) || (*cptr == ';') || (*cptr == '#')) /* must be more */
return SCPE_2FARG;
cptr = get_glyph (svptr = cptr, gbuf, 0); /* get next glyph */
@ -5950,7 +5952,7 @@ else {
}
}
if (*cptr == 0) { /* now eol? */
if ((*cptr == 0) || (*cptr == ';') || (*cptr == '#')) { /* now eol? */
return (lvl == MTAB_VDV)?
show_device (ofile, dptr, 0):
show_unit (ofile, dptr, uptr, -1);