1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

Cleaned up parameter declarations in all simulators to achieve clean compiles on all platforms

Very minor in all cases, but the strange case of swtp_cpu.c
This module used expressions of the form:
   PC = ++PC & ADDRMASK;
Officially, the C language says that expressions which modify the same variable in more than one place have undefined behavior.
These were changed to the legal form which performs the desired action:
   PC = (PC + 1) & ADDRMASK;
This commit is contained in:
Mark Pizzolato
2011-04-15 09:04:39 -07:00
parent eb514e2a8d
commit a6964f849d
32 changed files with 126 additions and 125 deletions

View File

@@ -5957,12 +5957,12 @@ int32 Debug_Entry(int32 PC, int32 inst, int32 inst2, int32 AC0, int32 AC1, int32
return 0;
}
int32 Debug_Dump(UNIT *uptr, int32 val, char *cptr, void *desc)
t_stat Debug_Dump(UNIT *uptr, int32 val, char *cptr, void *desc)
{
return SCPE_OK;
}
int32 Dump_History (FILE *st, UNIT *uptr, int32 val, void *desc)
t_stat Dump_History (FILE *st, UNIT *uptr, int32 val, void *desc)
{
char debmap[4], debion[4];
t_value simeval[20];

View File

@@ -223,14 +223,14 @@
struct ndev {
int32 mask; /* done/busy mask */
int32 pi; /* assigned pi bit */
int32 (*routine)(); /* dispatch routine */
int32 (*routine)(int32, int32, int32); /* dispatch routine */
};
typedef struct {
int32 dnum; /* device number */
int32 mask; /* done/busy mask */
int32 pi; /* assigned pi bit */
int32 (*routine)(); /* dispatch routine */
int32 (*routine)(int32, int32, int32); /* dispatch routine */
} DIB;
/* Device flags (simulator representation)

View File

@@ -861,7 +861,8 @@ return SCPE_ARG;
char *get_addr (char *cptr, t_addr addr, t_bool ext, int32 cflag, int32 *val)
{
int32 d, r, x, pflag;
int32 d, x, pflag;
t_stat r;
char gbuf[CBUFSIZE];
int32 dmax, dsign;