mirror of
https://github.com/simh/simh.git
synced 2026-04-28 20:57:26 +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:
@@ -107,8 +107,8 @@ int32 wtc_csrc = 0;
|
||||
int32 wtc_csrd = 0;
|
||||
int32 wtc_mode = WTC_MODE_VMS;
|
||||
|
||||
t_stat wtc_set (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat wtc_show (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat wtc_set (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat wtc_show (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat wtc_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
|
||||
const char *wtc_description (DEVICE *dptr);
|
||||
t_stat wtc_reset (DEVICE *dptr);
|
||||
@@ -149,7 +149,7 @@ DEVICE wtc_dev = {
|
||||
};
|
||||
|
||||
/* Register names for Debug tracing */
|
||||
static char *wtc_regs[] =
|
||||
static const char *wtc_regs[] =
|
||||
{"SEC ", "SECA", "MIN ", "MINA",
|
||||
"HR ", "HRA ", "DOW ", "DOM ",
|
||||
"MON ", "YEAR", "CSRA", "CSRB",
|
||||
@@ -294,13 +294,13 @@ if (sim_switches & SWMASK ('P')) { /* powerup? */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
t_stat wtc_set (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat wtc_set (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
if (cptr != NULL) wtc_mode = strcmp(cptr, "STD");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
t_stat wtc_show (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
t_stat wtc_show (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
fprintf(st, "time=%s", (wtc_mode ? "vms" :"std"));
|
||||
return SCPE_OK;
|
||||
|
||||
Reference in New Issue
Block a user