Skip to content

Commit

Permalink
SCP: Change declaration of get_yn() to have boolean argument and retu…
Browse files Browse the repository at this point in the history
…rn value

- Fix improper get_yn() use in test library logic

Reported by Peter Shorn
  • Loading branch information
markpizz committed Apr 6, 2023
1 parent 273471d commit a938f1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scp.c
Original file line number Diff line number Diff line change
Expand Up @@ -10875,7 +10875,7 @@ return (CONST char *)get_glyph_gen (iptr, optr, 0, TRUE, FALSE, 0);
result = true if yes, false if no
*/

t_stat get_yn (const char *ques, t_stat deflt)
t_bool get_yn (const char *ques, t_bool deflt)
{
char cbuf[CBUFSIZE];
const char *cptr;
Expand Down Expand Up @@ -17210,7 +17210,7 @@ for (i = 0; (dptr = sim_devices[i]) != NULL; i++) {
stat = tstat;
sim_printf ("%s device tests returned: %d - %s\n", dptr->name, SCPE_BARE_STATUS (tstat), sim_error_text (tstat));
if (sim_ttisatty()) {
if (get_yn ("Continue with additional tests? [N] ", SCPE_STOP) == SCPE_STOP)
if (get_yn ("Continue with additional tests? [N] ", FALSE) == FALSE)
break;
}
else
Expand Down
2 changes: 1 addition & 1 deletion scp.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const char *sim_dname (DEVICE *dptr);
const char *sim_uname (UNIT *dptr);
const char *sim_set_uname (UNIT *uptr, const char *uname);
const char *sim_attach_name (UNIT *dptr);
t_stat get_yn (const char *ques, t_stat deflt);
t_bool get_yn (const char *ques, t_bool deflt);
void sim_srand (unsigned int seed);
int sim_rand (void);
#ifdef RAND_MAX
Expand Down

0 comments on commit a938f1e

Please sign in to comment.