mirror of
https://github.com/simh/simh.git
synced 2026-01-11 23:52:58 +00:00
SCP: Change declaration of get_yn() to have boolean argument and return value
- Fix improper get_yn() use in test library logic Reported by Peter Shorn
This commit is contained in:
parent
273471d6fb
commit
a938f1e13f
4
scp.c
4
scp.c
@ -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;
|
||||
@ -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
|
||||
|
||||
2
scp.h
2
scp.h
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user