From 3b5061cb6048ef448ac55161840c5a53a2ed650b Mon Sep 17 00:00:00 2001 From: Bill Lewis Date: Thu, 22 Dec 2022 13:49:25 -0500 Subject: [PATCH 1/2] Fix another min/max/MIN/MAC call --- simh-master/IBM360/ibm360_cpanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simh-master/IBM360/ibm360_cpanel.c b/simh-master/IBM360/ibm360_cpanel.c index 3cccb27..4e2415b 100644 --- a/simh-master/IBM360/ibm360_cpanel.c +++ b/simh-master/IBM360/ibm360_cpanel.c @@ -3536,7 +3536,7 @@ void mt_TapeMediumToReelDynamicState(uint32 * surface, int pitch, int ireel, int x1=xyreelcentre[base][ireel*2] +x1 * ( (ireel == 0) ? 1:-1); y1=xyreelcentre[base][ireel*2+1]+y1; - yH=max(y0, y1); + yH=MAX(y0, y1); // colors to not overdraw col_reel= surface_rgb_color(55, 55, 55) ; // color for tape medium winded on reel if (bTapeIs == 3420) { From 237d2b7036dfb8fec56b674399244289ff24d998 Mon Sep 17 00:00:00 2001 From: Bill Lewis Date: Thu, 22 Dec 2022 13:56:59 -0500 Subject: [PATCH 2/2] Correct duplicate definition errors with newer gcc --- simh-master/I701/i701_defs.h | 2 +- simh-master/IBM360/ibm360_defs.h | 2 +- simh-master/IBM360/ibm360_mt.c | 2 ++ simh-master/NORC/NORC_cpu.c | 2 +- simh-master/NORC/NORC_defs.h | 2 +- simh-master/NORC/NORC_lp.c | 2 +- simh-master/NORC/NORC_mt.c | 2 ++ simh-master/NORC/NORC_sys.c | 2 +- 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/simh-master/I701/i701_defs.h b/simh-master/I701/i701_defs.h index 20d8b7c..4a331d7 100644 --- a/simh-master/I701/i701_defs.h +++ b/simh-master/I701/i701_defs.h @@ -132,7 +132,7 @@ typedef struct { t_int64 ReadyTickCount; // value of GlobalTickCount (=simulated time) when tape will be ready to accept command } mtinforec; // extended info for tapes. Holds detailed info of tape command operation -mtinforec mt_info[4]; +extern mtinforec mt_info[4]; extern char digits_ascii[31]; diff --git a/simh-master/IBM360/ibm360_defs.h b/simh-master/IBM360/ibm360_defs.h index ef78efe..c584749 100644 --- a/simh-master/IBM360/ibm360_defs.h +++ b/simh-master/IBM360/ibm360_defs.h @@ -424,7 +424,7 @@ typedef struct { int cmd_tm0; // signal tape cmd animation pending to be done } mtinforec; // extended info for tapes. Holds detailed info of tape command operation -mtinforec mt_info[8]; +extern mtinforec mt_info[8]; // addr compare info typedef struct { diff --git a/simh-master/IBM360/ibm360_mt.c b/simh-master/IBM360/ibm360_mt.c index 055b7a4..7421fb3 100644 --- a/simh-master/IBM360/ibm360_mt.c +++ b/simh-master/IBM360/ibm360_mt.c @@ -37,6 +37,8 @@ #include "ibm360_defs.h" #include "sim_tape.h" +mtinforec mt_info[8]; + #ifdef NUM_DEVS_MT #define BUFFSIZE (64 * 1024) #define MTUF_9TR (1 << MTUF_V_UF) diff --git a/simh-master/NORC/NORC_cpu.c b/simh-master/NORC/NORC_cpu.c index cf80873..1e05a00 100644 --- a/simh-master/NORC/NORC_cpu.c +++ b/simh-master/NORC/NORC_cpu.c @@ -67,7 +67,7 @@ */ #include -#include "NORC_defs.h" +#include "NORC_defs.h" #if defined(CPANEL) #include "cpanel.h" int cpanel_gui_supported = 1; diff --git a/simh-master/NORC/NORC_defs.h b/simh-master/NORC/NORC_defs.h index 20a053e..4dcc184 100644 --- a/simh-master/NORC/NORC_defs.h +++ b/simh-master/NORC/NORC_defs.h @@ -131,7 +131,7 @@ typedef struct { } mtinforec; // extended info for tapes. Holds detailed info of tape command operation -mtinforec mt_info[9]; +extern mtinforec mt_info[9]; extern int LastTapeCheck; // read words from tape diff --git a/simh-master/NORC/NORC_lp.c b/simh-master/NORC/NORC_lp.c index aa44ca6..4bb911c 100644 --- a/simh-master/NORC/NORC_lp.c +++ b/simh-master/NORC/NORC_lp.c @@ -67,7 +67,7 @@ char lptPrintOut[LPT_COLUMNS * lptPrintOutMAX]; int lptPrintOutCount = 0; // total number of lines printed // IBM NORC tape/printer control Unit internal state -int bFastMode; // =1 for FAST operation +extern int bFastMode; // =1 for FAST operation // lpt print routine. If line is NULL prints empty lines // add CR LF at end of each line diff --git a/simh-master/NORC/NORC_mt.c b/simh-master/NORC/NORC_mt.c index 6e221b9..299283a 100644 --- a/simh-master/NORC/NORC_mt.c +++ b/simh-master/NORC/NORC_mt.c @@ -39,6 +39,8 @@ #include "NORC_defs.h" #include "sim_tape.h" +mtinforec mt_info[9]; + #define UNIT_MT UNIT_ATTABLE | UNIT_ROABLE | UNIT_DISABLE // Tapes in NORC have address assigned by the console. So tape P can be tied to address 00-12 diff --git a/simh-master/NORC/NORC_sys.c b/simh-master/NORC/NORC_sys.c index e859467..2d39e43 100644 --- a/simh-master/NORC/NORC_sys.c +++ b/simh-master/NORC/NORC_sys.c @@ -21,7 +21,7 @@ */ -#include "NORC_defs.h" +#include "NORC_defs.h" #include "sim_card.h" #include