1
0
mirror of https://github.com/simh/simh.git synced 2026-02-15 20:27:40 +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

@@ -70,7 +70,6 @@ static int32 pic_map[16] = { /* map rate to delay */
0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
};
DEVICE pic_dev;
uint32 pic (uint32 dev, uint32 op, uint32 dat);
t_stat pic_svc (UNIT *uptr);
t_stat pic_reset (DEVICE *dptr);
@@ -81,12 +80,11 @@ int32 lfc_tps = 120; /* ticks per */
int32 lfc_poll = 8000;
uint32 lfc_arm = 0; /* int arm */
DEVICE lfc_dev;
uint32 lfc (uint32 dev, uint32 op, uint32 dat);
t_stat lfc_svc (UNIT *uptr);
t_stat lfc_reset (DEVICE *dptr);
t_stat lfc_set_freq (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat lfc_show_freq (FILE *st, UNIT *uptr, int32 val, void *desc);
t_stat lfc_set_freq (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
t_stat lfc_show_freq (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
/* PIC data structures
@@ -376,7 +374,7 @@ return SCPE_OK;
/* Set frequency */
t_stat lfc_set_freq (UNIT *uptr, int32 val, char *cptr, void *desc)
t_stat lfc_set_freq (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
if (cptr)
return SCPE_ARG;
@@ -388,7 +386,7 @@ return SCPE_OK;
/* Show frequency */
t_stat lfc_show_freq (FILE *st, UNIT *uptr, int32 val, void *desc)
t_stat lfc_show_freq (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
{
fprintf (st, (lfc_tps == 100)? "50Hz": "60Hz");
return SCPE_OK;