1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-25 19:57:36 +00:00

ALL: Massive 'const' cleanup

These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
This commit is contained in:
Mark Pizzolato
2016-05-15 15:25:33 -07:00
parent 60a8a2d43d
commit 5531ccb175
444 changed files with 4119 additions and 3798 deletions

View File

@@ -103,7 +103,7 @@ static uint32 sim_throt_state = 0;
static uint32 sim_throt_sleep_time = 0;
static int32 sim_throt_wait = 0;
static UNIT *sim_clock_unit[SIM_NTIMERS] = {NULL};
UNIT *sim_clock_cosched_queue[SIM_NTIMERS] = {NULL};
UNIT * volatile sim_clock_cosched_queue[SIM_NTIMERS] = {NULL};
t_bool sim_asynch_timer =
#if defined (SIM_ASYNCH_CLOCKS)
TRUE;
@@ -760,7 +760,7 @@ return (sim_idle_rate_ms != 0);
/* sim_show_timers - show running timer information */
t_stat sim_show_timers (FILE* st, DEVICE *dptr, UNIT* uptr, int32 val, char* desc)
t_stat sim_show_timers (FILE* st, DEVICE *dptr, UNIT* uptr, int32 val, CONST char* desc)
{
int tmr, clocks;
@@ -800,7 +800,7 @@ if (clocks == 0)
return SCPE_OK;
}
t_stat sim_show_clock_queues (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr)
t_stat sim_show_clock_queues (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, CONST char *cptr)
{
#if defined (SIM_ASYNCH_IO)
int tmr;
@@ -999,7 +999,7 @@ return TRUE;
/* Set idling - implicitly disables throttling */
t_stat sim_set_idle (UNIT *uptr, int32 val, char *cptr, void *desc)
t_stat sim_set_idle (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
t_stat r;
uint32 v;
@@ -1024,7 +1024,7 @@ return SCPE_OK;
/* Clear idling */
t_stat sim_clr_idle (UNIT *uptr, int32 val, char *cptr, void *desc)
t_stat sim_clr_idle (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
sim_idle_enab = FALSE;
return SCPE_OK;
@@ -1032,7 +1032,7 @@ return SCPE_OK;
/* Show idling */
t_stat sim_show_idle (FILE *st, UNIT *uptr, int32 val, void *desc)
t_stat sim_show_idle (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
{
if (sim_idle_enab)
fprintf (st, "idle enabled");
@@ -1045,9 +1045,9 @@ return SCPE_OK;
/* Throttling package */
t_stat sim_set_throt (int32 arg, char *cptr)
t_stat sim_set_throt (int32 arg, CONST char *cptr)
{
const char *tptr;
CONST char *tptr;
char c;
t_value val, val2 = 0;
@@ -1098,7 +1098,7 @@ else {
return SCPE_OK;
}
t_stat sim_show_throt (FILE *st, DEVICE *dnotused, UNIT *unotused, int32 flag, char *cptr)
t_stat sim_show_throt (FILE *st, DEVICE *dnotused, UNIT *unotused, int32 flag, CONST char *cptr)
{
if (sim_idle_rate_ms == 0)
fprintf (st, "Throttling not available\n");