Fix formatting of ZealC postfix pointer casts in ISO9660 code.

This commit is contained in:
TomAwezome 2022-04-16 17:31:48 -04:00
parent b5d80ca147
commit 88fe6b59ba
2 changed files with 27 additions and 27 deletions

View file

@ -119,7 +119,7 @@ Bool ISOFileFind(CDrive *drive, I64 cur_dir_clus, U8 *name, CDirEntry *_res, I64
{
if (!isoptr->len)
{
isoptr(U8*)++;
isoptr(U8 *)++;
i--;
}
else
@ -139,7 +139,7 @@ Bool ISOFileFind(CDrive *drive, I64 cur_dir_clus, U8 *name, CDirEntry *_res, I64
}
}
i -= isoptr->len;
isoptr(U8*) += isoptr->len;
isoptr(U8 *) += isoptr->len;
}
}
iff_done:
@ -231,7 +231,7 @@ CDirEntry *ISOFilesFind(U8 *files_find_mask, I64 fuf_flags, CDirEntry *parent =
{
if (!buf->len)
{
buf(U8*) ++;
buf(U8 *) ++;
i--;
}
else
@ -268,7 +268,7 @@ CDirEntry *ISOFilesFind(U8 *files_find_mask, I64 fuf_flags, CDirEntry *parent =
else
DirEntryDel(tmpde);
i -= buf->len;
buf(U8*) += buf->len;
buf(U8 *) += buf->len;
}
}
Free(buf2);

View file

@ -29,7 +29,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
de->name_len = 1;
de->name = 0;
de->len += de->name_len;
de(U8*) += de->len;
de(U8 *) += de->len;
de->len = sizeof(CISODirEntry) - 1;
de->ext_attr_len = 0;
@ -41,7 +41,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
de->name_len = 1;
de->name = 1;
de->len += de->name_len;
de(U8*) += de->len;
de(U8 *) += de->len;
de2->len = sizeof(CISODirEntry) - 1;
de2->ext_attr_len = 0;
@ -51,7 +51,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
de2->name_len = 1;
de2->name = 0;
de2->len += de2->name_len;
de2(U8*) += de2->len;
de2(U8 *) += de2->len;
de2->len = sizeof(CISODirEntry) - 1;
de2->ext_attr_len = 0;
@ -63,7 +63,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
de2->name_len = 1;
de2->name = 1;
de2->len += de2->name_len;
de2(U8*) += de2->len;
de2(U8 *) += de2->len;
tmpde1 = tmpde->sub;
while (tmpde1)
@ -77,8 +77,8 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
{
n = DVDFileCreate2(out_file, tmpde1, de, de2, _cur_blk,
tmpde, write, stage2_filename, _stage2_blk);
de(U8*) += sizeof(CISODirEntry) - 1 + n;
de2(U8*) += sizeof(CISODirEntry) - 1 + n << 1;
de(U8 *) += sizeof(CISODirEntry) - 1 + n;
de2(U8 *) += sizeof(CISODirEntry) - 1 + n << 1;
}
else
{
@ -104,7 +104,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
de->name_len = StrLen(tmpde1->name);
StrCopy(&de->name, tmpde1->name);
de->len = de->len + de->name_len;
de(U8*) += de->len;
de(U8 *) += de->len;
de2->len = sizeof(CISODirEntry) - 1;
de2->ext_attr_len = 0;
@ -122,7 +122,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
*ptr1++ = *ptr2++;
}
de2->len += de2->name_len;
de2(U8*) += de2->len;
de2(U8 *) += de2->len;
in_file = FOpen(tmpde1->full_name, "r");
for (i = 0; i < (FSize(in_file) + DVD_BLK_SIZE - 1) / DVD_BLK_SIZE; i++)
@ -142,26 +142,26 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
}
FClose(in_file);
}
if ((de1(U8*) - dir_blk_buf(U8*)) / DVD_BLK_SIZE !=
(de(U8*) - dir_blk_buf(U8*)) / DVD_BLK_SIZE)
if ((de1(U8 *) - dir_blk_buf(U8 *)) / DVD_BLK_SIZE !=
(de(U8 *) - dir_blk_buf(U8 *)) / DVD_BLK_SIZE)
{
i = de1->len;
MemCopy(buf, de1, i);
MemSet(de1, 0, i);
de = dir_blk_buf(U8*) + (de(U8*) - dir_blk_buf(U8*)) / DVD_BLK_SIZE * DVD_BLK_SIZE;
de = dir_blk_buf(U8 *) + (de(U8 *) - dir_blk_buf(U8 *)) / DVD_BLK_SIZE * DVD_BLK_SIZE;
MemCopy(de, buf, i);
de(U8*) += i;
de(U8 *) += i;
}
if ((de12(U8*) - dir_blk_buf2(U8*)) / DVD_BLK_SIZE !=
(de2(U8*) - dir_blk_buf2(U8*)) / DVD_BLK_SIZE)
if ((de12(U8 *) - dir_blk_buf2(U8 *)) / DVD_BLK_SIZE !=
(de2(U8 *) - dir_blk_buf2(U8 *)) / DVD_BLK_SIZE)
{
i = de12->len;
MemCopy(buf, de12, i);
MemSet(de12, 0, i);
de2(U8*) = dir_blk_buf2(U8*) + (de2(U8*) -
dir_blk_buf2(U8*)) / DVD_BLK_SIZE * DVD_BLK_SIZE;
de2(U8 *) = dir_blk_buf2(U8 *) + (de2(U8 *) -
dir_blk_buf2(U8 *)) / DVD_BLK_SIZE * DVD_BLK_SIZE;
MemCopy(de2, buf, i);
de2(U8*) += i;
de2(U8 *) += i;
}
tmpde1 = tmpde2;
}
@ -183,7 +183,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
}
tmpi->len += tmpi->name_len;
n = de(U8*) + 1 - dir_blk_buf(U8*);
n = de(U8 *) + 1 - dir_blk_buf(U8 *);
n = (n + DVD_BLK_SIZE - 1) / DVD_BLK_SIZE;
FillU32Palindrome(&tmpi->size, n * DVD_BLK_SIZE);
FillU32Palindrome(&tmpi->loc, *_cur_blk);
@ -219,7 +219,7 @@ I64 DVDFileCreate2(CFile *out_file, CDirEntry *tmpde, CISODirEntry *tmpi,
}
}
tmpi2->len += tmpi2->name_len;
n = de2(U8*) + 1 - dir_blk_buf2(U8*);
n = de2(U8 *) + 1 - dir_blk_buf2(U8 *);
n = (n + DVD_BLK_SIZE - 1) / DVD_BLK_SIZE;
FillU32Palindrome(&tmpi2->size, n * DVD_BLK_SIZE);
FillU32Palindrome(&tmpi2->loc, *_cur_blk);
@ -292,7 +292,7 @@ U0 DVDFillPathTable(CDirEntry *tmpde,
}
StrCopy(&tabbuf->name, tmpde1->name);
tabbuf(U8*) += sizeof(CISOPathEntry) - 2 + (StrLen(tmpde1->name) + 1) & -0x2;
tabbuf(U8 *) += sizeof(CISOPathEntry) - 2 + (StrLen(tmpde1->name) + 1) & -0x2;
tabbuf2->name_len = StrLen(tmpde1->name) << 1;
if (big_endian)
@ -312,7 +312,7 @@ U0 DVDFillPathTable(CDirEntry *tmpde,
ptr1++;
*ptr1++ = *ptr2++;
}
tabbuf2(U8*) += sizeof(CISOPathEntry) - 2 + StrLen(tmpde1->name) << 1;
tabbuf2(U8 *) += sizeof(CISOPathEntry) - 2 + StrLen(tmpde1->name) << 1;
*first_free += 1;
}
tmpde1 = tmpde1->next;
@ -421,13 +421,13 @@ public I64 ISO9660ISO(U8 *_filename = NULL, U8 *src_files_find_mask,
iso_boot->type = ISOT_BOOT_RECORD;
StrCopy(iso_boot->id, "CD001");
iso_boot->version = 1;
StrCopy(iso_boot(U8*) + 7, "EL TORITO SPECIFICATION");
StrCopy(iso_boot(U8 *) + 7, "EL TORITO SPECIFICATION");
cur_blk = 20 << 2 >> 2;
if (stage2_filename)
{
d = iso_boot(U8*) + 0x47;
d = iso_boot(U8 *) + 0x47;
*d = cur_blk;
et->w[0] = 1;
StrCopy(&et->w[2], "ZealOS");