1
0
mirror of https://github.com/simh/simh.git synced 2026-04-18 08:57:25 +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

@@ -66,8 +66,8 @@
/* function prototypes */
t_stat BOOTROM_svc (UNIT *uptr);
t_stat BOOTROM_config (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat BOOTROM_attach (UNIT *uptr, char *cptr);
t_stat BOOTROM_config (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
t_stat BOOTROM_attach (UNIT *uptr, CONST char *cptr);
t_stat BOOTROM_reset (DEVICE *dptr);
int32 BOOTROM_get_mbyte(int32 offset);
@@ -130,7 +130,7 @@ DEVICE BOOTROM_dev = {
/* BOOTROM_attach - attach file to EPROM unit */
t_stat BOOTROM_attach (UNIT *uptr, char *cptr)
t_stat BOOTROM_attach (UNIT *uptr, CONST char *cptr)
{
t_stat r;
t_addr image_size, capac;
@@ -155,7 +155,7 @@ t_stat BOOTROM_attach (UNIT *uptr, char *cptr)
/* BOOTROM_config = None, 2704, 2708, 2716, 2732 or 2764 */
t_stat BOOTROM_config (UNIT *uptr, int32 val, char *cptr, void *desc)
t_stat BOOTROM_config (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
{
sim_debug (DEBUG_flow, &BOOTROM_dev, "BOOTROM_config: val=%d\n", val);
if ((val < UNIT_NONE) || (val > UNIT_2764)) { /* valid param? */

View File

@@ -53,7 +53,7 @@ extern int32 get_base(void);
/* function prototypes */
t_stat i2716_attach (UNIT *uptr, char *cptr);
t_stat i2716_attach (UNIT *uptr, CONST char *cptr);
t_stat i2716_reset (DEVICE *dptr);
int32 i2716_get_mbyte(int32 offset);
@@ -110,7 +110,7 @@ DEVICE i2716_dev = {
/* i2716_attach - attach file to EPROM unit
force EPROM reset at completion */
t_stat i2716_attach (UNIT *uptr, char *cptr)
t_stat i2716_attach (UNIT *uptr, CONST char *cptr)
{
int32 j, c;
t_stat r;

View File

@@ -1924,7 +1924,7 @@ t_stat m6800_reset (DEVICE *dptr)
takes the address from the hex record or the current PC for binary.
*/
t_stat sim_load (FILE *fileref, char *cptr, char *fnam, int flag)
t_stat sim_load (FILE *fileref, CONST char *cptr, CONST char *fnam, int flag)
{
int32 i, addr = 0, cnt = 0;
@@ -2011,7 +2011,7 @@ t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw)
status = error status
*/
t_stat parse_sym (char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
{
return (-2);
}