Skip to content

Commit 5531ccb

Browse files
committedMay 15, 2016
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.
1 parent 60a8a2d commit 5531ccb

File tree

444 files changed

+4123
-3802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+4123
-3802
lines changed
 

‎ALTAIR/altair_cpu.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int32 PCX; /* External view of PC *
113113
t_stat cpu_ex (t_value *vptr, t_addr addr, UNIT *uptr, int32 sw);
114114
t_stat cpu_dep (t_value val, t_addr addr, UNIT *uptr, int32 sw);
115115
t_stat cpu_reset (DEVICE *dptr);
116-
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
116+
t_stat cpu_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
117117
void setarith(int32 reg);
118118
void setlogical(int32 reg);
119119
void setinc(int32 reg);
@@ -1163,7 +1163,7 @@ t_stat cpu_dep (t_value val, t_addr addr, UNIT *uptr, int32 sw)
11631163
return SCPE_OK;
11641164
}
11651165

1166-
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
1166+
t_stat cpu_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
11671167
{
11681168
int32 mc = 0;
11691169
uint32 i;

‎ALTAIR/altair_sys.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int32 oplen[256] = {
153153
load starts at the current value of the PC.
154154
*/
155155

156-
t_stat sim_load (FILE *fileref, char *cptr, char *fnam, int flag)
156+
t_stat sim_load (FILE *fileref, CONST char *cptr, CONST char *fnam, int flag)
157157
{
158158
int32 i, addr = 0, cnt = 0;
159159

@@ -234,7 +234,7 @@ return -(oplen[inst] - 1);
234234
status = error status
235235
*/
236236

237-
t_stat parse_sym (char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
237+
t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
238238
{
239239
int32 cflag, i = 0, j, r;
240240
char gbuf[CBUFSIZE];

0 commit comments

Comments
 (0)
Please sign in to comment.