Compiler cleanup after v3.9-0 merge

This commit is contained in:
Mark Pizzolato 2012-03-19 16:07:36 -07:00
parent fffad7c20e
commit fabdf73bed
30 changed files with 49 additions and 39 deletions

View file

@ -1,13 +1,8 @@
Notes For V3.9 Notes For V3.9
The makefile now works for Linux and most Unix's. However, for Solaris The makefile now works for all *nix platforms and with cygwin and MinGW32
and MacOS, you must first export the OSTYPE environment variable: on Windows.
> export OSTYPE
> make
Otherwise, you will get build errors.
1. New Features 1. New Features

View file

@ -107,7 +107,7 @@ int32 chip = 0; /* 0 = 8080 chip, 1 = z8
int32 PCX; /* External view of PC */ int32 PCX; /* External view of PC */
extern int32 sim_int_char; extern int32 sim_int_char;
extern int32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */ extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ;/* breakpoint info */
/* function prototypes */ /* function prototypes */

View file

@ -215,7 +215,8 @@ static struct drvtyp dp_tab[] = {
{ DP_DRV (4720) } { DP_DRV (4720) }
}; };
extern int32 dev_int, dev_enb, chan_req; extern int32 dev_int, dev_enb;
extern uint32 chan_req;
extern int32 stop_inst; extern int32 stop_inst;
extern uint32 dma_ad[DMA_MAX]; extern uint32 dma_ad[DMA_MAX];
extern int32 sim_switches; extern int32 sim_switches;

View file

@ -72,7 +72,8 @@
#define OTA_CW1 1 /* expecting CW1 */ #define OTA_CW1 1 /* expecting CW1 */
#define OTA_CW2 2 /* expecting CW2 */ #define OTA_CW2 2 /* expecting CW2 */
extern int32 dev_int, dev_enb, chan_req; extern int32 dev_int, dev_enb;
extern uint32 chan_req;
extern int32 stop_inst; extern int32 stop_inst;
extern uint32 dma_ad[DMA_MAX]; extern uint32 dma_ad[DMA_MAX];

View file

@ -82,7 +82,8 @@
#define STA_BOT 0000002 /* beg of tape */ #define STA_BOT 0000002 /* beg of tape */
#define STA_EOT 0000001 /* end of tape */ #define STA_EOT 0000001 /* end of tape */
extern int32 dev_int, dev_enb, chan_req; extern int32 dev_int, dev_enb;
extern uint32 chan_req;
extern int32 stop_inst; extern int32 stop_inst;
uint32 mt_buf = 0; /* data buffer */ uint32 mt_buf = 0; /* data buffer */

View file

@ -43,7 +43,7 @@
extern uint8 M[MAXMEMSIZE]; extern uint8 M[MAXMEMSIZE];
extern uint8 ind[NUM_IND]; extern uint8 ind[NUM_IND];
extern UNIT cpu_unit; extern UNIT cpu_unit;
extern int32 io_stop; extern uint32 io_stop;
char cdr_buf[CD_LEN + 2]; char cdr_buf[CD_LEN + 2];
char cdp_buf[CD_LEN + 2]; char cdp_buf[CD_LEN + 2];
@ -332,8 +332,8 @@ return SCPE_OK;
t_stat cdr_boot (int32 unitno, DEVICE *dptr) t_stat cdr_boot (int32 unitno, DEVICE *dptr)
{ {
t_stat r; t_stat r;
int32 old_io_stop; uint32 old_io_stop;
extern int32 saved_PC; extern uint32 saved_PC;
old_io_stop = io_stop; old_io_stop = io_stop;
io_stop = 1; io_stop = 1;

View file

@ -363,7 +363,7 @@ const static uint8 boot_rom[] = {
t_stat ptr_boot (int32 unitno, DEVICE *dptr) t_stat ptr_boot (int32 unitno, DEVICE *dptr)
{ {
int32 i; int32 i;
extern int32 saved_PC; extern uint32 saved_PC;
for (i = 0; i < BOOT_LEN; i++) for (i = 0; i < BOOT_LEN; i++)
M[BOOT_START + i] = boot_rom[i]; M[BOOT_START + i] = boot_rom[i];

View file

@ -124,7 +124,8 @@ t_stat sim_load (FILE *fileref, char *cptr, char *fnam, int flag)
{ {
int32 col, rpt, ptr, mask, cctbuf[CCT_LNT]; int32 col, rpt, ptr, mask, cctbuf[CCT_LNT];
t_stat r; t_stat r;
extern int32 cct_lnt, cct_ptr, cct[CCT_LNT]; extern int32 cct_lnt, cct_ptr;
extern uint32 cct[CCT_LNT];
char cbuf[CBUFSIZE], gbuf[CBUFSIZE]; char cbuf[CBUFSIZE], gbuf[CBUFSIZE];
if ((*cptr != 0) || (flag != 0)) if ((*cptr != 0) || (flag != 0))

View file

@ -87,7 +87,7 @@ t_stat cd_attach (UNIT *uptr, char *cptr);
t_stat cd_set_mode (UNIT *uptr, int32 val, char *cptr, void *desc); t_stat cd_set_mode (UNIT *uptr, int32 val, char *cptr, void *desc);
char colbin_to_bcd (uint32 cb); char colbin_to_bcd (uint32 cb);
extern uint32 sim_switches; extern int32 sim_switches;
extern uint32 PC; extern uint32 PC;
extern uint32 ind_ioc; extern uint32 ind_ioc;
extern char bcd_to_ascii_a[64]; extern char bcd_to_ascii_a[64];

View file

@ -86,7 +86,7 @@ extern DEVICE mt_dev[NUM_CHAN];
extern DEVICE drm_dev; extern DEVICE drm_dev;
extern DEVICE dsk_dev; extern DEVICE dsk_dev;
extern DEVICE com_dev; extern DEVICE com_dev;
extern int32 sim_brk_summ; extern uint32 sim_brk_summ;
t_stat ch_reset (DEVICE *dptr); t_stat ch_reset (DEVICE *dptr);
t_stat ch6_svc (UNIT *uptr); t_stat ch6_svc (UNIT *uptr);

View file

@ -72,7 +72,7 @@ extern uint32 PC;
extern uint32 cpu_model; extern uint32 cpu_model;
extern uint32 ind_ioc; extern uint32 ind_ioc;
extern FILE *sim_deb; extern FILE *sim_deb;
extern char *sel_name[]; extern const char *sel_name[];
t_stat mt_chsel (uint32 ch, uint32 sel, uint32 unit); t_stat mt_chsel (uint32 ch, uint32 sel, uint32 unit);
t_stat mt_chwr (uint32 ch, t_uint64 val, uint32 flags); t_stat mt_chwr (uint32 ch, t_uint64 val, uint32 flags);

View file

@ -75,6 +75,9 @@
#define STA_WRP 0x80 /* *write prot */ #define STA_WRP 0x80 /* *write prot */
#define STA_DEF 0x40 /* def track NI */ #define STA_DEF 0x40 /* def track NI */
#ifdef STA_DEL /* Some platforms define a conflicting symbol here */
#undef STA_DEL
#endif
#define STA_DEL 0x20 /* del record */ #define STA_DEL 0x20 /* del record */
#define STA_ERR 0x10 /* error */ #define STA_ERR 0x10 /* error */
#define STA_IDL 0x02 /* idle */ #define STA_IDL 0x02 /* idle */

View file

@ -304,7 +304,7 @@ t_addr cpu_memsize = INIMEMSIZE; /* last mem addr */
extern int32 CPUERR, MAINT; extern int32 CPUERR, MAINT;
extern int32 sim_interval; extern int32 sim_interval;
extern int32 sim_int_char; extern int32 sim_int_char;
extern uint32 sim_switches; extern int32 sim_switches;
extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */ extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */
extern t_bool sim_idle_enab; extern t_bool sim_idle_enab;
extern DEVICE *sim_devices[]; extern DEVICE *sim_devices[];

View file

@ -60,7 +60,7 @@
#else /* PDP-11 version */ #else /* PDP-11 version */
#include "pdp11_defs.h" #include "pdp11_defs.h"
extern int32 cpu_opt; extern uint32 cpu_opt;
#endif #endif
extern uint16 *M; extern uint16 *M;

View file

@ -52,7 +52,8 @@
extern uint16 *M; extern uint16 *M;
extern int32 int_req[IPL_HLVL]; extern int32 int_req[IPL_HLVL];
extern int32 ub_map[UBM_LNT_LW]; extern int32 ub_map[UBM_LNT_LW];
extern int32 cpu_opt, cpu_bme; extern uint32 cpu_opt;
extern int32 cpu_bme;
extern int32 trap_req, ipl; extern int32 trap_req, ipl;
extern int32 cpu_log; extern int32 cpu_log;
extern int32 autcon_enb; extern int32 autcon_enb;

View file

@ -158,7 +158,8 @@ typedef struct {
MBACTX massbus[MBA_NUM]; MBACTX massbus[MBA_NUM];
extern int32 cpu_opt, cpu_bme; extern uint32 cpu_opt;
extern int32 cpu_bme;
extern uint16 *M; extern uint16 *M;
extern int32 int_req[IPL_HLVL]; extern int32 int_req[IPL_HLVL];
extern t_addr cpu_memsize; extern t_addr cpu_memsize;

View file

@ -530,7 +530,7 @@ max 17ms for 1 track seek w/head switch
rlmp2 = rlmp1 = rlmp; rlmp2 = rlmp1 = rlmp;
if (DEBUG_PRS (rl_dev)) if (DEBUG_PRS (rl_dev))
fprintf (sim_deb, ">>RL GSTA: rlds=%06o drv=%ld\n", fprintf (sim_deb, ">>RL GSTA: rlds=%06o drv=%ld\n",
rlmp, uptr - rl_dev.units); rlmp, (long)(uptr - rl_dev.units));
rl_set_done (0); /* done */ rl_set_done (0); /* done */
break; break;
default: /* data transfer */ default: /* data transfer */

View file

@ -99,7 +99,7 @@ extern int32 fault_PC;
#define RQ_XTIME 500 #define RQ_XTIME 500
#define OLDPC MMR2 #define OLDPC MMR2
extern int32 MMR2; extern int32 MMR2;
extern int32 cpu_opt; extern uint32 cpu_opt;
#endif #endif
#if !defined (RQ_NUMCT) #if !defined (RQ_NUMCT)

View file

@ -83,7 +83,7 @@
#include "pdp11_defs.h" #include "pdp11_defs.h"
#define INIT_TYPE TQ5_TYPE #define INIT_TYPE TQ5_TYPE
#define INIT_CAP TQ5_CAP #define INIT_CAP TQ5_CAP
extern int32 cpu_opt; extern uint32 cpu_opt;
#endif #endif
#include "pdp11_uqssp.h" #include "pdp11_uqssp.h"

View file

@ -96,7 +96,7 @@
#else /* PDP-11 version */ #else /* PDP-11 version */
#include "pdp11_defs.h" #include "pdp11_defs.h"
#define TS_DIS DEV_DIS /* off by default */ #define TS_DIS DEV_DIS /* off by default */
extern int32 cpu_opt; extern uint32 cpu_opt;
#endif #endif
#include "sim_tape.h" #include "sim_tape.h"

View file

@ -79,7 +79,7 @@ extern int32 int_req[IPL_HLVL];
#if defined (VM_PDP11) #if defined (VM_PDP11)
#include "pdp11_defs.h" #include "pdp11_defs.h"
extern int32 int_req[IPL_HLVL]; extern int32 int_req[IPL_HLVL];
extern int32 cpu_opt; extern uint32 cpu_opt;
#endif #endif
#include "sim_sock.h" #include "sim_sock.h"

View file

@ -143,7 +143,11 @@ static UFP fmb; /* FMB */
static UFP fmq; /* FMQ - hi,lo only */ static UFP fmq; /* FMQ - hi,lo only */
extern int32 M[MAXMEMSIZE]; extern int32 M[MAXMEMSIZE];
extern int32 pcq[PCQ_SIZE]; #if defined (PDP15)
extern int32 pcq[PCQ_SIZE]; /* PC queue */
#else
extern int16 pcq[PCQ_SIZE]; /* PC queue */
#endif
extern int32 pcq_p; extern int32 pcq_p;
extern int32 PC; extern int32 PC;
extern int32 trap_pending, usmd; extern int32 trap_pending, usmd;

View file

@ -40,8 +40,8 @@
#include <ctype.h> #include <ctype.h>
extern uint8 M[]; extern uint8 M[];
extern char ebcdic_to_ascii[256]; extern unsigned char ebcdic_to_ascii[];
extern char ascii_to_ebcdic[256]; extern unsigned char ascii_to_ebcdic[];
int32 s1sel, s2sel; int32 s1sel, s2sel;
char rbuf[CBUFSIZE]; /* > CDR_WIDTH */ char rbuf[CBUFSIZE]; /* > CDR_WIDTH */
t_stat cdr_svc (UNIT *uptr); t_stat cdr_svc (UNIT *uptr);

View file

@ -381,7 +381,7 @@ int32 debug_reg = 0; /* set for debug/trace *
int32 debug_flag = 0; /* 1 when trace.log open */ int32 debug_flag = 0; /* 1 when trace.log open */
FILE *trace; FILE *trace;
extern int32 sim_int_char; extern int32 sim_int_char;
extern int32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */ extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ;/* breakpoint info */
t_stat cpu_ex (t_value *vptr, t_addr addr, UNIT *uptr, int32 sw); t_stat cpu_ex (t_value *vptr, t_addr addr, UNIT *uptr, int32 sw);
t_stat cpu_dep (t_value val, t_addr addr, UNIT *uptr, int32 sw); t_stat cpu_dep (t_value val, t_addr addr, UNIT *uptr, int32 sw);

View file

@ -41,7 +41,7 @@ t_stat lpt_attach (UNIT *uptr, char *cptr);
t_stat write_line (int32 ilnt, int32 mod); t_stat write_line (int32 ilnt, int32 mod);
t_stat space (int32 lines, int32 lflag); t_stat space (int32 lines, int32 lflag);
t_stat carriage_control (int32 action, int32 mod); t_stat carriage_control (int32 action, int32 mod);
extern unsigned char ebcdic_to_ascii[256]; extern unsigned char ebcdic_to_ascii[];
#define UNIT_V_PCHAIN (UNIT_V_UF + 0) #define UNIT_V_PCHAIN (UNIT_V_UF + 0)
#define UNIT_M_PCHAIN 03 #define UNIT_M_PCHAIN 03

View file

@ -41,7 +41,7 @@ extern UNIT cpu_unit;
extern REG cpu_reg[]; extern REG cpu_reg[];
extern unsigned char M[]; extern unsigned char M[];
extern int32 saved_PC, IAR[]; extern int32 saved_PC, IAR[];
extern char ebcdic_to_ascii[256]; extern unsigned char ebcdic_to_ascii[];
char *parse_addr(char *cptr, char *gbuf, int32 *addr, int32 *addrtype); char *parse_addr(char *cptr, char *gbuf, int32 *addr, int32 *addrtype);
int32 printf_sym (FILE *of, char *strg, int32 addr, uint32 *val, int32 printf_sym (FILE *of, char *strg, int32 addr, uint32 *val,

View file

@ -79,9 +79,10 @@ extern uint32 int_req; /* int req */
extern uint32 xfr_req; /* xfer req */ extern uint32 xfr_req; /* xfer req */
extern uint32 alert; /* pin/pot alert */ extern uint32 alert; /* pin/pot alert */
extern uint32 X, EM2, EM3, OV, ion, bpt; extern uint32 X, EM2, EM3, OV, ion, bpt;
extern uint32 nml_mode, usr_mode, rtc_pie; extern uint32 nml_mode, usr_mode;
extern int32 rtc_pie;
extern int32 stop_invins, stop_invdev, stop_inviop; extern int32 stop_invins, stop_invdev, stop_inviop;
extern int32 mon_usr_trap; extern uint32 mon_usr_trap;
extern UNIT cpu_unit; extern UNIT cpu_unit;
extern FILE *sim_log; extern FILE *sim_log;
extern DEVICE *sim_devices[]; extern DEVICE *sim_devices[];

View file

@ -154,7 +154,8 @@ t_stat sim_load_cct (FILE *fileref)
{ {
int32 col, rpt, ptr, mask, cctbuf[CCT_LNT]; int32 col, rpt, ptr, mask, cctbuf[CCT_LNT];
t_stat r; t_stat r;
extern int32 lpt_ccl, lpt_ccp, lpt_cct[CCT_LNT]; extern int32 lpt_ccl, lpt_ccp;
extern uint8 lpt_cct[CCT_LNT];
char *cptr, cbuf[CBUFSIZE], gbuf[CBUFSIZE]; char *cptr, cbuf[CBUFSIZE], gbuf[CBUFSIZE];
ptr = 0; ptr = 0;

View file

@ -344,7 +344,7 @@ if (uptr->capac) {
fprintf (st, "capacity=%dM%s", (uint32) (uptr->capac / ((t_addr) 1000000)), cap_units); fprintf (st, "capacity=%dM%s", (uint32) (uptr->capac / ((t_addr) 1000000)), cap_units);
else if (uptr->capac >= (t_addr) 1000) else if (uptr->capac >= (t_addr) 1000)
fprintf (st, "capacity=%dK%s", (uint32) (uptr->capac / ((t_addr) 1000)), cap_units); fprintf (st, "capacity=%dK%s", (uint32) (uptr->capac / ((t_addr) 1000)), cap_units);
else fprintf (st, "capacity=%d%S", (uint32) uptr->capac, cap_units); else fprintf (st, "capacity=%d%s", (uint32) uptr->capac, cap_units);
} }
else fprintf (st, "undefined capacity"); else fprintf (st, "undefined capacity");
return SCPE_OK; return SCPE_OK;

View file

@ -109,7 +109,7 @@ int32 int_req = 0; /* Interrupt request */
int32 mem_fault = 0; /* memory fault flag */ int32 mem_fault = 0; /* memory fault flag */
extern int32 sim_int_char; extern int32 sim_int_char;
extern int32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */ extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ;/* breakpoint info */
/* function prototypes */ /* function prototypes */