From 493a58b4bfd798ae656f3ef5a429730d40e284dc Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 27 Jan 2024 13:38:03 -1000 Subject: [PATCH] ALTAIRZ80: Avoid use of possible keyword "readonly" on some compilers --- AltairZ80/ibc_mcc_hdc.c | 4 ++-- AltairZ80/ibc_smd_hdc.c | 4 ++-- AltairZ80/s100_hdc1001.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AltairZ80/ibc_mcc_hdc.c b/AltairZ80/ibc_mcc_hdc.c index 227ee641..b0a5ac88 100644 --- a/AltairZ80/ibc_mcc_hdc.c +++ b/AltairZ80/ibc_mcc_hdc.c @@ -87,7 +87,7 @@ typedef struct { UNIT *uptr; - uint8 readonly; /* Drive is read-only? */ + uint8 isreadonly; /* Drive is read-only? */ uint16 sectsize; /* sector size */ uint16 nsectors; /* number of sectors/track */ uint16 nheads; /* number of heads */ @@ -274,7 +274,7 @@ static t_stat ibc_hdc_attach(UNIT *uptr, CONST char *cptr) sim_debug(VERBOSE_MSG, &ibc_hdc_dev, DEV_NAME "%d, attached to '%s', type=DSK, len=%d\n", i, cptr, uptr->capac); - pDrive->readonly = (uptr->flags & UNIT_RO) ? 1 : 0; + pDrive->isreadonly = (uptr->flags & UNIT_RO) ? 1 : 0; ibc_hdc_info->error_reg = 0; pDrive->ready = 1; diff --git a/AltairZ80/ibc_smd_hdc.c b/AltairZ80/ibc_smd_hdc.c index a8deddb9..e2047c61 100644 --- a/AltairZ80/ibc_smd_hdc.c +++ b/AltairZ80/ibc_smd_hdc.c @@ -77,7 +77,7 @@ typedef struct { UNIT *uptr; - uint8 readonly; /* Drive is read-only? */ + uint8 isreadonly; /* Drive is read-only? */ uint16 sectsize; /* sector size */ uint16 nsectors; /* number of sectors/track */ uint16 nheads; /* number of heads */ @@ -266,7 +266,7 @@ static t_stat ibc_smd_attach(UNIT *uptr, CONST char *cptr) sim_debug(VERBOSE_MSG, &ibc_smd_dev, DEV_NAME "%d, attached to '%s', type=DSK, len=%d\n", i, cptr, uptr->capac); - pDrive->readonly = (uptr->flags & UNIT_RO) ? 1 : 0; + pDrive->isreadonly = (uptr->flags & UNIT_RO) ? 1 : 0; ibc_smd_info->error_reg = 0; pDrive->ready = 1; diff --git a/AltairZ80/s100_hdc1001.c b/AltairZ80/s100_hdc1001.c index 017fb53d..88f7ff8e 100644 --- a/AltairZ80/s100_hdc1001.c +++ b/AltairZ80/s100_hdc1001.c @@ -115,7 +115,7 @@ static char* hdc1001_reg_wr_str[] = { typedef struct { UNIT *uptr; - uint8 readonly; /* Drive is read-only? */ + uint8 isreadonly; /* Drive is read-only? */ uint16 sectsize; /* sector size */ uint16 nsectors; /* number of sectors/track */ uint16 nheads; /* number of heads */ @@ -295,7 +295,7 @@ static t_stat hdc1001_attach(UNIT *uptr, CONST char *cptr) sim_debug(VERBOSE_MSG, &hdc1001_dev, DEV_NAME "%d, attached to '%s', type=DSK, len=%d\n", i, cptr, uptr->capac); - pDrive->readonly = (uptr->flags & UNIT_RO) ? 1 : 0; + pDrive->isreadonly = (uptr->flags & UNIT_RO) ? 1 : 0; hdc1001_info->error_reg = 0; pDrive->ready = 1; @@ -626,7 +626,7 @@ static t_stat HDC1001_doCommand(void) break; case HDC1001_CMD_WRITE_SECT: /* If drive is read-only, signal a write fault. */ - if (pDrive->readonly) { + if (pDrive->isreadonly) { hdc1001_info->status_reg |= HDC1001_STATUS_ERROR; hdc1001_info->status_reg |= HDC1001_STATUS_WRITE_FAULT; break; @@ -696,7 +696,7 @@ static t_stat HDC1001_doCommand(void) uint8 *fmtBuffer; /* If drive is read-only, signal a write fault. */ - if (pDrive->readonly) { + if (pDrive->isreadonly) { hdc1001_info->status_reg |= HDC1001_STATUS_ERROR; hdc1001_info->status_reg |= HDC1001_STATUS_WRITE_FAULT; hdc1001_info->status_reg |= HDC1001_STATUS_DRQ;