Skip to content

Commit f2175db

Browse files
committed
VAX: Standard bool fixes.
vax_sysdev.c: Initialize ka_hltenab, tmr_inst[] to TRUE, FALSE to be consistent with t_bool. vax_va.c, vax_vc.c, vax4xx_va.c, vax4xx_vc.c: Assign va_input_captured from Boolean expression. vax780_fload.c: Update rtfile_read() return type to t_bool (not t_stat.)
1 parent 09331b2 commit f2175db

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

VAX/vax4xx_va.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ t_stat va_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
13841384
{
13851385
if (vid_active)
13861386
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
1387-
va_input_captured = val;
1387+
va_input_captured = (val != 0);
13881388
return SCPE_OK;
13891389
}
13901390

VAX/vax4xx_vc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ t_stat vc_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
544544
{
545545
if (vid_active)
546546
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
547-
vc_input_captured = val;
547+
vc_input_captured = (val != 0);
548548
return SCPE_OK;
549549
}
550550

VAX/vax780_fload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ return 0;
207207

208208
/* Read blocks */
209209

210-
t_stat rtfile_read (uint32 block, uint32 count, uint16 *buffer)
210+
t_bool rtfile_read (uint32 block, uint32 count, uint16 *buffer)
211211
{
212212
uint32 i, j;
213213
uint32 pos;

VAX/vax_sysdev.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ int32 cso_csr = 0; /* control/status */
240240
int32 cmctl_reg[CMCTLSIZE >> 2] = { 0 }; /* CMCTL reg */
241241
int32 ka_cacr = 0; /* KA655 cache ctl */
242242
int32 ka_bdr = BDR_BRKENB; /* KA655 boot diag */
243-
t_bool ka_hltenab = 1; /* Halt Enable / Autoboot flag */
243+
t_bool ka_hltenab = TRUE; /* Halt Enable / Autoboot flag */
244244
int32 ssc_base = SSCBASE; /* SSC base */
245245
int32 ssc_cnf = 0; /* SSC conf */
246246
int32 ssc_bto = 0; /* SSC timeout */
@@ -249,7 +249,7 @@ int32 tmr_csr[2] = { 0 }; /* SSC timers */
249249
uint32 tmr_tir[2] = { 0 }; /* curr interval */
250250
uint32 tmr_tnir[2] = { 0 }; /* next interval */
251251
int32 tmr_tivr[2] = { 0 }; /* vector */
252-
t_bool tmr_inst[2] = { 0 }; /* wait instructions vs usecs */
252+
t_bool tmr_inst[2] = { FALSE, FALSE }; /* wait instructions vs usecs */
253253
int32 ssc_adsm[2] = { 0 }; /* addr strobes */
254254
int32 ssc_adsk[2] = { 0 };
255255
int32 cdg_dat[CDASIZE >> 2]; /* cache data */
@@ -1733,7 +1733,7 @@ return SCPE_OK;
17331733

17341734
t_stat sysd_set_halt (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
17351735
{
1736-
ka_hltenab = val;
1736+
ka_hltenab = (val != 0);
17371737
if (ka_hltenab)
17381738
ka_bdr |= BDR_BRKENB;
17391739
else

VAX/vax_va.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ t_stat va_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
11981198
{
11991199
if (vid_active)
12001200
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
1201-
va_input_captured = val;
1201+
va_input_captured = (val != 0);
12021202
return SCPE_OK;
12031203
}
12041204

VAX/vax_vc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ t_stat vc_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
10791079
{
10801080
if (vid_active)
10811081
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
1082-
vc_input_captured = val;
1082+
vc_input_captured = (val != 0);
10831083
return SCPE_OK;
10841084
}
10851085

0 commit comments

Comments
 (0)