1
0
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:
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

@@ -48,9 +48,9 @@ extern REG cpu_reg[];
extern uint16 *M;
t_stat fprint_sym_m (FILE *of, t_addr addr, t_value *val);
t_stat parse_sym_m (char *cptr, t_addr addr, t_value *val);
extern t_stat lp_load (FILE *fileref, char *cptr, char *fnam);
extern t_stat pt_dump (FILE *of, char *cptr, char *fnam);
t_stat parse_sym_m (const char *cptr, t_addr addr, t_value *val);
extern t_stat lp_load (FILE *fileref, CONST char *cptr, CONST char *fnam);
extern t_stat pt_dump (FILE *of, CONST char *cptr, CONST char *fnam);
/* SCP data structures and interface routines
@@ -98,7 +98,7 @@ const char *sim_stop_messages[] = {
/* Binary loader -- load carriage control tape
Binary dump -- paper tape dump */
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)
{
if (flag)
return pt_dump (fileref, cptr, fnam);
@@ -489,7 +489,7 @@ return SCPE_OK;
/* Symbolic input */
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)
{
int32 bflag, by, rdx, num;
t_stat r;
@@ -571,7 +571,7 @@ return -1;
<= 0 -number of extra words
*/
t_stat parse_sym_m (char *cptr, t_addr addr, t_value *val)
t_stat parse_sym_m (const char *cptr, t_addr addr, t_value *val)
{
uint32 i, j, t, df, db, inst;
int32 r1, r2;