From d23942bc37e70eb6a5c27813c8de20d261529a7f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 5 Jun 2021 12:24:57 -0700 Subject: [PATCH] SCP: Allow ; and # comments on SET and SHOW command lines --- scp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scp.c b/scp.c index fff2bcf5..90b8f3f0 100644 --- a/scp.c +++ b/scp.c @@ -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);