svn commit: r430469 - in head/emulators/simh: . files
Matthew Seaman
matthew at FreeBSD.org
Tue Jan 3 14:00:51 UTC 2017
Author: matthew
Date: Tue Jan 3 14:00:47 2017
New Revision: 430469
URL: https://svnweb.freebsd.org/changeset/ports/430469
Log:
Fixes to allow building on 12-CURRENT
- fix build failures in i386 and amd64 due to compiler changes
- fix numerous compilation warnings and logical errors that may trap
in the future
- convert all distribution files from DOS format to ease future changes
- convert legacy patch file to new naming convention
PR: 214990
Submitted by: bob at eager.cx (maintainer)
Added:
head/emulators/simh/files/patch-ALTAIR_altair__cpu.c (contents, props changed)
head/emulators/simh/files/patch-GRI_gri__cpu.c (contents, props changed)
head/emulators/simh/files/patch-H316_h316__cpu.c (contents, props changed)
head/emulators/simh/files/patch-H316_h316__dp.c (contents, props changed)
head/emulators/simh/files/patch-H316_h316__mt.c (contents, props changed)
head/emulators/simh/files/patch-H316_h316__stddev.c (contents, props changed)
head/emulators/simh/files/patch-H316_h316__sys.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__baci.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu0.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu1.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu2.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu3.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu4.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu5.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu6.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__cpu7.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__di.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__di__da.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__dp.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__dq.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__fp1.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__ipl.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__lps.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__mpx.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__ms.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__mt.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__mux.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__stddev.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp2100__sys.c (contents, props changed)
head/emulators/simh/files/patch-HP2100_hp__disclib.c (contents, props changed)
head/emulators/simh/files/patch-I1401_i1401__cd.c (contents, props changed)
head/emulators/simh/files/patch-I1401_i1401__cpu.c (contents, props changed)
head/emulators/simh/files/patch-I1401_i1401__dp.c (contents, props changed)
head/emulators/simh/files/patch-I1401_i1401__mt.c (contents, props changed)
head/emulators/simh/files/patch-I1620_i1620__cpu.c (contents, props changed)
head/emulators/simh/files/patch-I1620_i1620__dp.c (contents, props changed)
head/emulators/simh/files/patch-I1620_i1620__sys.c (contents, props changed)
head/emulators/simh/files/patch-I1620_i1620__tty.c (contents, props changed)
head/emulators/simh/files/patch-I7094_i7094__com.c (contents, props changed)
head/emulators/simh/files/patch-I7094_i7094__cpu.c (contents, props changed)
head/emulators/simh/files/patch-I7094_i7094__dsk.c (contents, props changed)
head/emulators/simh/files/patch-I7094_i7094__io.c (contents, props changed)
head/emulators/simh/files/patch-I7094_i7094__mt.c (contents, props changed)
head/emulators/simh/files/patch-Ibm1130_ibm1130__cpu.c (contents, props changed)
head/emulators/simh/files/patch-Interdata_id16__cpu.c (contents, props changed)
head/emulators/simh/files/patch-Interdata_id32__cpu.c (contents, props changed)
head/emulators/simh/files/patch-Interdata_id__dp.c (contents, props changed)
head/emulators/simh/files/patch-Interdata_id__idc.c (contents, props changed)
head/emulators/simh/files/patch-Interdata_id__io.c (contents, props changed)
head/emulators/simh/files/patch-Interdata_id__mt.c (contents, props changed)
head/emulators/simh/files/patch-Interdata_id__pas.c (contents, props changed)
head/emulators/simh/files/patch-LGP_lgp__cpu.c (contents, props changed)
head/emulators/simh/files/patch-LGP_lgp__stddev.c (contents, props changed)
head/emulators/simh/files/patch-LGP_lgp__sys.c (contents, props changed)
head/emulators/simh/files/patch-NOVA_eclipse__cpu.c (contents, props changed)
head/emulators/simh/files/patch-NOVA_nova__cpu.c (contents, props changed)
head/emulators/simh/files/patch-NOVA_nova__dkp.c (contents, props changed)
head/emulators/simh/files/patch-NOVA_nova__mta.c (contents, props changed)
head/emulators/simh/files/patch-NOVA_nova__qty.c (contents, props changed)
head/emulators/simh/files/patch-NOVA_nova__tt1.c (contents, props changed)
head/emulators/simh/files/patch-PDP10_pdp10__cpu.c (contents, props changed)
head/emulators/simh/files/patch-PDP10_pdp10__ksio.c (contents, props changed)
head/emulators/simh/files/patch-PDP10_pdp10__lp20.c (contents, props changed)
head/emulators/simh/files/patch-PDP10_pdp10__mdfp.c (contents, props changed)
head/emulators/simh/files/patch-PDP10_pdp10__rp.c (contents, props changed)
head/emulators/simh/files/patch-PDP10_pdp10__tu.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__cis.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__cpu.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__cpumod.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__dl.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__fp.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__hk.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__io.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__ke.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__rk.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__rq.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__sys.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__ta.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__tm.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__tq.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__ts.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__tu.c (contents, props changed)
head/emulators/simh/files/patch-PDP11_pdp11__xq.c (contents, props changed)
head/emulators/simh/files/patch-PDP18B_pdp18b__cpu.c (contents, props changed)
head/emulators/simh/files/patch-PDP18B_pdp18b__fpp.c (contents, props changed)
head/emulators/simh/files/patch-PDP18B_pdp18b__mt.c (contents, props changed)
head/emulators/simh/files/patch-PDP18B_pdp18b__stddev.c (contents, props changed)
head/emulators/simh/files/patch-PDP18B_pdp18b__sys.c (contents, props changed)
head/emulators/simh/files/patch-PDP18B_pdp18b__tt1.c (contents, props changed)
head/emulators/simh/files/patch-PDP1_pdp1__cpu.c (contents, props changed)
head/emulators/simh/files/patch-PDP1_pdp1__dcs.c (contents, props changed)
head/emulators/simh/files/patch-PDP8_pdp8__cpu.c (contents, props changed)
head/emulators/simh/files/patch-PDP8_pdp8__ct.c (contents, props changed)
head/emulators/simh/files/patch-PDP8_pdp8__mt.c (contents, props changed)
head/emulators/simh/files/patch-PDP8_pdp8__ttx.c (contents, props changed)
head/emulators/simh/files/patch-S3_s3__cd.c (contents, props changed)
head/emulators/simh/files/patch-S3_s3__cpu.c (contents, props changed)
head/emulators/simh/files/patch-S3_s3__disk.c (contents, props changed)
head/emulators/simh/files/patch-SDS_sds__cpu.c (contents, props changed)
head/emulators/simh/files/patch-SDS_sds__dsk.c (contents, props changed)
head/emulators/simh/files/patch-SDS_sds__io.c (contents, props changed)
head/emulators/simh/files/patch-SDS_sds__lp.c (contents, props changed)
head/emulators/simh/files/patch-SDS_sds__mt.c (contents, props changed)
head/emulators/simh/files/patch-SDS_sds__mux.c (contents, props changed)
head/emulators/simh/files/patch-SDS_sds__stddev.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax780__sbi.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax__cis.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax__cmode.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax__cpu.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax__io.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax__octa.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax__sys.c (contents, props changed)
head/emulators/simh/files/patch-VAX_vax__sysdev.c (contents, props changed)
head/emulators/simh/files/patch-scp.c (contents, props changed)
head/emulators/simh/files/patch-sim__console.c (contents, props changed)
head/emulators/simh/files/patch-sim__ether.c (contents, props changed)
head/emulators/simh/files/patch-sim__tape.c (contents, props changed)
head/emulators/simh/files/patch-swtp6800_common_bootrom.c (contents, props changed)
head/emulators/simh/files/patch-swtp6800_common_m6800.c (contents, props changed)
Deleted:
head/emulators/simh/files/patch-VAX-vax_sysdev.c
Modified:
head/emulators/simh/Makefile
head/emulators/simh/files/patch-makefile
Modified: head/emulators/simh/Makefile
==============================================================================
--- head/emulators/simh/Makefile Tue Jan 3 13:52:06 2017 (r430468)
+++ head/emulators/simh/Makefile Tue Jan 3 14:00:47 2017 (r430469)
@@ -3,6 +3,7 @@
PORTNAME= simh
PORTVERSION= 3.9.0
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://simh.trailing-edge.com/sources/
DISTNAME= ${PORTNAME}v${PORTVERSION:R:S/.//}-${PORTVERSION:E}
@@ -10,10 +11,12 @@ DISTNAME= ${PORTNAME}v${PORTVERSION:R:S/
MAINTAINER= bob at eager.cx
COMMENT= Emulates classic DEC, HP, GRI, IBM, Altair, SDS, Honeywell, and others
+LICENSE= BSD3CLAUSE
+
NO_WRKSUBDIR= yes
USES= gmake dos2unix zip
-DOS2UNIX_FILES= makefile VAX/vax_sysdev.c
+CFLAGS+= -Wno-format-extra-args -Wno-comment -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses
MAKE_ENV= GCC="${CC}" CFLAGS_O="${CFLAGS}" USE_NETWORK=1
MAKEFILE= makefile
Added: head/emulators/simh/files/patch-ALTAIR_altair__cpu.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-ALTAIR_altair__cpu.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,20 @@
+--- ALTAIR/altair_cpu.c.orig 2016-12-01 22:43:42 UTC
++++ ALTAIR/altair_cpu.c
+@@ -313,7 +313,7 @@ int32 sim_instr (void)
+
+ while (reason == 0) { /* loop until halted */
+ if (sim_interval <= 0) { /* check clock queue */
+- if (reason = sim_process_event ()) break;
++ if ((reason = sim_process_event ())) break;
+ }
+
+ if (int_req > 0) { /* interrupt? */
+@@ -366,7 +366,7 @@ int32 sim_instr (void)
+ if ((OP & 0xCF) == 0x01) { /* LXI */
+ DAR = M[PC] & 0x00ff;
+ PC++;
+- DAR = DAR | (M[PC] <<8) & 0xFF00;;
++ DAR = DAR | ((M[PC] <<8) & 0xFF00);
+ putpair((OP >> 4) & 0x03, DAR);
+ PC++;
+ continue;
Added: head/emulators/simh/files/patch-GRI_gri__cpu.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-GRI_gri__cpu.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,11 @@
+--- GRI/gri_cpu.c.orig 2016-12-01 22:43:42 UTC
++++ GRI/gri_cpu.c
+@@ -421,7 +421,7 @@ ao_update ();
+ while (reason == 0) { /* loop until halted */
+
+ if (sim_interval <= 0) { /* check clock queue */
+- if (reason = sim_process_event ())
++ if ((reason = sim_process_event ()))
+ break;
+ }
+
Added: head/emulators/simh/files/patch-H316_h316__cpu.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-H316_h316__cpu.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,203 @@
+--- H316/h316_cpu.c.orig 2016-12-01 22:43:42 UTC
++++ H316/h316_cpu.c
+@@ -424,7 +424,7 @@ reason = 0;
+ while (reason == 0) { /* loop until halted */
+
+ if (sim_interval <= 0) { /* check clock queue */
+- if (reason = sim_process_event ())
++ if ((reason = sim_process_event ()))
+ break;
+ }
+
+@@ -458,7 +458,7 @@ if (chan_req) {
+ t = iotab[dev] (ioOTA, 0, Read (ad), dev); /* output word */
+ if ((t & IOT_SKIP) == 0)
+ return STOP_DMAER;
+- if (r = (t >> IOT_V_REASON))
++ if ((r = (t >> IOT_V_REASON)))
+ return r;
+ }
+ if (Q_DMA (i)) { /* DMA? */
+@@ -528,7 +528,7 @@ if (hst_lnt) {
+ switch (I_GETOP (MB)) { /* case on <1:6> */
+
+ case 001: case 021: case 041: case 061: /* JMP */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ PCQ_ENTRY; /* save PC */
+ PC = NEWA (PC, Y); /* set new PC */
+@@ -537,7 +537,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 002: case 022: case 042: case 062: /* LDA */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ if (dp) { /* double prec? */
+ AR = Read (Y & ~1); /* get doubleword */
+@@ -548,13 +548,13 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 003: case 023: case 043: case 063: /* ANA */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ AR = AR & Read (Y);
+ break;
+
+ case 004: case 024: case 044: case 064: /* STA */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ Write (Y, AR); /* store A */
+ if (dp) { /* double prec? */
+@@ -564,13 +564,13 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 005: case 025: case 045: case 065: /* ERA */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ AR = AR ^ Read (Y);
+ break;
+
+ case 006: case 026: case 046: case 066: /* ADD */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ if (dp) { /* double prec? */
+ t1 = GETDBL_S (AR, BR); /* get A'B */
+@@ -583,7 +583,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 007: case 027: case 047: case 067: /* SUB */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ if (dp) { /* double prec? */
+ t1 = GETDBL_S (AR, BR); /* get A'B */
+@@ -596,7 +596,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 010: case 030: case 050: case 070: /* JST */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ MB = NEWA (Read (Y), PC); /* merge old PC */
+ Write (Y, MB);
+@@ -605,7 +605,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 011: case 031: case 051: case 071: /* CAS */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ MB = Read (Y);
+ if (AR == MB)
+@@ -615,7 +615,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 012: case 032: case 052: case 072: /* IRS */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ MB = (Read (Y) + 1) & DMASK; /* incr, rewrite */
+ Write (Y, MB);
+@@ -624,7 +624,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 013: case 033: case 053: case 073: /* IMA */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ MB = Read (Y);
+ Write (Y, AR); /* A to mem */
+@@ -632,13 +632,13 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 015: case 055: /* STX */
+- if (reason = Ea (MB & ~IDX, &Y)) /* eff addr */
++ if ((reason = Ea (MB & ~IDX, &Y))) /* eff addr */
+ break;
+ Write (Y, XR); /* store XR */
+ break;
+
+ case 035: case 075: /* LDX */
+- if (reason = Ea (MB & ~IDX, &Y)) /* eff addr */
++ if ((reason = Ea (MB & ~IDX, &Y))) /* eff addr */
+ break;
+ XR = Read (Y); /* load XR */
+ M[M_XR] = XR; /* update mem too */
+@@ -646,7 +646,7 @@ switch (I_GETOP (MB)) {
+
+ case 016: case 036: case 056: case 076: /* MPY */
+ if (cpu_unit.flags & UNIT_HSA) { /* installed? */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ t1 = SEXT (AR) * SEXT (Read (Y));
+ PUTDBL_Z (t1);
+@@ -657,7 +657,7 @@ switch (I_GETOP (MB)) {
+
+ case 017: case 037: case 057: case 077: /* DIV */
+ if (cpu_unit.flags & UNIT_HSA) { /* installed? */
+- if (reason = Ea (MB, &Y)) /* eff addr */
++ if ((reason = Ea (MB, &Y))) /* eff addr */
+ break;
+ t2 = SEXT (Read (Y)); /* divr */
+ if (t2) { /* divr != 0? */
+@@ -826,7 +826,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 003: /* "long right arot" */
+- if (reason = stop_inst) /* stop on undef? */
++ if ((reason = stop_inst)) /* stop on undef? */
+ break;
+ for (t2 = 0; t2 < t1; t2++) { /* bit by bit */
+ C = BR & 1; /* C = last out */
+@@ -859,7 +859,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 007: /* "short right arot" */
+- if (reason = stop_inst) /* stop on undef? */
++ if ((reason = stop_inst)) /* stop on undef? */
+ break;
+ for (t2 = 0; t2 < t1; t2++) { /* bit by bit */
+ C = AR & 1; /* C = last out */
+@@ -899,7 +899,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 013: /* "long left arot" */
+- if (reason = stop_inst) /* stop on undef? */
++ if ((reason = stop_inst)) /* stop on undef? */
+ break;
+ for (t2 = 0; t2 < t1; t2++) { /* bit by bit */
+ AR = (AR << 1) | ((BR >> 14) & 1);
+@@ -935,7 +935,7 @@ switch (I_GETOP (MB)) {
+ break;
+
+ case 017: /* "short left arot" */
+- if (reason = stop_inst) /* stop on undef? */
++ if ((reason = stop_inst)) /* stop on undef? */
+ break;
+ for (t2 = 0; t2 < t1; t2++) { /* bit by bit */
+ if ((AR & SIGN) != ((AR << 1) & SIGN)) C = 1;
+@@ -1003,7 +1003,7 @@ switch (I_GETOP (MB)) {
+ AR = (AR << 8) & DMASK;
+ else if (MB == 0141340) /* ICA */
+ AR = ((AR << 8) | (AR >> 8)) & DMASK;
+- else if (reason = stop_inst)
++ else if ((reason = stop_inst))
+ break;
+ else AR = Operate (MB, AR); /* undefined */
+ break;
+@@ -1500,7 +1500,7 @@ for (i = 0; i < DEV_MAX; i++)
+ iotab[i] = NULL;
+ for (i = 0; i < (DMA_MAX + DMC_MAX); i++)
+ chan_map[i] = 0;
+-for (i = 0; dptr = sim_devices[i]; i++) { /* loop thru devices */
++for (i = 0; (dptr = sim_devices[i]); i++) { /* loop thru devices */
+ dibp = (DIB *) dptr->ctxt; /* get DIB */
+ if ((dibp == NULL) || (dptr->flags & DEV_DIS)) /* exist, enabled? */
+ continue;
Added: head/emulators/simh/files/patch-H316_h316__dp.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-H316_h316__dp.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,56 @@
+--- H316/h316_dp.c.orig 2016-12-01 22:43:42 UTC
++++ H316/h316_dp.c
+@@ -617,7 +617,7 @@ switch (uptr->FNC) {
+ case FNC_RCA: /* read current addr */
+ if (h >= dp_tab[dp_ctype].surf) /* invalid head? */
+ return dp_done (1, STA_ADRER); /* error */
+- if (r = dp_rdtrk (uptr, dpxb, uptr->CYL, h)) /* get track; error? */
++ if ((r = dp_rdtrk (uptr, dpxb, uptr->CYL, h))) /* get track; error? */
+ return r;
+ dp_rptr = 0; /* init rec ptr */
+ if (dpxb[dp_rptr + REC_LNT] == 0) /* unformated? */
+@@ -722,7 +722,7 @@ switch (uptr->FNC) {
+ case FNC_RW: /* read/write */
+ if (h >= dp_tab[dp_ctype].surf) /* invalid head? */
+ return dp_done (1, STA_ADRER); /* error */
+- if (r = dp_rdtrk (uptr, dpxb, uptr->CYL, h)) /* get track; error? */
++ if ((r = dp_rdtrk (uptr, dpxb, uptr->CYL, h))) /* get track; error? */
+ return r;
+ if (!dp_findrec (dp_cw2)) /* find rec; error? */
+ return dp_done (1, STA_ADRER); /* address error */
+@@ -750,7 +750,7 @@ switch (uptr->FNC) {
+ if (dp_cw1 & CW1_RW) { /* write? */
+ if (dp_sta & STA_RDY) /* timing failure? */
+ return dp_wrdone (uptr, STA_DTRER); /* yes, error */
+- if (r = dp_wrwd (uptr, dp_buf)) /* wr word, error? */
++ if ((r = dp_wrwd (uptr, dp_buf))) /* wr word, error? */
+ return r;
+ if (dp_eor) { /* transfer done? */
+ dpxb[dp_rptr + REC_DATA + dp_wptr] = dp_csum;
+@@ -855,7 +855,7 @@ if (dp_wptr < (lnt + REC_MAXEXT)) {
+ }
+ dpxb[dp_rptr + REC_DATA + dp_wptr] = dp_csum; /* write csum */
+ dpxb[dp_rptr + lnt + REC_OVHD] = 0; /* zap rest of track */
+-if (r = dp_wrdone (uptr, STA_UNSER)) /* dump track */
++if ((r = dp_wrdone (uptr, STA_UNSER))) /* dump track */
+ return r;
+ return STOP_DPOVR;
+ }
+@@ -1017,7 +1017,7 @@ for (c = cntr = 0; c < dp_tab[dp_ctype].
+ else tbuf[rptr + REC_ADDR] = (c << 8) + (h << 3) + i;
+ rptr = rptr + nw + REC_OVHD;
+ }
+- if (r = dp_wrtrk (uptr, tbuf, c, h))
++ if ((r = dp_wrtrk (uptr, tbuf, c, h)))
+ return r;
+ }
+ }
+@@ -1043,7 +1043,7 @@ if ((uptr->flags & UNIT_ATT) == 0)
+ return SCPE_UNATT;
+ for (c = 0; c < dp_tab[dp_ctype].cyl; c++) {
+ for (h = 0; h < dp_tab[dp_ctype].surf; h++) {
+- if (r = dp_rdtrk (uptr, tbuf, c, h))
++ if ((r = dp_rdtrk (uptr, tbuf, c, h)))
+ return r;
+ rptr = 0;
+ rlnt = tbuf[rptr + REC_LNT];
Added: head/emulators/simh/files/patch-H316_h316__mt.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-H316_h316__mt.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,32 @@
+--- H316/h316_mt.c.orig 2016-12-01 22:43:42 UTC
++++ H316/h316_mt.c
+@@ -371,17 +371,17 @@ switch (uptr->FNC) {
+ return SCPE_OK;
+
+ case FNC_WEOF: /* write file mark */
+- if (st = sim_tape_wrtmk (uptr)) /* write tmk, err? */
++ if ((st = sim_tape_wrtmk (uptr))) /* write tmk, err? */
+ r = mt_map_err (uptr, st); /* map error */
+ break; /* sched end motion */
+
+ case FNC_FSR: /* space fwd rec */
+- if (st = sim_tape_sprecf (uptr, &tbc)) /* space fwd, err? */
++ if ((st = sim_tape_sprecf (uptr, &tbc))) /* space fwd, err? */
+ r = mt_map_err (uptr, st); /* map error */
+ break; /* sched end motion */
+
+ case FNC_BSR: /* space rev rec */
+- if (st = sim_tape_sprecr (uptr, &tbc)) /* space rev, err? */
++ if ((st = sim_tape_sprecr (uptr, &tbc))) /* space rev, err? */
+ r = mt_map_err (uptr, st); /* map error */
+ break; /* sched end motion */
+
+@@ -455,7 +455,7 @@ switch (uptr->FNC) {
+ mt_wrwd (uptr, mt_buf);
+ else mt_rdy = 0; /* rdy must be clr */
+ if (mt_ptr) { /* any data? */
+- if (st = sim_tape_wrrecf (uptr, mtxb, mt_ptr)) /* write, err? */
++ if ((st = sim_tape_wrrecf (uptr, mtxb, mt_ptr))) /* write, err? */
+ r = mt_map_err (uptr, st); /* map error */
+ }
+ break; /* sched end motion */
Added: head/emulators/simh/files/patch-H316_h316__stddev.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-H316_h316__stddev.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,11 @@
+--- H316/h316_stddev.c.orig 2016-12-01 22:43:42 UTC
++++ H316/h316_stddev.c
+@@ -390,7 +390,7 @@ t_stat r;
+
+ if (!(uptr->flags & UNIT_ATTABLE))
+ return SCPE_NOFNC;
+-if (r = attach_unit (uptr, cptr))
++if ((r = attach_unit (uptr, cptr)))
+ return r;
+ if (sim_switches & SWMASK ('A')) /* -a? ASCII */
+ uptr->flags |= UNIT_ASC;
Added: head/emulators/simh/files/patch-H316_h316__sys.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-H316_h316__sys.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,16 @@
+--- H316/h316_sys.c.orig 2016-12-01 22:43:42 UTC
++++ H316/h316_sys.c
+@@ -364,11 +364,11 @@ switch (j) {
+
+ case I_V_MRF: case I_V_MRX: /* mem ref */
+ cptr = get_glyph (cptr, gbuf, ','); /* get next field */
+- if (k = (strcmp (gbuf, "C") == 0)) { /* C specified? */
++ if ((k = (strcmp (gbuf, "C") == 0))) { /* C specified? */
+ val[0] = val[0] | SC;
+ cptr = get_glyph (cptr, gbuf, 0);
+ }
+- else if (k = (strcmp (gbuf, "Z") == 0)) { /* Z specified? */
++ else if ((k = (strcmp (gbuf, "Z") == 0))) { /* Z specified? */
+ cptr = get_glyph (cptr, gbuf, ',');
+ }
+ d = get_uint (gbuf, 8, X_AMASK, &r); /* construe as addr */
Added: head/emulators/simh/files/patch-HP2100_hp2100__baci.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__baci.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,50 @@
+--- HP2100/hp2100_baci.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_baci.c
+@@ -670,7 +670,7 @@ while (working_set) {
+ if ((baci_icw ^ baci_obuf) & OUT_BAUDRATE) { /* baud rate change? */
+ baci_term.wait = service_time (baci_obuf); /* set service time to match rate */
+
+- if (baci_term.flags & UNIT_DIAG) /* diagnostic mode? */
++ if (baci_term.flags & UNIT_DIAG) { /* diagnostic mode? */
+ if (baci_obuf & OUT_BAUDRATE) { /* internal baud rate requested? */
+ sim_activate (&baci_term, /* activate I/O service */
+ baci_term.wait);
+@@ -687,6 +687,7 @@ while (working_set) {
+ fprintf (sim_deb, ">>BACI cmds: [OTx%s] Terminal service stopped\n",
+ hold_or_clear);
+ }
++ }
+ }
+
+ baci_icw = baci_obuf; /* load new reference word */
+@@ -1381,13 +1382,14 @@ else {
+
+ baci_fcount = baci_fcount + 1; /* increment occupancy counter */
+
+-if (DEBUG_PRI (baci_dev, DEB_BUF))
++if (DEBUG_PRI (baci_dev, DEB_BUF)) {
+ if (pass_thru)
+ fprintf (sim_deb, ">>BACI buf: Character %s put to UART transmitter holding register, "
+ "character counter = 1\n", fmt_char (ch));
+ else
+ fprintf (sim_deb, ">>BACI buf: Character %s put to FIFO [%d], "
+ "character counter = %d\n", fmt_char (ch), index, baci_fcount);
++}
+
+ if ((IO_MODE == RECV) && (baci_spchar [ch])) /* receive mode and special character? */
+ baci_status = baci_status | IN_SPCHAR; /* set special char seen flag */
+@@ -1447,12 +1449,13 @@ uint32 uart_bits, data_bits, data_mask,
+ if (baci_uart_clk > 0) { /* transfer in progress? */
+ bit_low = (baci_icw & OUT_CD); /* get current receive bit */
+
+- if ((baci_uart_clk & 017) == 0) /* end of a bit? */
++ if ((baci_uart_clk & 017) == 0) { /* end of a bit? */
+ if (IO_MODE == XMIT) /* transmit? */
+ baci_uart_tr = baci_uart_tr >> 1; /* shift new bit onto line */
+ else /* receive? */
+ baci_uart_rr = (baci_uart_rr >> 1) & /* shift new bit in */
+ (bit_low ? ~SIGN : -1); /* (inverted sense) */
++ }
+
+ if (bit_low) { /* another low bit? */
+ baci_bcount = baci_bcount + 1; /* update break counter */
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,89 @@
+--- HP2100/hp2100_cpu.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu.c
+@@ -1054,7 +1054,7 @@ for (i = OPTDEV; i <= MAXDEV; i++)
+
+ dtab [PWR] = &pwrf_dib; /* for now, powerfail is always present */
+
+-for (i = 0; dptr = sim_devices [i]; i++) { /* loop thru dev */
++for (i = 0; (dptr = sim_devices [i]); i++) { /* loop thru dev */
+ dibptr = (DIB *) dptr->ctxt; /* get DIB */
+
+ if (dibptr && !(dptr->flags & DEV_DIS)) { /* handler exists and device is enabled? */
+@@ -2153,13 +2153,13 @@ if (req_grant [0])
+ else /* not this one */
+ req_grant [0] = req_grant [0] >> 1; /* position next request */
+
+-else if (req_grant [1]) /* device in upper half */
++else if (req_grant [1]) { /* device in upper half */
+ for (sc = 32; sc <= 63; sc++) /* determine interrupting select code */
+ if (req_grant [1] & 1) /* grant this request? */
+ return sc; /* return this select code */
+ else /* not this one */
+ req_grant [1] = req_grant [1] >> 1; /* position next request */
+-
++ }
+ return 0; /* no interrupt granted */
+ }
+
+@@ -3611,7 +3611,7 @@ uint32 i, j, k;
+ t_bool is_conflict = FALSE;
+ uint32 conflicts[MAXDEV + 1] = { 0 };
+
+-for (i = 0; dptr = sim_devices[i]; i++) {
++for (i = 0; (dptr = sim_devices[i]); i++) {
+ dibptr = (DIB *) dptr->ctxt;
+ if (dibptr && !(dptr->flags & DEV_DIS))
+ if (++conflicts[dibptr->select_code] > 1)
+@@ -3629,7 +3629,7 @@ if (is_conflict) {
+ if (sim_log)
+ fprintf (sim_log, "Select code %o conflict:", i);
+
+- for (j = 0; dptr = sim_devices[j]; j++) {
++ for (j = 0; (dptr = sim_devices[j]); j++) {
+ dibptr = (DIB *) dptr->ctxt;
+ if (dibptr && !(dptr->flags & DEV_DIS) && (i == dibptr->select_code)) {
+ if (k < conflicts[i]) {
+@@ -3791,12 +3791,12 @@ else
+
+ result = cpu_set_size (uptr, new_memsize, NULL, NULL); /* set memory size */
+
+-if (result == SCPE_OK) /* memory change OK? */
++if (result == SCPE_OK) { /* memory change OK? */
+ if (new_family == UNIT_FAMILY_21XX) /* 21xx CPU? */
+ fwanxm = MEMSIZE - IBL_LNT; /* reserve memory for loader */
+ else
+ fwanxm = MEMSIZE; /* loader reserved only for 21xx */
+-
++ }
+ return result;
+ }
+
+@@ -3810,11 +3810,12 @@ t_stat cpu_show_model (FILE *st, UNIT *u
+ {
+ fputs ((char *) desc, st); /* write model name */
+
+-if (UNIT_CPU_FAMILY == UNIT_FAMILY_21XX) /* valid only for 21xx */
++if (UNIT_CPU_FAMILY == UNIT_FAMILY_21XX) { /* valid only for 21xx */
+ if (fwanxm < MEMSIZE) /* loader area non-existent? */
+ fputs (", loader disabled", st); /* yes, so access disabled */
+ else
+ fputs (", loader enabled", st); /* no, so access enabled */
++ }
+ return SCPE_OK;
+ }
+
+@@ -3846,12 +3847,12 @@ if (UNIT_CPU_TYPE == UNIT_TYPE_2100) {
+ uptr->flags = uptr->flags | UNIT_FP;
+ }
+
+-else if (UNIT_CPU_MODEL == UNIT_1000_F)
++else if (UNIT_CPU_MODEL == UNIT_1000_F) {
+ if (option == UNIT_VIS) /* 1000-F IOP and VIS options */
+ uptr->flags = uptr->flags & ~UNIT_IOP; /* are mutually exclusive */
+ else if (option == UNIT_IOP)
+ uptr->flags = uptr->flags & ~UNIT_VIS;
+-
++ }
+ return SCPE_OK;
+ }
+
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu0.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu0.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,20 @@
+--- HP2100/hp2100_cpu0.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu0.c
+@@ -130,7 +130,7 @@ uint32 entry;
+ entry = IR & 017; /* mask to entry point */
+
+ if (op_ds[entry] != OP_N)
+- if (reason = cpu_ops (op_ds[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_ds[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<3:0> */
+@@ -244,7 +244,7 @@ uint32 entry;
+ entry = IR & 017; /* mask to entry point */
+
+ if (op_user_20 [entry] != OP_N)
+- if (reason = cpu_ops (op_user_20 [entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_user_20 [entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<4:0> */
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu1.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu1.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,63 @@
+--- HP2100/hp2100_cpu1.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu1.c
+@@ -193,11 +193,12 @@ OPS op;
+ uint32 rs, qs, sc, v1, v2, t;
+ int32 sop1, sop2;
+
+-if ((cpu_unit.flags & UNIT_EAU) == 0) /* option installed? */
++if ((cpu_unit.flags & UNIT_EAU) == 0) { /* option installed? */
+ if ((UNIT_CPU_MODEL == UNIT_2114) && (IR == 0101100)) /* 2114 and RRR 16? */
+ return SCPE_OK; /* allowed as NOP */
+ else
+ return stop_inst; /* fail */
++}
+
+ switch ((IR >> 8) & 0377) { /* decode IR<15:8> */
+
+@@ -245,7 +246,7 @@ switch ((IR >> 8) & 0377) {
+
+ case 010: /* MPY 100200 (OP_K) */
+ MPY:
+- if (reason = cpu_ops (OP_K, op, intrq)) /* get operand */
++ if ((reason = cpu_ops (OP_K, op, intrq))) /* get operand */
+ break;
+ sop1 = SEXT (AR); /* sext AR */
+ sop2 = SEXT (op[0].word); /* sext mem */
+@@ -262,9 +263,9 @@ switch ((IR >> 8) & 0377) {
+ break;
+
+ case 0201: /* DIV 100400 (OP_K) */
+- if (reason = cpu_ops (OP_K, op, intrq)) /* get operand */
++ if ((reason = cpu_ops (OP_K, op, intrq))) /* get operand */
+ break;
+- if (rs = qs = BR & SIGN) { /* save divd sign, neg? */
++ if ((rs = qs = BR & SIGN)) { /* save divd sign, neg? */
+ AR = (~AR + 1) & DMASK; /* make B'A pos */
+ BR = (~BR + (AR == 0)) & DMASK; /* make divd pos */
+ }
+@@ -317,14 +318,14 @@ switch ((IR >> 8) & 0377) {
+ break;
+
+ case 0210: /* DLD 104200 (OP_D) */
+- if (reason = cpu_ops (OP_D, op, intrq)) /* get operand */
++ if ((reason = cpu_ops (OP_D, op, intrq))) /* get operand */
+ break;
+ AR = (op[0].dword >> 16) & DMASK; /* load AR */
+ BR = op[0].dword & DMASK; /* load BR */
+ break;
+
+ case 0211: /* DST 104400 (OP_A) */
+- if (reason = cpu_ops (OP_A, op, intrq)) /* get operand */
++ if ((reason = cpu_ops (OP_A, op, intrq))) /* get operand */
+ break;
+ WriteW (op[0].word, AR); /* store AR */
+ WriteW ((op[0].word + 1) & VAMASK, BR); /* store BR */
+@@ -734,7 +735,7 @@ for (i = 0; i < OP_N_F; i++) {
+ flags = pattern & OP_M_FLAGS; /* get operand pattern */
+
+ if (flags >= OP_ADR) /* address operand? */
+- if (reason = resolve (ReadW (PC), &MA, irq)) /* resolve indirects */
++ if ((reason = resolve (ReadW (PC), &MA, irq))) /* resolve indirects */
+ return reason;
+
+ switch (flags) {
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu2.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu2.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,29 @@
+--- HP2100/hp2100_cpu2.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu2.c
+@@ -244,7 +244,7 @@ absel = (IR & I_AB)? 1: 0;
+ entry = IR & 037; /* mask to entry point */
+
+ if (op_dms[entry] != OP_N)
+- if (reason = cpu_ops (op_dms[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_dms[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<3:0> */
+@@ -610,7 +610,7 @@ absel = (IR & I_AB)? 1: 0;
+ entry = IR & 037; /* mask to entry point */
+
+ if (op_eig[entry] != OP_N)
+- if (reason = cpu_ops (op_eig[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_eig[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<4:0> */
+@@ -989,7 +989,7 @@ else if (entry <= 057)
+ entry = entry - 060; /* offset 10x460-477 */
+
+ if (op_iop[entry] != OP_N)
+- if (reason = cpu_ops (op_iop[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_iop[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<5:0> */
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu3.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu3.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,56 @@
+--- HP2100/hp2100_cpu3.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu3.c
+@@ -186,7 +186,7 @@ entry = IR & 037;
+
+ if (UNIT_CPU_MODEL != UNIT_1000_F) { /* 2100/M/E-Series? */
+ if (op_ffp_e[entry] != OP_N)
+- if (reason = cpu_ops (op_ffp_e[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_ffp_e[entry], op, intrq))) /* get instruction operands */
+ return reason;
+ }
+
+@@ -194,7 +194,7 @@ if (UNIT_CPU_MODEL != UNIT_1000_F) {
+
+ else { /* F-Series */
+ if (op_ffp_f[entry] != OP_N)
+- if (reason = cpu_ops (op_ffp_f[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_ffp_f[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<4:0> */
+@@ -417,7 +417,7 @@ switch (entry) {
+ sa = op[0].word - 1;
+
+ da = ReadW (sa); /* get jump target */
+- if (reason = resolve (da, &MA, intrq)) { /* resolve indirects */
++ if ((reason = resolve (da, &MA, intrq))) { /* resolve indirects */
+ PC = err_PC; /* irq restarts instruction */
+ break;
+ }
+@@ -435,7 +435,7 @@ switch (entry) {
+ op[1].word = op[1].word + /* compute element offset */
+ (op[2].word - 1) * op[3].word;
+ else { /* 3-dim access */
+- if (reason = cpu_ops (OP_KK, op2, intrq)) { /* get 1st, 2nd ranges */
++ if ((reason = cpu_ops (OP_KK, op2, intrq))) { /* get 1st, 2nd ranges */
+ PC = err_PC; /* irq restarts instruction */
+ break;
+ }
+@@ -461,7 +461,7 @@ switch (entry) {
+
+ for (j = 0; j < sc; j++) {
+ MA = ReadW (sa++); /* get addr of actual */
+- if (reason = resolve (MA, &MA, intrq)) { /* resolve indirect */
++ if ((reason = resolve (MA, &MA, intrq))) { /* resolve indirect */
+ PC = err_PC; /* irq restarts instruction */
+ break;
+ }
+@@ -644,7 +644,7 @@ t_stat reason = SCPE_OK;
+ entry = IR & 017; /* mask to entry point */
+
+ if (op_dbi[entry] != OP_N)
+- if (reason = cpu_ops (op_dbi[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_dbi[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<3:0> */
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu4.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu4.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,20 @@
+--- HP2100/hp2100_cpu4.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu4.c
+@@ -261,7 +261,7 @@ else
+ entry = opcode & 0177; /* map to <6:0> */
+
+ if (op_fpp[entry] != OP_N)
+- if (reason = cpu_ops (op_fpp[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_fpp[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<6:0> */
+@@ -600,7 +600,7 @@ static const OP t_one = { { 0040000, 00
+ entry = IR & 017; /* mask to entry point */
+
+ if (op_sis[entry] != OP_N)
+- if (reason = cpu_ops (op_sis[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_sis[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ switch (entry) { /* decode IR<3:0> */
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu5.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu5.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,20 @@
+--- HP2100/hp2100_cpu5.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu5.c
+@@ -650,7 +650,7 @@ entry = IR & 017;
+ pattern = op_vma[entry]; /* get operand pattern */
+
+ if (pattern != OP_N)
+- if (reason = cpu_ops (pattern, op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (pattern, op, intrq))) /* get instruction operands */
+ return reason;
+
+ if (debug) { /* debugging? */
+@@ -1361,7 +1361,7 @@ entry = IR & 017;
+ pattern = op_ema[entry]; /* get operand pattern */
+
+ if (pattern != OP_N)
+- if (reason = cpu_ops (pattern, op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (pattern, op, intrq))) /* get instruction operands */
+ return reason;
+
+ if (debug) { /* debugging? */
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu6.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu6.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,29 @@
+--- HP2100/hp2100_cpu6.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu6.c
+@@ -394,7 +394,7 @@ entry = IR & 017;
+ pattern = op_os[entry]; /* get operand pattern */
+
+ if (pattern != OP_N)
+- if (reason = cpu_ops (pattern, op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (pattern, op, intrq))) /* get instruction operands */
+ return reason;
+
+ tbg_tick = tbg_tick || (IR == 0105357) && iotrap; /* set TBG interrupting flag */
+@@ -544,7 +544,7 @@ switch (entry) {
+ for (i = 0; i < count; i++) {
+ ma = ReadW (PC); /* get operand address */
+
+- if (reason = resolve (ma, &ma, intrq)) { /* resolve indirect */
++ if ((reason = resolve (ma, &ma, intrq))) { /* resolve indirect */
+ PC = err_PC; /* IRQ restarts instruction */
+ break;
+ }
+@@ -710,7 +710,7 @@ switch (entry) {
+ ma = ReadW (sa); /* get addr of actual */
+ sa = (sa + 1) & VAMASK; /* increment address */
+
+- if (reason = resolve (ma, &ma, intrq)) { /* resolve indirect */
++ if ((reason = resolve (ma, &ma, intrq))) { /* resolve indirect */
+ PC = err_PC; /* irq restarts instruction */
+ break;
+ }
Added: head/emulators/simh/files/patch-HP2100_hp2100__cpu7.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__cpu7.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,20 @@
+--- HP2100/hp2100_cpu7.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_cpu7.c
+@@ -391,7 +391,7 @@ if (pattern != OP_N)
+ rtn = rtn1 = ret.word; /* but save it just in case */
+ PC = (PC + 1) & VAMASK; /* move to next argument */
+ }
+- if (reason = cpu_ops (pattern, op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (pattern, op, intrq))) /* get instruction operands */
+ return reason;
+
+ if (debug) { /* debugging? */
+@@ -653,7 +653,7 @@ t_bool debug = DEBUG_PRI (cpu_dev, DEB_S
+ entry = IR & 017; /* mask to entry point */
+
+ if (op_signal[entry] != OP_N)
+- if (reason = cpu_ops (op_signal[entry], op, intrq)) /* get instruction operands */
++ if ((reason = cpu_ops (op_signal[entry], op, intrq))) /* get instruction operands */
+ return reason;
+
+ if (debug) { /* debugging? */
Added: head/emulators/simh/files/patch-HP2100_hp2100__di.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__di.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,76 @@
+--- HP2100/hp2100_di.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_di.c
+@@ -607,13 +607,13 @@ while (working_set) {
+ else if (di_card->cntl_register & CNTL_NRFD) /* NRFD was set but is not now? */
+ deny |= BUS_NRFD; /* deny NRFD on the bus */
+
+- if (FIFO_FULL) /* is the FIFO full? */
++ if (FIFO_FULL) { /* is the FIFO full? */
+ if (data & CNTL_LSTN) /* is card now listening? */
+ assert |= BUS_NRFD; /* listener and a full FIFO asserts NRFD */
+
+ else if (di_card->cntl_register & CNTL_LSTN) /* was card a listener but is not now? */
+ deny |= BUS_NRFD; /* deny NRFD on the bus */
+-
++ }
+
+ if (SW8_SYSCTL) { /* system controller drives REN and IFC */
+ if (data & CNTL_REN) /* REN control */
+@@ -1452,14 +1452,14 @@ if (di_card->bus_cntl & BUS_IFC
+ }
+
+
+-if (di_card->cntl_register & CNTL_LSTN) /* is the card a listener? */
++if (di_card->cntl_register & CNTL_LSTN) { /* is the card a listener? */
+ if (di_card->cntl_register & CNTL_NRFD /* if explicitly requested */
+ || di_card->status_register & STAT_LBI /* or the last byte is in */
+ || FIFO_FULL) /* or the FIFO is full */
+ assert = BUS_NRFD; /* then assert NRFD */
+ else /* otherwise the card is ready for data */
+ deny |= BUS_NRFD; /* so deny NRFD */
+-
++ }
+ if (assert != deny) /* was there any change in bus state? */
+ di_bus_control (card, CONTROLLER, assert, deny); /* update the bus control */
+
+@@ -1813,7 +1813,7 @@ if (tag & TAG_EDT
+
+ if (access == cpu_access) { /* is this a cpu access? */
+ if (!(di_card->cntl_register & CNTL_PACK)) /* in unpacked mode? */
+- data = data & ~(DATA_ATN | DATA_EOI) /* substitute the ATN/EOI tag values */
++ data = (data & ~(DATA_ATN | DATA_EOI)) /* substitute the ATN/EOI tag values */
+ | (tag & (TAG_ATN | TAG_EOI)) >> DATA_SHIFT; /* into the data word */
+
+ if (tag & TAG_LBR) /* is this the last byte? */
+@@ -1856,25 +1856,25 @@ if (DEBUG_PRJ (dptrs [card], DEB_BUF)) {
+ }
+
+
+-if (di_card->cntl_register & CNTL_TALK) /* is the card talking? */
+- if (di_card->cntl_register & CNTL_PACK) /* is it in the packed mode? */
++if (di_card->cntl_register & CNTL_TALK) { /* is the card talking? */
++ if (di_card->cntl_register & CNTL_PACK) { /* is it in the packed mode? */
+ if (di_card->status_register & STAT_LBO /* yes, is the last byte out? */
+ && di_card->cntl_register & CNTL_EOI) /* and is EOI control enabled? */
+ di_card->bus_cntl |= BUS_EOI; /* assert EOI on the bus */
+ else
+ di_card->bus_cntl &= ~BUS_EOI; /* deny EOI on the bus */
+-
++ }
+ else { /* the card is in the unpacked mode */
+ if (di_card->cntl_register & CNTL_CIC) /* is the card the controller in charge? */
+ di_card->bus_cntl = /* assert or deny the ATN bus line */
+- di_card->bus_cntl & ~BUS_ATN /* from the ATN tag value */
++ (di_card->bus_cntl & ~BUS_ATN) /* from the ATN tag value */
+ | (tag & TAG_ATN) >> BUS_SHIFT;
+
+ di_card->bus_cntl = /* assert or deny the EOI bus line */
+- di_card->bus_cntl & ~BUS_EOI /* from the EOI tag value */
++ (di_card->bus_cntl & ~BUS_EOI) /* from the EOI tag value */
+ | (tag & TAG_EOI) >> BUS_SHIFT;
+ }
+-
++ }
+ return (uint16) data; /* return the data value */
+ }
+
Added: head/emulators/simh/files/patch-HP2100_hp2100__di__da.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__di__da.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,60 @@
+--- HP2100/hp2100_di_da.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_di_da.c
+@@ -1215,7 +1215,7 @@ if (GET_BUSADR (da_unit [unitno].flags)
+ if (ibl_copy (da_rom, da_dib.select_code)) /* copy the boot ROM to memory and configure */
+ return SCPE_IERR; /* return an internal error if the copy failed */
+
+-SR = SR & (IBL_OPT | IBL_DS_HEAD) /* set S to a reasonable value */
++SR = (SR & (IBL_OPT | IBL_DS_HEAD)) /* set S to a reasonable value */
+ | IBL_DS | IBL_MAN | (da_dib.select_code << IBL_V_DEV); /* before boot execution */
+
+ return SCPE_OK;
+@@ -1594,10 +1594,10 @@ if (di [da].bus_cntl & BUS_ATN) {
+ da_unit [unit].wait = icd_cntlr [unit].cmd_time; /* these are always scheduled and */
+ initiated = TRUE; /* logged as initiated */
+
+- if (if_state [unit] == read_wait /* if we're waiting for a send data secondary */
+- && message_address != 0x00 /* but it's not there */
+- || if_state [unit] == status_wait /* or a send status secondary, */
+- && message_address != 0x08) /* but it's not there */
++ if ((if_state [unit] == read_wait /* if we're waiting for a send data secondary */
++ && message_address != 0x00) /* but it's not there */
++ || (if_state [unit] == status_wait /* or a send status secondary, */
++ && message_address != 0x08)) /* but it's not there */
+ abort_command (unit, io_program_error, /* then abort the pending command */
+ idle); /* and process the new command */
+
+@@ -1738,7 +1738,7 @@ else {
+
+ put_buffer_byte (&icd_cntlr [unit], data); /* add the byte to the buffer */
+
+- if (icd_cntlr [unit].length == 0) /* is this the last parameter? */
++ if (icd_cntlr [unit].length == 0) { /* is this the last parameter? */
+ if (di [da].bus_cntl & BUS_EOI) /* does the host agree? */
+ initiated = start_command (unit); /* start the command and log the initiation */
+
+@@ -1747,6 +1747,7 @@ else {
+ error_sink); /* any additional parameter bytes */
+ initiated = TRUE; /* log the abort initiation */
+ }
++ }
+ break;
+
+
+@@ -1787,14 +1788,14 @@ if (accepted && DEBUG_PRI (da_dev, DEB_X
+ if (da_unit [unit].wait > 0) /* was service requested? */
+ activate_unit (&da_unit [unit]); /* schedule the unit */
+
+-if (initiated && DEBUG_PRI (da_dev, DEB_RWSC))
++if (initiated && DEBUG_PRI (da_dev, DEB_RWSC)) {
+ if (if_command [unit] == disc_command)
+ fprintf (sim_deb, ">>DA rwsc: Unit %d position %d %s disc command initiated\n",
+ unit, da_unit [unit].pos, dl_opcode_name (ICD, icd_cntlr [unit].opcode));
+ else
+ fprintf (sim_deb, ">>DA rwsc: Unit %d %s command initiated\n",
+ unit, if_command_name [if_command [unit]]);
+-
++}
+ return accepted; /* indicate the acceptance condition */
+ }
+
Added: head/emulators/simh/files/patch-HP2100_hp2100__dp.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/simh/files/patch-HP2100_hp2100__dp.c Tue Jan 3 14:00:47 2017 (r430469)
@@ -0,0 +1,39 @@
+--- HP2100/hp2100_dp.c.orig 2016-12-01 22:43:42 UTC
++++ HP2100/hp2100_dp.c
+@@ -694,7 +694,7 @@ void dp_goc (int32 fnc, int32 drv, int32
+ {
+ int32 t;
+
+-if (t = sim_is_active (&dpc_unit[drv])) { /* still seeking? */
++if ((t = sim_is_active (&dpc_unit[drv]))) { /* still seeking? */
+ sim_cancel (&dpc_unit[drv]); /* stop seek */
+ dpc_sta[drv] = dpc_sta[drv] & ~STA_BSY; /* clear busy */
+ time = time + t; /* include seek time */
+@@ -906,10 +906,10 @@ switch (uptr->FNC) {
+ dpc_rarh = dpc_rarh ^ 1; /* incr head */
+ dpc_eoc = ((dpc_rarh & 1) == 0); /* calc eoc */
+ }
+- if (err = fseek (uptr->fileref, da * sizeof (int16),
+- SEEK_SET)) break;
++ if ((err = fseek (uptr->fileref, da * sizeof (int16),
++ SEEK_SET))) break;
+ fxread (dpxb, sizeof (int16), DP_NUMWD, uptr->fileref);
+- if (err = ferror (uptr->fileref)) break;
++ if ((err = ferror (uptr->fileref))) break;
+ }
+ dpd_ibuf = dpxb[dp_ptr++]; /* get word */
+ if (dp_ptr >= DP_NUMWD) { /* end of sector? */
+@@ -953,10 +953,10 @@ switch (uptr->FNC) {
+ dpc_rarh = dpc_rarh ^ 1; /* incr head */
+ dpc_eoc = ((dpc_rarh & 1) == 0); /* calc eoc */
+ }
+- if (err = fseek (uptr->fileref, da * sizeof (int16),
+- SEEK_SET)) break;
++ if ((err = fseek (uptr->fileref, da * sizeof (int16),
++ SEEK_SET))) break;
+ fxwrite (dpxb, sizeof (int16), DP_NUMWD, uptr->fileref);
+- if (err = ferror (uptr->fileref)) break; /* error? */
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-ports-head
mailing list