mirror of
https://github.com/simh/simh.git
synced 2026-01-27 04:22:24 +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:
@@ -237,11 +237,11 @@ uint32 display (uint32 dev, uint32 op, uint32 dat);
|
||||
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_reset (DEVICE *dptr);
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_set_model (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_set_consint (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat cpu_set_model (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat cpu_set_consint (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
extern t_bool devtab_init (void);
|
||||
extern void int_eval (void);
|
||||
@@ -1920,7 +1920,7 @@ return SCPE_OK;
|
||||
|
||||
/* Change memory size */
|
||||
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
int32 mc = 0;
|
||||
uint32 i;
|
||||
@@ -1940,7 +1940,7 @@ return SCPE_OK;
|
||||
|
||||
/* Change CPU model */
|
||||
|
||||
t_stat cpu_set_model (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat cpu_set_model (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
uint32 i;
|
||||
|
||||
@@ -1955,7 +1955,7 @@ return SCPE_OK;
|
||||
|
||||
/* Set console interrupt */
|
||||
|
||||
t_stat cpu_set_consint (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat cpu_set_consint (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
if ((uptr->flags & (UNIT_716 | UNIT_816 | UNIT_816E)) == 0)
|
||||
return SCPE_NOFNC;
|
||||
@@ -1966,7 +1966,7 @@ return SCPE_OK;
|
||||
|
||||
/* Set history */
|
||||
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
uint32 i, lnt;
|
||||
t_stat r;
|
||||
@@ -1997,10 +1997,10 @@ return SCPE_OK;
|
||||
|
||||
/* Show history */
|
||||
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
int32 op, k, di, lnt;
|
||||
char *cptr = (char *) desc;
|
||||
const char *cptr = (const char *) desc;
|
||||
t_value sim_eval[2];
|
||||
t_stat r;
|
||||
InstHistory *h;
|
||||
|
||||
Reference in New Issue
Block a user