Skip to content
6 changes: 3 additions & 3 deletions 3B2/3b2_mau.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@
#define MAU_RC_RZ 3 /* Round toward Zero */
#endif

#define SFP_SIGN(V) (((V) >> 31) & 1)
#define SFP_SIGN(V) ((((V) >> 31) & 1) != 0)
#define SFP_EXP(V) (((V) >> 23) & 0xff)
#define SFP_FRAC(V) ((V) & 0x7fffff)

#define DFP_SIGN(V) (((V) >> 63) & 1)
#define DFP_SIGN(V) ((((V) >> 63) & 1) != 0)
#define DFP_EXP(V) (((V) >> 52) & 0x7ff)
#define DFP_FRAC(V) ((V) & 0xfffffffffffffull)

#define XFP_SIGN(V) (((V)->sign_exp >> 15) & 1)
#define XFP_SIGN(V) ((((V)->sign_exp >> 15) & 1) != 0)
#define XFP_EXP(V) ((V)->sign_exp & 0x7fff)
#define XFP_FRAC(V) ((V)->frac)

Expand Down
2 changes: 1 addition & 1 deletion AltairZ80/m68k/example/m68kcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ void m68k_set_irq(unsigned int int_level)
/* A transition from < 7 to 7 always interrupts (NMI) */
/* Note: Level 7 can also level trigger like a normal IRQ */
if(old_level != 0x0700 && CPU_INT_LEVEL == 0x0700)
m68ki_cpu.nmi_pending = TRUE;
m68ki_cpu.nmi_pending = NMI_TRUE;
}

void m68k_set_virq(unsigned int level, unsigned int active)
Expand Down
6 changes: 3 additions & 3 deletions AltairZ80/m68k/m68k.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ extern "C" {
#define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0]))
#endif

#ifndef FALSE
#define FALSE 0
#define TRUE 1
#ifndef NMI_FALSE
#define NMI_FALSE 0
#define NMI_TRUE 1
#endif

/* ======================================================================== */
Expand Down
2 changes: 1 addition & 1 deletion AltairZ80/m68k/m68kcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ void m68k_set_irq(unsigned int int_level)
/* A transition from < 7 to 7 always interrupts (NMI) */
/* Note: Level 7 can also level trigger like a normal IRQ */
if(old_level != 0x0700 && CPU_INT_LEVEL == 0x0700)
m68ki_cpu.nmi_pending = TRUE;
m68ki_cpu.nmi_pending = NMI_TRUE;
}

void m68k_set_virq(unsigned int level, unsigned int active)
Expand Down
2 changes: 1 addition & 1 deletion AltairZ80/m68k/m68kcpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ static inline void m68ki_check_interrupts(void)
{
if(m68ki_cpu.nmi_pending)
{
m68ki_cpu.nmi_pending = FALSE;
m68ki_cpu.nmi_pending = NMI_FALSE;
m68ki_exception_interrupt(7);
}
else if(CPU_INT_LEVEL > FLAG_INT_MASK)
Expand Down
4 changes: 2 additions & 2 deletions AltairZ80/m68k/softfloat/milieu.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ these four paragraphs for those parts of this code that are retained.
/*----------------------------------------------------------------------------
| Symbolic Boolean literals.
*----------------------------------------------------------------------------*/
#define FALSE 0
#define TRUE 1
#define NMI_FALSE 0
#define NMI_TRUE 1
6 changes: 3 additions & 3 deletions AltairZ80/s100_dazzler.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
*/
VID_DISPLAY *daz_vptr = NULL;

static t_bool daz_0e = 0x00;
static t_bool daz_0f = 0x80;
static uint8 daz_0e = 0x00;
static uint8 daz_0f = 0x80;
static uint32 daz_addr = 0x0000;
static t_bool daz_frame = 0x3f;
static uint8 daz_frame = 0x3f;
static uint8 daz_res = 32;
static uint16 daz_pages = 1;
static uint16 daz_window_width = 640;
Expand Down
2 changes: 1 addition & 1 deletion H316/h316_hi.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ t_stat hi_attach (UNIT *uptr, CONST char *cptr)
// ATTACH HIn llll:w.x.y.z:rrrr - connect via UDP to a remote simh host
//
t_stat ret; char *pfn; uint16 host = uptr->hline;
t_bool fport = sim_switches & SWMASK('P');
t_bool fport = ((sim_switches & SWMASK('P')) != 0);

// If we're already attached, then detach ...
if ((uptr->flags & UNIT_ATT) != 0) detach_unit(uptr);
Expand Down
2 changes: 1 addition & 1 deletion H316/h316_mi.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ t_stat mi_attach (UNIT *uptr, CONST char *cptr)
// ATTACH MIn llll:w.x.y.z:rrrr - connect via UDP to a remote simh host
//
t_stat ret; char *pfn; uint16 line = uptr->mline;
t_bool fport = sim_switches & SWMASK('P');
t_bool fport = ((sim_switches & SWMASK('P')) != 0);

// If we're already attached, then detach ...
if ((uptr->flags & UNIT_ATT) != 0) detach_unit(uptr);
Expand Down
4 changes: 2 additions & 2 deletions HP2100/hp2100_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,8 @@ typedef enum { /* poll synchronization modes */
/* Flip-flops */

typedef enum { /* flip-flop values */
CLEAR = 0, /* the flip-flop is clear */
SET = 1 /* the flip-flop is set */
CLEAR = FALSE, /* the flip-flop is clear */
SET = TRUE /* the flip-flop is set */
} FLIP_FLOP;


Expand Down
2 changes: 1 addition & 1 deletion HP2100/hp2100_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -4153,7 +4153,7 @@ switch (op_type) { /* dispatch by the opera

case opSCHC:
case opSCOHC:
clear = (instruction & IR_HCF); /* set TRUE if the clear-flag bit is set */
clear = (instruction & IR_HCF) != 0; /* set TRUE if the clear-flag bit is set */

/* fall through into the opSC case */

Expand Down
3 changes: 2 additions & 1 deletion HP3000/hp3000_lp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1718,10 +1718,11 @@ return IORETURN (outbound_signals, outbound_value); /* return the outbound s
static t_stat xfer_service (UNIT *uptr)
{
static t_bool device_flag_last = FALSE;
const t_bool device_cmd_bool = (device_command ^ J2W10_INSTALLED) != 0;
t_stat result;
OUTBOUND_SET signals;

device_command_out = device_command ^ J2W10_INSTALLED; /* set device command out; invert if W10 is installed */
device_command_out = device_cmd_bool; /* set device command out; invert if W10 is installed */

if (lp_dev.flags & DEV_DIAG) /* if the DHA is connected */
result = diag_service (uptr); /* then service the diagnostic hardware */
Expand Down
2 changes: 1 addition & 1 deletion I1401/i1401_cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

extern uint8 M[];
extern int32 ind[64], ssa, iochk;
extern int32 conv_old;
extern t_bool conv_old;

int32 s1sel, s2sel, s4sel, s8sel;
char cdr_buf[(2 * CBUFSIZE) + 1]; /* > CDR_WIDTH */
Expand Down
4 changes: 2 additions & 2 deletions I1401/i1401_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int32 iochk = 0; /* I/O check stop */
int32 hst_p = 0; /* history pointer */
int32 hst_lnt = 0; /* history length */
InstHistory *hst = NULL; /* instruction history */
t_bool conv_old = 0; /* old conversions */
t_bool conv_old = FALSE; /* old conversions */

extern int32 sim_emax;

Expand Down Expand Up @@ -1954,7 +1954,7 @@ return SCPE_OK;

t_stat cpu_set_conv (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
conv_old = val;
conv_old = (val != 0);
return SCPE_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion I1401/i1401_iq.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ DEVICE inq_dev = {
t_stat inq_io (int32 flag, int32 mod)
{
int32 i, t, wm_seen = 0;
t_bool use_h = inq_unit.flags & UNIT_PCH;
t_bool use_h = ((inq_unit.flags & UNIT_PCH) != 0);

ind[IN_INC] = 0; /* clear inq clear */
switch (mod) { /* case on mod */
Expand Down
4 changes: 2 additions & 2 deletions I1401/i1401_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ return;
t_stat dcw (FILE *of, int32 op, t_value *val, int32 sw)
{
int32 i;
t_bool use_h = sw & SWMASK ('F');
t_bool use_h = (sw & SWMASK ('F')) != 0;

fprintf (of, "DCW @%c", bcd2ascii (op, use_h)); /* assume it's data */
for (i = 1; i < sim_emax; i++) {
Expand Down Expand Up @@ -232,7 +232,7 @@ t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
{
int32 op, flags, ilnt, i, t;
int32 wmch = conv_old? '~': '`';
t_bool use_h = sw & SWMASK ('F');
t_bool use_h = (sw & SWMASK ('F')) != 0;

if (sw & SWMASK ('C')) { /* character? */
t = val[0];
Expand Down
2 changes: 1 addition & 1 deletion I7094/i7094_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ t_stat ch6_end_nds (uint32 ch);
uint32 ch6_set_flags (uint32 ch, uint32 unit, uint32 flags);
t_stat ch6_err_disc (uint32 ch, uint32 unit, uint32 flags);
t_stat ch6_req_rd (uint32 ch, uint32 unit, t_uint64 val, uint32 flags);
t_stat ch6_req_wr (uint32 ch, uint32 unit);
t_bool ch6_req_wr (uint32 ch, uint32 unit);
t_bool ch6_qconn (uint32 ch, uint32 unit);
t_stat ch9_req_rd (uint32 ch, t_uint64 val);
void ch9_set_atn (uint32 ch);
Expand Down
2 changes: 0 additions & 2 deletions Ibm1130/ibm1130_cr.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,6 @@ static CPCODE cardcode_026C[] = /* 026 commercial */
{0x2220, '('}, /* if ASCII has (, treat like % */
};

extern int cgi;

static int16 ascii_to_card[256];

static CPCODE *cardcode;
Expand Down
4 changes: 2 additions & 2 deletions Ibm1130/ibm1130_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
/* ------------------------------------------------------------------------ */
/* Global state */

extern int cgi; /* TRUE if we are running as a CGI program */
extern int cgiwritable; /* TRUE if we can write the disk images back to the image file in CGI mode */
extern t_bool cgi; /* TRUE if we are running as a CGI program */
extern t_bool cgiwritable; /* TRUE if we can write the disk images back to the image file in CGI mode */
extern t_bool sim_gui;

extern uint16 M[]; /* core memory, up to 32Kwords (note: don't even think about trying 64K) */
Expand Down
2 changes: 1 addition & 1 deletion Ibm1130/ibm1130_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ static t_stat dsk_attach (UNIT *uptr, CONST char *cptr)
}

enable_dms_tracing(sim_switches & SWMASK('D'));
raw_disk_debug = sim_switches & SWMASK('G');
raw_disk_debug = (sim_switches & SWMASK('G')) != 0;

return SCPE_OK;
}
Expand Down
4 changes: 2 additions & 2 deletions Ibm1130/ibm1130_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ extern int boot_drive;
extern t_bool program_is_loaded;

#ifndef GUI_SUPPORT
void update_gui (int force) {} /* stubs for non-GUI builds */
void update_gui (t_bool force) {} /* stubs for non-GUI builds */
void forms_check (int set) {}
void print_check (int set) {}
void keyboard_select (int select) {}
Expand Down Expand Up @@ -403,7 +403,7 @@ static void RepaintRegion (HWND hWnd, int left, int top, int right, int bottom)
* reflected instantly.
* ------------------------------------------------------------------------ */

void update_gui (BOOL force)
void update_gui (t_bool force)
{
int i;
BOOL state;
Expand Down
4 changes: 2 additions & 2 deletions Ibm1130/ibm1130_sca.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ static t_stat sca_svc (UNIT *uptr)
if (timeout)
sca_interrupt(SCA_DSW_TIMEOUT);

any_timer_running = (sca_timer_state[0]| sca_timer_state[1] | sca_timer_state[2]) & SCA_TIMER_RUNNING;
any_timer_running = ((sca_timer_state[0]| sca_timer_state[1] | sca_timer_state[2]) & SCA_TIMER_RUNNING) != 0;
}

if (sca_dsw & SCA_DSW_READY) { /* if connected */
Expand Down Expand Up @@ -1003,7 +1003,7 @@ void xio_sca (int32 iocc_addr, int32 func, int32 modify)
sca_toggle_timer(TIMER_3S, msec_now); /* toggle the 3 sec and 1.35 sec timers accordingly */
sca_toggle_timer(TIMER_125S, msec_now);

any_timer_running = (sca_timer_state[0]| sca_timer_state[1] | sca_timer_state[2]) & SCA_TIMER_RUNNING;
any_timer_running = ((sca_timer_state[0]| sca_timer_state[1] | sca_timer_state[2]) & SCA_TIMER_RUNNING) != 0;
}

if (modify & 0x10) { /* bit 11 */
Expand Down
2 changes: 0 additions & 2 deletions Ibm1130/ibm1130_stddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ typedef struct tag_os_map { /* os_map = overstrike mapping */
unsigned char inlist[MAX_OS_CHARS]; /* inlist = overstruck ASCII characters, sorted. NOT NULL TERMINATED */
} OS_MAP;

extern int cgi;

static int32 tti_dsw = 0; /* device status words */
static int32 tto_dsw = 0;
int32 con_dsw = 0;
Expand Down
2 changes: 1 addition & 1 deletion Interdata/id_idc.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ t_stat idc_attach (UNIT *uptr, CONST char *cptr);
t_stat idc_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
void idc_wd_byte (uint32 dat);
t_stat idc_rds (UNIT *uptr);
t_stat idc_wds (UNIT *uptr);
t_bool idc_wds (UNIT *uptr);
t_bool idc_dter (UNIT *uptr, uint32 first);
void idc_done (uint32 flg);

Expand Down
2 changes: 1 addition & 1 deletion ND100/nd100_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ gw(FILE *f)
*/

t_stat
sim_load(FILE *f, CONST char *buf, CONST char *fnam, t_bool flag)
sim_load(FILE *f, CONST char *buf, CONST char *fnam, int flag)
{
int B, C, E, F, H, I;
int w, i, rv;
Expand Down
2 changes: 1 addition & 1 deletion PDP10/pdp10_ksio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ return;

/* Build dib_tab from device list */

t_bool build_dib_tab (void)
t_stat build_dib_tab (void)
{
int32 i, j, k;
DEVICE *dptr;
Expand Down
2 changes: 1 addition & 1 deletion PDP11/pdp11_cr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ t_stat cr_set_eof ( UNIT *uptr,
{
if (DEBUG_PRS (cr_dev))
fprintf (sim_deb, "set_eof\n");
eofPending = 1;
eofPending = TRUE;

return (SCPE_OK);
}
Expand Down
2 changes: 1 addition & 1 deletion PDP11/pdp11_rq.c
Original file line number Diff line number Diff line change
Expand Up @@ -3230,7 +3230,7 @@ t_stat rq_attach (UNIT *uptr, CONST char *cptr)
{
MSC *cp = rq_ctxmap[uptr->cnum];
t_stat r;
t_bool dontchangecapac = (uptr->flags & UNIT_NOAUTO);
t_bool dontchangecapac = ((uptr->flags & UNIT_NOAUTO) != 0);

if (drv_tab[GET_DTYPE (uptr->flags)].flgs & RQDF_RO) {
sim_switches |= SWMASK ('R');
Expand Down
2 changes: 1 addition & 1 deletion SAGE/m68k_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static t_stat m68k_sread(FILE* fptr)
return SCPE_FMT;
}

t_stat sim_load(FILE* fptr, CONST char* cptr, CONST char* fnam, t_bool flag)
t_stat sim_load(FILE* fptr, CONST char* cptr, CONST char* fnam, int flag)
{
int i,len,rc;
uint16 data;
Expand Down
2 changes: 1 addition & 1 deletion VAX/vax4xx_va.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ t_stat va_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
if (vid_active)
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
va_input_captured = val;
va_input_captured = (val != 0);
return SCPE_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion VAX/vax4xx_vc.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ t_stat vc_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
if (vid_active)
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
vc_input_captured = val;
vc_input_captured = (val != 0);
return SCPE_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion VAX/vax780_fload.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ return 0;

/* Read blocks */

t_stat rtfile_read (uint32 block, uint32 count, uint16 *buffer)
t_bool rtfile_read (uint32 block, uint32 count, uint16 *buffer)
{
uint32 i, j;
uint32 pos;
Expand Down
6 changes: 3 additions & 3 deletions VAX/vax_sysdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ int32 cso_csr = 0; /* control/status */
int32 cmctl_reg[CMCTLSIZE >> 2] = { 0 }; /* CMCTL reg */
int32 ka_cacr = 0; /* KA655 cache ctl */
int32 ka_bdr = BDR_BRKENB; /* KA655 boot diag */
t_bool ka_hltenab = 1; /* Halt Enable / Autoboot flag */
t_bool ka_hltenab = TRUE; /* Halt Enable / Autoboot flag */
int32 ssc_base = SSCBASE; /* SSC base */
int32 ssc_cnf = 0; /* SSC conf */
int32 ssc_bto = 0; /* SSC timeout */
Expand All @@ -249,7 +249,7 @@ int32 tmr_csr[2] = { 0 }; /* SSC timers */
uint32 tmr_tir[2] = { 0 }; /* curr interval */
uint32 tmr_tnir[2] = { 0 }; /* next interval */
int32 tmr_tivr[2] = { 0 }; /* vector */
t_bool tmr_inst[2] = { 0 }; /* wait instructions vs usecs */
t_bool tmr_inst[2] = { FALSE, FALSE }; /* wait instructions vs usecs */
int32 ssc_adsm[2] = { 0 }; /* addr strobes */
int32 ssc_adsk[2] = { 0 };
int32 cdg_dat[CDASIZE >> 2]; /* cache data */
Expand Down Expand Up @@ -1733,7 +1733,7 @@ return SCPE_OK;

t_stat sysd_set_halt (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
ka_hltenab = val;
ka_hltenab = (val != 0);
if (ka_hltenab)
ka_bdr |= BDR_BRKENB;
else
Expand Down
2 changes: 1 addition & 1 deletion VAX/vax_va.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ t_stat va_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
if (vid_active)
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
va_input_captured = val;
va_input_captured = (val != 0);
return SCPE_OK;
}

Expand Down
2 changes: 1 addition & 1 deletion VAX/vax_vc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ t_stat vc_set_capture (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
if (vid_active)
return sim_messagef (SCPE_ALATT, "Capture Mode Can't be changed with device enabled\n");
vc_input_captured = val;
vc_input_captured = (val != 0);
return SCPE_OK;
}

Expand Down
Loading
Loading