diff --git a/scp.c b/scp.c index 3597c9fe..cd7f3fd2 100644 --- a/scp.c +++ b/scp.c @@ -5978,11 +5978,14 @@ while (*cptr != 0) { /* do all mods */ if (r != SCPE_OK) return r; } - else if (!mptr->desc) /* value desc? */ - break; - else if (cvptr) /* = value? */ - return SCPE_ARG; - else *((int32 *) mptr->desc) = mptr->match; + else + if (!mptr->desc) /* value desc? */ + break; + else + if (cvptr) /* = value? */ + return SCPE_ARG; + else + *((int32 *) mptr->desc) = mptr->match; } /* end if xtd */ else { /* old style */ if (cvptr) /* = value? */ @@ -6004,9 +6007,11 @@ while (*cptr != 0) { /* do all mods */ if (r != SCPE_OK) return r; } - else if (!dptr->modifiers) /* no modifiers? */ - return SCPE_NOPARAM; - else return sim_messagef (SCPE_NXPAR, "%s device: Non-existent parameter - %s\n", dptr->name, gbuf); + else + if (!dptr->modifiers) /* no modifiers? */ + return sim_messagef (SCPE_NOPARAM, "%s device has no parameters\n", dptr->name); + else + return sim_messagef (SCPE_NXPAR, "%s device: Non-existent parameter - %s\n", dptr->name, gbuf); } /* end if no mat */ } /* end while */ return SCPE_OK; /* done all */ diff --git a/sim_console.c b/sim_console.c index 3168ccb3..0e839ee5 100644 --- a/sim_console.c +++ b/sim_console.c @@ -417,7 +417,8 @@ while (*cptr != 0) { /* do all mods */ if (r != SCPE_OK) return r; } - else return SCPE_NOPARAM; + else + return sim_messagef (SCPE_NOPARAM, "Invalid console parameter: %s\n", gbuf); } return SCPE_OK; } @@ -440,7 +441,8 @@ while (*cptr != 0) { cptr = get_glyph (cptr, gbuf, ','); /* get modifier */ if ((shptr = find_shtab (show_con_tab, gbuf))) shptr->action (st, dptr, uptr, shptr->arg, NULL); - else return SCPE_NOPARAM; + else + return sim_messagef (SCPE_NOPARAM, "Invalid console parameter: %s\n", gbuf); } return SCPE_OK; } @@ -588,7 +590,8 @@ while (*cptr != 0) { /* do all mods */ if (r != SCPE_OK) return r; } - else return SCPE_NOPARAM; + else + return sim_messagef (SCPE_NOPARAM, "Invalid remote console parameter: %s\n", gbuf); } return SCPE_OK; } @@ -1919,7 +1922,7 @@ if (flag) { sim_activate_after(rem_con_poll_unit, 1000000);/* check for connection in 1 second */ return r; } - return SCPE_NOPARAM; + return sim_messagef (SCPE_NOPARAM, "Invalid remote telnet specification: %s\n", gbuf); } else { if (sim_rem_con_tmxr.master) { diff --git a/sim_timer.c b/sim_timer.c index dc46d902..88a47b87 100644 --- a/sim_timer.c +++ b/sim_timer.c @@ -1601,7 +1601,8 @@ while (*cptr != 0) { /* do all mods */ if (r != SCPE_OK) return r; } - else return SCPE_NOPARAM; + else + return sim_messagef (SCPE_NOPARAM, "Invalid timer parameter: %s\n", gbuf); } return SCPE_OK; }