mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
Rename protected variable to is_protected
This commit is contained in:
parent
cec59bda47
commit
e6ee8db900
@ -1009,8 +1009,8 @@ void show_disk_info() {
|
||||
sprintf(second_buf[i++]+off, "%s %d bytes", (disk6.disk[1].nibblized) ? ".nib" : ".dsk", (int)disk6.disk[1].file_size);
|
||||
|
||||
memset(second_buf[i], ' ', BUF_X);
|
||||
*(second_buf[i] + sprintf(second_buf[i], "write %s", (disk6.disk[0].protected) ? "protected" : "enabled")) = ' ';
|
||||
sprintf(second_buf[i++]+off, "write %s", (disk6.disk[1].protected) ? "protected" : "enabled");
|
||||
*(second_buf[i] + sprintf(second_buf[i], "write %s", (disk6.disk[0].is_protected) ? "protected" : "enabled")) = ' ';
|
||||
sprintf(second_buf[i++]+off, "write %s", (disk6.disk[1].is_protected) ? "protected" : "enabled");
|
||||
|
||||
memset(second_buf[i], ' ', BUF_X);
|
||||
*(second_buf[i] + sprintf(second_buf[i], "phase %d %s", disk6.disk[0].phase, (disk6.disk[0].phase_change) ? "(new)" : "")) = ' ';
|
||||
|
@ -170,14 +170,14 @@ int c_new_diskette_6(int drive, char *file_name, int cmpr, int nib, int force) {
|
||||
{
|
||||
/* Open read only */
|
||||
disk6.disk[drive].fp = fopen(disk6.disk[drive].file_name, "r+");
|
||||
disk6.disk[drive].protected = 0;
|
||||
disk6.disk[drive].is_protected = 0;
|
||||
}
|
||||
|
||||
if ((disk6.disk[drive].fp == NULL) || (force))
|
||||
{
|
||||
/* Open for read AND write */
|
||||
disk6.disk[drive].fp = fopen(disk6.disk[drive].file_name, "r");
|
||||
disk6.disk[drive].protected = 1; /* disk is write protected! */
|
||||
disk6.disk[drive].is_protected = 1; /* disk is write protected! */
|
||||
}
|
||||
|
||||
if (disk6.disk[drive].fp == NULL)
|
||||
@ -572,7 +572,7 @@ GLUE_C_READ(disk_read_byte)
|
||||
return 0; /* Return if there is no disk in drive */
|
||||
}
|
||||
|
||||
if (disk6.disk[disk6.drive].protected)
|
||||
if (disk6.disk[disk6.drive].is_protected)
|
||||
{
|
||||
return 0; /* Do not write if diskette is write protected */
|
||||
|
||||
@ -680,7 +680,7 @@ GLUE_C_READ(disk_read_latch)
|
||||
GLUE_C_READ(disk_read_prepare_in)
|
||||
{
|
||||
disk6.ddrw = 0;
|
||||
return disk6.disk[disk6.drive].protected ? 0x80 : 0x00;
|
||||
return disk6.disk[disk6.drive].is_protected ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(disk_read_prepare_out)
|
||||
|
@ -22,7 +22,7 @@ struct diskette
|
||||
char file_name[1024];
|
||||
int compressed;
|
||||
int nibblized;
|
||||
int protected;
|
||||
int is_protected;
|
||||
int phase_change;
|
||||
int sector;
|
||||
long file_size;
|
||||
|
@ -529,7 +529,7 @@ void c_interface_select_diskette( int drive )
|
||||
strncat(temp, " <gz>", TEMPSIZE-1);
|
||||
}
|
||||
/* write protected disk in drive? */
|
||||
else if ((in_drive) && (disk6.disk[drive].protected))
|
||||
else if ((in_drive) && (disk6.disk[drive].is_protected))
|
||||
{
|
||||
strncat(temp, (drive == 0) ? " <r1>" : " <r2>", TEMPSIZE-1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user