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

@@ -398,13 +398,13 @@ extern t_stat sim_activate (UNIT *uptr, int32 delay);
extern int32 fprint_sym (FILE *of, int32 addr, uint32 *val,
UNIT *uptr, int32 sw);
int32 nulldev (int32 opcode, int32 m, int32 n, int32 data);
int add_zoned (int32 addr1, int32 len1, int32 addr2, int32 len2);
int32 add_zoned (int32 addr1, int32 len1, int32 addr2, int32 len2);
int32 subtract_zoned (int32 addr1, int32 len1, int32 addr2, int32 len2);
static int32 compare(int32 byte1, int32 byte2, int32 cond);
static int32 condition(int32 qbyte);
static void store_decimal (int32 addr, int32 len, uint8 *dec, int sign);
static void load_decimal (int32 addr, int32 len, uint8 *result, int32 *count, int32 *sign);
static void add_decimal (uint8 *dec1, uint8 *dec2, uint8 *result, int32 *count);
static void load_decimal (int32 addr, int32 len, uint8 *result, int *count, int *sign);
static void add_decimal (uint8 *dec1, uint8 *dec2, uint8 *result, int *count);
static void subtract_decimal (uint8 *dec1, uint8 *dec2, uint8 *result, int *count, int *sign);
int32 GetMem(int32 addr);
int32 PutMem(int32 addr, int32 data);
@@ -1541,7 +1541,7 @@ int sign1, sign2, sign3; /* Sign of operands & result */
/* This field is set to zero if the result is all zero, */
/* or to MAX_DECIMAL_DIGITS+1 if overflow occurred. */
/*-------------------------------------------------------------------*/
static void add_decimal (uint8 *dec1, uint8 *dec2, uint8 *result, int32 *count)
static void add_decimal (uint8 *dec1, uint8 *dec2, uint8 *result, int *count)
{
int d; /* Decimal digit */
int i; /* Array subscript */
@@ -1684,7 +1684,7 @@ uint8 *lower; /* -> Lower value operand */
/* exception, or if the operand causes a data exception */
/* because of invalid decimal digits or sign. */
/*-------------------------------------------------------------------*/
static void load_decimal (int32 addr, int32 len, uint8 *result, int32 *count, int32 *sign)
static void load_decimal (int32 addr, int32 len, uint8 *result, int *count, int *sign)
{
int h; /* Hexadecimal digit */
int i, j; /* Array subscripts */

View File

@@ -67,7 +67,7 @@
struct ndev {
int32 level; /* interrupt level */
int32 pri; /* Device priority */
int32 (*routine)(); /* dispatch routine */
int32 (*routine)(int32, int32, int32, int32); /* dispatch routine */
};
/* Structure to define operation codes */