SCP: Allow command switches -N and -Y to specify the answer to Yes/No prompts during command execution.

This commit is contained in:
Mark Pizzolato 2015-12-06 10:25:33 -08:00
parent ad3dc29d5d
commit b942bac409

4
scp.c
View file

@ -7201,6 +7201,10 @@ t_stat get_yn (const char *ques, t_stat deflt)
{ {
char cbuf[CBUFSIZE], *cptr; char cbuf[CBUFSIZE], *cptr;
if (sim_switches & SWMASK ('Y'))
return TRUE;
if (sim_switches & SWMASK ('N'))
return FALSE;
if (sim_rem_cmd_active_line != -1) if (sim_rem_cmd_active_line != -1)
return deflt; return deflt;
cptr = read_line_p (ques, cbuf, sizeof(cbuf), stdin); cptr = read_line_p (ques, cbuf, sizeof(cbuf), stdin);