mirror of
https://github.com/simh/simh.git
synced 2026-04-29 13:12:13 +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:
@@ -507,10 +507,10 @@ typedef struct {
|
||||
int32 sio_can_read; /* bit mask to indicate that one can read from this port */
|
||||
int32 sio_cannot_read; /* bit mask to indicate that one cannot read from this port */
|
||||
int32 sio_can_write; /* bit mask to indicate that one can write to this port */
|
||||
int32 hasReset; /* TRUE iff SIO has reset command */
|
||||
t_bool hasReset; /* TRUE iff SIO has reset command */
|
||||
int32 sio_reset; /* reset command */
|
||||
int32 hasOUT; /* TRUE iff port supports OUT command */
|
||||
int32 isBuiltin; /* TRUE iff mapping is built in */
|
||||
t_bool hasOUT; /* TRUE iff port supports OUT command */
|
||||
t_bool isBuiltin; /* TRUE iff mapping is built in */
|
||||
} SIO_PORT_INFO;
|
||||
|
||||
static SIO_PORT_INFO port_table[PORT_TABLE_SIZE] = {
|
||||
|
||||
@@ -632,8 +632,8 @@ static int32 doWrite(void) {
|
||||
hdskbuf[i] = GetBYTEWrapper(selectedDMA + i);
|
||||
rtn = sim_fwrite(hdskbuf, 1, uptr -> HDSK_SECTOR_SIZE, uptr -> fileref);
|
||||
if (rtn != (size_t)(uptr -> HDSK_SECTOR_SIZE)) {
|
||||
TRACE_PRINT(VERBOSE_MSG, ("HDSK%d: " ADDRESS_FORMAT " Could not write Sector=%02d Track=%04d Result=%zd." NLP,
|
||||
selectedDisk, PCX, selectedSector, selectedTrack, rtn));
|
||||
TRACE_PRINT(VERBOSE_MSG, ("HDSK%d: " ADDRESS_FORMAT " Could not write Sector=%02d Track=%04d Result=%d." NLP,
|
||||
selectedDisk, PCX, selectedSector, selectedTrack, (int)rtn));
|
||||
return CPM_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,8 +475,8 @@ static char *messages[0x20] = {
|
||||
uint8 I8272_Write(const uint32 Addr, uint8 cData)
|
||||
{
|
||||
I8272_DRIVE_INFO *pDrive;
|
||||
unsigned int flags = 0;
|
||||
unsigned int readlen;
|
||||
uint32 flags = 0;
|
||||
uint32 readlen;
|
||||
uint8 disk_read = 0;
|
||||
int32 i;
|
||||
|
||||
|
||||
@@ -421,8 +421,8 @@ static uint8 MFDC_Read(const uint32 Addr)
|
||||
if(mfdc_info->datacount == 0) {
|
||||
unsigned int i, checksum;
|
||||
unsigned long sec_offset;
|
||||
unsigned int flags;
|
||||
unsigned int readlen;
|
||||
uint32 flags;
|
||||
uint32 readlen;
|
||||
|
||||
/* Clear out unused portion of sector. */
|
||||
memset(&sdata.u.unused[0], 0x00, 10);
|
||||
@@ -524,8 +524,8 @@ static uint8 MFDC_Read(const uint32 Addr)
|
||||
static uint8 MFDC_Write(const uint32 Addr, uint8 cData)
|
||||
{
|
||||
unsigned int sec_offset;
|
||||
unsigned int flags = 0;
|
||||
unsigned int writelen;
|
||||
uint32 flags = 0;
|
||||
uint32 writelen;
|
||||
MFDC_DRIVE_INFO *pDrive;
|
||||
|
||||
pDrive = &mfdc_info->drive[mfdc_info->sel_drive];
|
||||
|
||||
@@ -547,7 +547,7 @@ static void VFDHD_Command(void)
|
||||
|
||||
if(vfdhd_info->read == 1) { /* Perform a Read operation */
|
||||
unsigned int i, checksum;
|
||||
unsigned int readlen;
|
||||
uint32 readlen;
|
||||
|
||||
TRACE_PRINT(RD_DATA_MSG, ("VFDHD: " ADDRESS_FORMAT " RD: Drive=%d, Track=%d, Head=%d, Sector=%d" NLP,
|
||||
PCX,
|
||||
@@ -619,7 +619,7 @@ static void VFDHD_Command(void)
|
||||
}
|
||||
|
||||
} else { /* Perform a Write operation */
|
||||
unsigned int writelen;
|
||||
uint32 writelen;
|
||||
|
||||
TRACE_PRINT(WR_DATA_MSG, ("VFDHD: " ADDRESS_FORMAT " WR: Drive=%d, Track=%d, Head=%d, Sector=%d" NLP,
|
||||
PCX,
|
||||
|
||||
@@ -445,8 +445,8 @@ uint8 WD179X_Read(const uint32 Addr)
|
||||
{
|
||||
uint8 cData;
|
||||
WD179X_DRIVE_INFO *pDrive;
|
||||
unsigned int flags = 0;
|
||||
unsigned int readlen;
|
||||
uint32 flags = 0;
|
||||
uint32 readlen;
|
||||
int status;
|
||||
|
||||
if(wd179x_info->sel_drive >= WD179X_MAX_DRIVES) {
|
||||
@@ -578,8 +578,8 @@ static uint8 Do1793Command(uint8 cCommand)
|
||||
{
|
||||
uint8 result = 0;
|
||||
WD179X_DRIVE_INFO *pDrive;
|
||||
unsigned int flags = 0;
|
||||
unsigned int readlen;
|
||||
uint32 flags = 0;
|
||||
uint32 readlen;
|
||||
int status;
|
||||
|
||||
if(wd179x_info->sel_drive >= WD179X_MAX_DRIVES) {
|
||||
@@ -955,8 +955,8 @@ uint8 WD179X_Write(const uint32 Addr, uint8 cData)
|
||||
{
|
||||
WD179X_DRIVE_INFO *pDrive;
|
||||
/* uint8 disk_read = 0; */
|
||||
unsigned int flags = 0;
|
||||
unsigned int writelen;
|
||||
uint32 flags = 0;
|
||||
uint32 writelen;
|
||||
|
||||
if(wd179x_info->sel_drive >= WD179X_MAX_DRIVES) {
|
||||
return 0xFF;
|
||||
|
||||
Reference in New Issue
Block a user