Cleanup of unneeded global extern declarations

This commit is contained in:
Mark Pizzolato 2014-10-10 08:18:15 -07:00
parent 0b1050853e
commit 3951ad2432
19 changed files with 2 additions and 27 deletions

View file

@ -1940,8 +1940,6 @@ void PutByteDMA(const uint32 Addr, const uint32 Value) {
2) it returns MASK_BRK if a breakpoint is found but should be ignored 2) it returns MASK_BRK if a breakpoint is found but should be ignored
*/ */
static int32 sim_brk_lookup (const t_addr loc, const int32 btyp) { static int32 sim_brk_lookup (const t_addr loc, const int32 btyp) {
extern t_bool sim_brk_pend[SIM_BKPT_N_SPC];
extern t_addr sim_brk_ploc[SIM_BKPT_N_SPC];
BRKTAB *bp; BRKTAB *bp;
if ((bp = sim_brk_fnd (loc)) && /* entry in table? */ if ((bp = sim_brk_fnd (loc)) && /* entry in table? */
(btyp & bp -> typ) && /* type match? */ (btyp & bp -> typ) && /* type match? */
@ -2050,7 +2048,6 @@ void setClockFrequency(const uint32 Value) {
} }
static t_stat sim_instr_mmu (void) { static t_stat sim_instr_mmu (void) {
extern t_bool sim_brk_pend[SIM_BKPT_N_SPC];
extern int32 timerInterrupt; extern int32 timerInterrupt;
extern int32 timerInterruptHandler; extern int32 timerInterruptHandler;
extern int32 keyboardInterrupt; extern int32 keyboardInterrupt;

View file

@ -296,7 +296,6 @@ int32 hst_p = 0; /* history pointer */
int32 hst_lnt = 0; /* history length */ int32 hst_lnt = 0; /* history length */
InstHistory *hst = NULL; /* instruction history */ InstHistory *hst = NULL; /* instruction history */
extern int32 sim_int_char;
extern DEVICE *sim_devices[]; extern DEVICE *sim_devices[];
t_bool devtab_init (void); t_bool devtab_init (void);

View file

@ -58,7 +58,6 @@
extern uint16 dev_ext_int, dev_ext_enb; // current IRQ and IEN bit vectors extern uint16 dev_ext_int, dev_ext_enb; // current IRQ and IEN bit vectors
extern int32 PC; // current PC (for debug messages) extern int32 PC; // current PC (for debug messages)
extern int32 stop_inst; // needed by IOBADFNC() extern int32 stop_inst; // needed by IOBADFNC()
extern int32 sim_switches; // option bitmap for ATTACH/DETACH
extern uint16 M[]; // main memory (for DMC access) extern uint16 M[]; // main memory (for DMC access)
// Forward declarations ... // Forward declarations ...

View file

@ -175,7 +175,6 @@
extern uint16 dev_ext_int, dev_ext_enb; // current IRQ and IEN bit vectors extern uint16 dev_ext_int, dev_ext_enb; // current IRQ and IEN bit vectors
extern int32 PC; // current PC (for debug messages) extern int32 PC; // current PC (for debug messages)
extern int32 stop_inst; // needed by IOBADFNC() extern int32 stop_inst; // needed by IOBADFNC()
extern int32 sim_switches; // option bitmap for ATTACH/DETACH
extern uint16 M[]; // main memory (for DMC access) extern uint16 M[]; // main memory (for DMC access)
// Forward declarations ... // Forward declarations ...

View file

@ -521,7 +521,6 @@ static const int32 mtf_mod[] = {
t_stat sim_instr (void) t_stat sim_instr (void)
{ {
extern int32 sim_interval;
int32 IS, ilnt, flags; int32 IS, ilnt, flags;
int32 op, xa, t, wm, ioind, dev, unit; int32 op, xa, t, wm, ioind, dev, unit;
int32 a, b, i, k, asave, bsave; int32 a, b, i, k, asave, bsave;

View file

@ -70,7 +70,6 @@ extern int32 int_lamps; /* accumulated version of int_req - gives lamp pers
extern int32 int_mask; /* current active interrupt mask (ipl sensitive) */ extern int32 int_mask; /* current active interrupt mask (ipl sensitive) */
extern int32 mem_mask; extern int32 mem_mask;
extern int32 cpu_dsw; /* CPU device status word */ extern int32 cpu_dsw; /* CPU device status word */
extern int32 sim_int_char; /* interrupt character */
extern int32 con_dsw; /* has program stop and int run bits */ extern int32 con_dsw; /* has program stop and int run bits */
extern t_bool running; extern t_bool running;
extern t_bool power; extern t_bool power;

View file

@ -147,8 +147,6 @@ int16 pcq[PCQ_SIZE] = { 0 }; /* PC queue */
int32 pcq_p = 0; /* PC queue ptr */ int32 pcq_p = 0; /* PC queue ptr */
REG *pcq_r = NULL; /* PC queue reg ptr */ REG *pcq_r = NULL; /* PC queue reg ptr */
extern int32 sim_step;
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);
t_stat cpu_reset (DEVICE *dptr); t_stat cpu_reset (DEVICE *dptr);

View file

@ -781,8 +781,5 @@ t_stat show_vec (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat show_vec_mux (FILE *st, UNIT *uptr, int32 val, void *desc); t_stat show_vec_mux (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat auto_config (char *name, int32 num); t_stat auto_config (char *name, int32 num);
/* Global data */
extern t_bool sim_idle_enab;
#endif #endif

View file

@ -632,7 +632,6 @@ return SCPE_OK;
t_stat rs_detach (UNIT *uptr) t_stat rs_detach (UNIT *uptr)
{ {
int32 drv; int32 drv;
extern int32 sim_is_running;
if (!(uptr->flags & UNIT_ATT)) /* attached? */ if (!(uptr->flags & UNIT_ATT)) /* attached? */
return SCPE_OK; return SCPE_OK;

View file

@ -35,7 +35,6 @@
#include <ctype.h> #include <ctype.h>
extern UNIT cpu_unit; extern UNIT cpu_unit;
extern int32 sim_switches;
extern UNIT con_unit[]; extern UNIT con_unit[];
static t_stat con_termsvc(UNIT *uptr); static t_stat con_termsvc(UNIT *uptr);

View file

@ -54,7 +54,6 @@
/* generic debug tracing support */ /* generic debug tracing support */
#if DBG_MSG==1 #if DBG_MSG==1
extern FILE* sim_deb;
#define ADDRESS_FORMAT "[0x%08x]" #define ADDRESS_FORMAT "[0x%08x]"
#if UNIX_PLATFORM #if UNIX_PLATFORM

View file

@ -53,7 +53,6 @@ extern REG m68kcpu_reg[];
#define DBG_CPU_BTRACE (1 << 4) #define DBG_CPU_BTRACE (1 << 4)
#define DBG_CPU_CUSTOM1 (1 << 5) /* reserved for custom debugging */ #define DBG_CPU_CUSTOM1 (1 << 5) /* reserved for custom debugging */
#define DBG_CPU_CUSTOM2 (1 << 6) /* reserved for custom debugging */ #define DBG_CPU_CUSTOM2 (1 << 6) /* reserved for custom debugging */
extern FILE* sim_deb;
extern DEBTAB m68kcpu_dt[]; extern DEBTAB m68kcpu_dt[];
#if DBG_MSG==1 #if DBG_MSG==1
#define IFDEBUG(flag,func) if ((m68kcpu_dev->dctrl & flag) && sim_deb) { (void)(func); fflush(sim_deb); } #define IFDEBUG(flag,func) if ((m68kcpu_dev->dctrl & flag) && sim_deb) { (void)(func); fflush(sim_deb); }

View file

@ -88,10 +88,6 @@ uint32 C[MEMSIZE] = { 0, 0 }; /* C[0] current instruction */
/* C[1] present instruction */ /* C[1] present instruction */
uint32 Staticisor = 0; uint32 Staticisor = 0;
extern int32 sim_interval;
extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */
extern int32 sim_step;
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);
t_stat cpu_reset (DEVICE *dptr); t_stat cpu_reset (DEVICE *dptr);

View file

@ -58,7 +58,6 @@ extern int32 M[];
extern int32 PC; extern int32 PC;
extern int32 ascii_to_flexo[], flexo_to_ascii[]; extern int32 ascii_to_flexo[], flexo_to_ascii[];
extern int32 sc_map[]; extern int32 sc_map[];
extern int32 sim_switches;
/* SCP data structures and interface routines /* SCP data structures and interface routines

View file

@ -305,7 +305,6 @@ extern void rxcs_wr (int32 dat);
extern void txcs_wr (int32 dat); extern void txcs_wr (int32 dat);
extern void txdb_wr (int32 dat); extern void txdb_wr (int32 dat);
extern void ioreset_wr (int32 dat); extern void ioreset_wr (int32 dat);
extern uint32 sim_os_msec();
extern void cpu_idle (void); extern void cpu_idle (void);
/* ROM data structures /* ROM data structures

View file

@ -29,7 +29,6 @@
extern UNIT cpu_unit; extern UNIT cpu_unit;
extern REG cpu_reg[]; extern REG cpu_reg[];
extern int32 sim_switches;
extern uint32 pal_type; extern uint32 pal_type;
t_stat fprint_sym_m (FILE *of, t_addr addr, uint32 inst); t_stat fprint_sym_m (FILE *of, t_addr addr, uint32 inst);

2
scp.h
View file

@ -195,6 +195,8 @@ extern volatile int32 stop_cpu;
extern uint32 sim_brk_types; /* breakpoint info */ extern uint32 sim_brk_types; /* breakpoint info */
extern uint32 sim_brk_dflt; extern uint32 sim_brk_dflt;
extern uint32 sim_brk_summ; extern uint32 sim_brk_summ;
extern t_bool sim_brk_pend[SIM_BKPT_N_SPC];
extern t_addr sim_brk_ploc[SIM_BKPT_N_SPC];
extern FILE *stdnul; extern FILE *stdnul;
extern t_bool sim_asynch_enabled; extern t_bool sim_asynch_enabled;

View file

@ -1155,7 +1155,6 @@ clock_gettime(CLOCK_REALTIME, &now);
return _timespec_to_double (&now); return _timespec_to_double (&now);
} }
extern int32 sim_is_running;
extern UNIT * volatile sim_wallclock_queue; extern UNIT * volatile sim_wallclock_queue;
extern UNIT * volatile sim_wallclock_entry; extern UNIT * volatile sim_wallclock_entry;

View file

@ -42,8 +42,6 @@ t_bool vid_mouse_b3 = FALSE;
#include <SDL.h> #include <SDL.h>
#include <SDL_thread.h> #include <SDL_thread.h>
extern int32 sim_is_running;
#define EVENT_REDRAW 1 /* redraw event for SDL */ #define EVENT_REDRAW 1 /* redraw event for SDL */
#define EVENT_CLOSE 2 /* close event for SDL */ #define EVENT_CLOSE 2 /* close event for SDL */
#define MAX_EVENTS 20 /* max events in queue */ #define MAX_EVENTS 20 /* max events in queue */