Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 301387 Details for
Bug 255644
app-emulation/basiliskII-jit: a lot improved ebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
file_handle.patch
file_handle.patch (text/plain), 25.10 KB, created by
Martin Mokrejš
on 2012-02-09 14:02:31 UTC
(
hide
)
Description:
file_handle.patch
Filename:
MIME Type:
Creator:
Martin Mokrejš
Created:
2012-02-09 14:02:31 UTC
Size:
25.10 KB
patch
obsolete
>diff -u -w -r BasiliskII-1.0/src/AmigaOS/sys_amiga.cpp BasiliskII-1.0/src/AmigaOS/sys_amiga.cpp >--- BasiliskII-1.0/src/AmigaOS/sys_amiga.cpp.ori 2002-06-23 10:27:05.000000000 +0200 >+++ BasiliskII-1.0/src/AmigaOS/sys_amiga.cpp 2012-02-09 14:30:24.000000000 +0100 >@@ -44,7 +44,7 @@ > > > // File handles are pointers to these structures >-struct file_handle { >+struct basilisk_file_handle { > bool is_file; // Flag: plain file or /dev/something? > bool read_only; // Copy of Sys_open() flag > loff_t start_byte; // Size of file header (if any) >@@ -189,8 +189,8 @@ > if (FIB.fib_Protection & FIBF_WRITE) > read_only = true; > >- // Create file_handle >- file_handle *fh = new file_handle; >+ // Create basilisk_file_handle >+ basilisk_file_handle *fh = new basilisk_file_handle; > fh->f = f; > fh->is_file = true; > fh->read_only = read_only; >@@ -255,8 +255,8 @@ > } > } > >- // Create file_handle >- file_handle *fh = new file_handle; >+ // Create basilisk_file_handle >+ basilisk_file_handle *fh = new basilisk_file_handle; > fh->io = io; > fh->is_file = false; > fh->read_only = read_only; >@@ -278,7 +278,7 @@ > > void Sys_close(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -311,7 +311,7 @@ > * Send one I/O request, using 64-bit addressing if the device supports it > */ > >-static loff_t send_io_request(file_handle *fh, bool writing, ULONG length, loff_t offset, APTR data) >+static loff_t send_io_request(basilisk_file_handle *fh, bool writing, ULONG length, loff_t offset, APTR data) > { > if (fh->does_64bit) { > fh->io->io_Command = writing ? NSCMD_TD_WRITE64 : NSCMD_TD_READ64; >@@ -403,7 +403,7 @@ > > size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > { > D(bug("Sys_read/%ld return 0\n", __LINE__)); >@@ -509,7 +509,7 @@ > > size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > { > D(bug("Sys_write/%ld return %ld\n", __LINE__, 0)); >@@ -628,7 +628,7 @@ > > loff_t SysGetFileSize(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -642,7 +642,7 @@ > > void SysEject(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -671,7 +671,7 @@ > > bool SysFormat(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -686,7 +686,7 @@ > > bool SysIsReadOnly(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -714,7 +714,7 @@ > > bool SysIsFixedDisk(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -728,7 +728,7 @@ > > bool SysIsDiskInserted(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -763,7 +763,7 @@ > > void SysPreventRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -791,7 +791,7 @@ > > void SysAllowRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -819,7 +819,7 @@ > > bool SysCDReadTOC(void *arg, uint8 *toc) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -853,7 +853,7 @@ > > bool SysCDGetPosition(void *arg, uint8 *pos) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -887,7 +887,7 @@ > > bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -920,7 +920,7 @@ > > bool SysCDPause(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -953,7 +953,7 @@ > > bool SysCDResume(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -986,7 +986,7 @@ > > bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -1031,7 +1031,7 @@ > > bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -1046,7 +1046,7 @@ > > void SysCDSetVolume(void *arg, uint8 left, uint8 right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -1096,7 +1096,7 @@ > > void SysCDGetVolume(void *arg, uint8 &left, uint8 &right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >diff -u -w -r BasiliskII-1.0/src/BeOS/sys_beos.cpp BasiliskII-1.0/src/BeOS/sys_beos.cpp >--- BasiliskII-1.0/src/BeOS/sys_beos.cpp.ori 2005-01-30 22:42:13.000000000 +0100 >+++ BasiliskII-1.0/src/BeOS/sys_beos.cpp 2012-02-09 14:30:24.000000000 +0100 >@@ -42,8 +42,8 @@ > > > // File handles are pointers to these structures >-struct file_handle { >- file_handle *next; // Pointer to next file handle (must be first in struct!) >+struct basilisk_file_handle { >+ basilisk_file_handle *next; // Pointer to next file handle (must be first in struct!) > const char *name; // File/device name (copied, for mount menu) > int fd; // fd of file/device > bool is_file; // Flag: plain file or /dev/something? >@@ -53,7 +53,7 @@ > }; > > // Linked list of file handles >-static file_handle *first_file_handle; >+static basilisk_file_handle *first_basilisk_file_handle; > > // Temporary buffer for transfers from/to kernel space > const int TMP_BUF_SIZE = 0x10000; >@@ -104,7 +104,7 @@ > > void SysInit(void) > { >- first_file_handle = NULL; >+ first_basilisk_file_handle = NULL; > > // Allocate temporary buffer > tmp_buf = new uint8[TMP_BUF_SIZE]; >@@ -127,7 +127,7 @@ > > void SysCreateVolumeMenu(BMenu *menu, uint32 msg) > { >- for (file_handle *fh=first_file_handle; fh; fh=fh->next) >+ for (basilisk_file_handle *fh=first_basilisk_file_handle; fh; fh=fh->next) > if (!SysIsFixedDisk(fh)) > menu->AddItem(new BMenuItem(fh->name, new BMessage(msg))); > } >@@ -139,8 +139,8 @@ > > void SysMountVolume(const char *name) > { >- file_handle *fh; >- for (fh=first_file_handle; fh && strcmp(fh->name, name); fh=fh->next) ; >+ basilisk_file_handle *fh; >+ for (fh=first_basilisk_file_handle; fh && strcmp(fh->name, name); fh=fh->next) ; > if (fh) > MountVolume(fh); > } >@@ -336,7 +336,7 @@ > fd = open(name, read_only ? O_RDONLY : O_RDWR); > } > if (fd >= 0) { >- file_handle *fh = new file_handle; >+ basilisk_file_handle *fh = new basilisk_file_handle; > fh->name = strdup(name); > fh->fd = fd; > fh->is_file = is_file; >@@ -353,13 +353,13 @@ > > // Enqueue file handle > fh->next = NULL; >- file_handle *q = first_file_handle; >+ basilisk_file_handle *q = first_basilisk_file_handle; > if (q) { > while (q->next) > q = q->next; > q->next = fh; > } else >- first_file_handle = fh; >+ first_basilisk_file_handle = fh; > return fh; > } else > return NULL; >@@ -372,7 +372,7 @@ > > void Sys_close(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -381,9 +381,9 @@ > close(fh->fd); > > // Dequeue file handle >- file_handle *q = first_file_handle; >+ basilisk_file_handle *q = first_basilisk_file_handle; > if (q == fh) { >- first_file_handle = NULL; >+ first_basilisk_file_handle = NULL; > delete fh; > return; > } >@@ -412,7 +412,7 @@ > > size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return 0; > >@@ -462,7 +462,7 @@ > > size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return 0; > >@@ -504,7 +504,7 @@ > > loff_t SysGetFileSize(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -526,7 +526,7 @@ > > void SysEject(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -541,7 +541,7 @@ > > bool SysFormat(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -558,7 +558,7 @@ > > bool SysIsReadOnly(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -585,7 +585,7 @@ > > bool SysIsFixedDisk(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -607,7 +607,7 @@ > > bool SysIsDiskInserted(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -629,7 +629,7 @@ > > void SysPreventRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -644,7 +644,7 @@ > > void SysAllowRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -659,7 +659,7 @@ > > bool SysCDReadTOC(void *arg, uint8 *toc) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -680,7 +680,7 @@ > > bool SysCDGetPosition(void *arg, uint8 *pos) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -700,7 +700,7 @@ > > bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -724,7 +724,7 @@ > > bool SysCDPause(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -741,7 +741,7 @@ > > bool SysCDResume(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -758,7 +758,7 @@ > > bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -775,7 +775,7 @@ > > bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -795,7 +795,7 @@ > > void SysCDSetVolume(void *arg, uint8 left, uint8 right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -815,7 +815,7 @@ > > void SysCDGetVolume(void *arg, uint8 &left, uint8 &right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >diff -u -w -r BasiliskII-1.0/src/Unix/sys_unix.cpp BasiliskII-1.0/src/Unix/sys_unix.cpp >--- BasiliskII-1.0/src/Unix/sys_unix.cpp.ori 2012-02-09 14:31:35.000000000 +0100 >+++ BasiliskII-1.0/src/Unix/sys_unix.cpp 2012-02-09 14:30:24.000000000 +0100 >@@ -53,7 +53,7 @@ > > > // File handles are pointers to these structures >-struct file_handle { >+struct basilisk_file_handle { > char *name; // Copy of device/file name > int fd; > bool is_file; // Flag: plain file or /dev/something? >@@ -74,7 +74,7 @@ > }; > > // File handle of first floppy drive (for SysMountFirstFloppy()) >-static file_handle *first_floppy = NULL; >+static basilisk_file_handle *first_floppy = NULL; > > > /* >@@ -363,7 +363,7 @@ > fd = open(name, O_RDONLY); > } > if (fd >= 0 || is_floppy) { // Floppy open fails if there's no disk inserted >- file_handle *fh = new file_handle; >+ basilisk_file_handle *fh = new basilisk_file_handle; > fh->name = strdup(name); > fh->fd = fd; > fh->is_file = is_file; >@@ -456,7 +456,7 @@ > > void Sys_close(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -475,7 +475,7 @@ > > size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return 0; > >@@ -495,7 +495,7 @@ > > size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return 0; > >@@ -514,7 +514,7 @@ > > loff_t SysGetFileSize(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -540,7 +540,7 @@ > > void SysEject(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -603,7 +603,7 @@ > > bool SysFormat(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -618,7 +618,7 @@ > > bool SysIsReadOnly(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -642,7 +642,7 @@ > > bool SysIsFixedDisk(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -661,7 +661,7 @@ > > bool SysIsDiskInserted(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -717,7 +717,7 @@ > > void SysPreventRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -734,7 +734,7 @@ > > void SysAllowRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -751,7 +751,7 @@ > > bool SysCDReadTOC(void *arg, uint8 *toc) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -890,7 +890,7 @@ > > bool SysCDGetPosition(void *arg, uint8 *pos) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -955,7 +955,7 @@ > > bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -992,7 +992,7 @@ > > bool SysCDPause(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -1015,7 +1015,7 @@ > > bool SysCDResume(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -1038,7 +1038,7 @@ > > bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -1061,7 +1061,7 @@ > > bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -1076,7 +1076,7 @@ > > void SysCDSetVolume(void *arg, uint8 left, uint8 right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -1102,7 +1102,7 @@ > > void SysCDGetVolume(void *arg, uint8 &left, uint8 &right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >diff -u -w -r BasiliskII-1.0/src/Windows/sys_windows.cpp BasiliskII-1.0/src/Windows/sys_windows.cpp >--- BasiliskII-1.0/src/Windows/sys_windows.cpp.ori 2006-03-28 09:01:19.000000000 +0200 >+++ BasiliskII-1.0/src/Windows/sys_windows.cpp 2012-02-09 14:30:24.000000000 +0100 >@@ -54,7 +54,7 @@ > }; > > // File handles are pointers to these structures >-struct file_handle { >+struct basilisk_file_handle { > char *name; // Copy of device/file name > HANDLE fh; > bool is_file; // Flag: plain file or physical device? >@@ -68,21 +68,21 @@ > }; > > // Open file handles >-struct open_file_handle { >- file_handle *fh; >- open_file_handle *next; >+struct open_basilisk_file_handle { >+ basilisk_file_handle *fh; >+ open_basilisk_file_handle *next; > }; >-static open_file_handle *open_file_handles = NULL; >+static open_basilisk_file_handle *open_basilisk_file_handles = NULL; > > // File handle of first floppy drive (for SysMountFirstFloppy()) >-static file_handle *first_floppy = NULL; >+static basilisk_file_handle *first_floppy = NULL; > > // CD-ROM variables > static const int CD_READ_AHEAD_SECTORS = 16; > static char *sector_buffer = NULL; > > // Prototypes >-static bool is_cdrom_readable(file_handle *fh); >+static bool is_cdrom_readable(basilisk_file_handle *fh); > > > /* >@@ -114,25 +114,25 @@ > * Manage open file handles > */ > >-static void sys_add_file_handle(file_handle *fh) >+static void sys_add_basilisk_file_handle(basilisk_file_handle *fh) > { >- open_file_handle *p = new open_file_handle; >+ open_basilisk_file_handle *p = new open_basilisk_file_handle; > p->fh = fh; >- p->next = open_file_handles; >- open_file_handles = p; >+ p->next = open_basilisk_file_handles; >+ open_basilisk_file_handles = p; > } > >-static void sys_remove_file_handle(file_handle *fh) >+static void sys_remove_basilisk_file_handle(basilisk_file_handle *fh) > { >- open_file_handle *p = open_file_handles; >- open_file_handle *q = NULL; >+ open_basilisk_file_handle *p = open_basilisk_file_handles; >+ open_basilisk_file_handle *q = NULL; > > while (p) { > if (p->fh == fh) { > if (q) > q->next = p->next; > else >- open_file_handles = p->next; >+ open_basilisk_file_handles = p->next; > delete p; > break; > } >@@ -148,8 +148,8 @@ > > void mount_removable_media(int media) > { >- for (open_file_handle *p = open_file_handles; p != NULL; p = p->next) { >- file_handle * const fh = p->fh; >+ for (open_basilisk_file_handle *p = open_basilisk_file_handles; p != NULL; p = p->next) { >+ basilisk_file_handle * const fh = p->fh; > > if (fh->is_cdrom && (media & MEDIA_CD)) { > cache_clear(&fh->cache); >@@ -266,7 +266,7 @@ > * Can't give too much however, would be annoying, this is difficult.. > */ > >-static inline int cd_read_with_retry(file_handle *fh, ULONG LBA, int count, char *buf ) >+static inline int cd_read_with_retry(basilisk_file_handle *fh, ULONG LBA, int count, char *buf ) > { > if (!fh || !fh->fh) > return 0; >@@ -274,7 +274,7 @@ > return CdenableSysReadCdBytes(fh->fh, LBA, count, buf); > } > >-static int cd_read(file_handle *fh, cachetype *cptr, ULONG LBA, int count, char *buf) >+static int cd_read(basilisk_file_handle *fh, cachetype *cptr, ULONG LBA, int count, char *buf) > { > ULONG l1, l2, cc; > int i, c_count, got_bytes = 0, nblocks, s_inx, ss, first_block; >@@ -373,7 +373,7 @@ > * Check if file handle FH represents a readable CD-ROM > */ > >-static bool is_cdrom_readable(file_handle *fh) >+static bool is_cdrom_readable(basilisk_file_handle *fh) > { > if (!fh || !fh->fh) > return false; >@@ -418,7 +418,7 @@ > > void *Sys_open(const char *path_name, bool read_only) > { >- file_handle * fh = NULL; >+ basilisk_file_handle * fh = NULL; > > // Parse path name and options > char name[MAX_PATH]; >@@ -448,7 +448,7 @@ > 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); > > if (h != INVALID_HANDLE_VALUE) { >- fh = new file_handle; >+ fh = new basilisk_file_handle; > fh->name = strdup(name); > fh->fh = h; > fh->is_file = false; >@@ -487,7 +487,7 @@ > } > > if (h != INVALID_HANDLE_VALUE) { >- fh = new file_handle; >+ fh = new basilisk_file_handle; > fh->name = strdup(name); > fh->fh = h; > fh->is_file = true; >@@ -509,7 +509,7 @@ > first_floppy = fh; > > if (fh) >- sys_add_file_handle(fh); >+ sys_add_basilisk_file_handle(fh); > > return fh; > } >@@ -521,11 +521,11 @@ > > void Sys_close(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >- sys_remove_file_handle(fh); >+ sys_remove_basilisk_file_handle(fh); > > if (fh->is_cdrom) { > cache_final(&fh->cache); >@@ -549,7 +549,7 @@ > > size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return 0; > >@@ -599,7 +599,7 @@ > > size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return 0; > >@@ -629,7 +629,7 @@ > > loff_t SysGetFileSize(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -650,7 +650,7 @@ > > void SysEject(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -688,7 +688,7 @@ > > bool SysFormat(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -703,7 +703,7 @@ > > bool SysIsReadOnly(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -717,7 +717,7 @@ > > bool SysIsFixedDisk(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return true; > >@@ -736,7 +736,7 @@ > > bool SysIsDiskInserted(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return false; > >@@ -761,7 +761,7 @@ > > void SysPreventRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -776,7 +776,7 @@ > > void SysAllowRemoval(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; > >@@ -791,7 +791,7 @@ > > bool SysCDReadTOC(void *arg, uint8 *toc) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return false; > >@@ -811,7 +811,7 @@ > > bool SysCDGetPosition(void *arg, uint8 *pos) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return false; > >@@ -841,7 +841,7 @@ > > bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return false; > >@@ -869,7 +869,7 @@ > > bool SysCDPause(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return false; > >@@ -889,7 +889,7 @@ > > bool SysCDResume(void *arg) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return false; > >@@ -908,7 +908,7 @@ > > bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return false; > >@@ -928,7 +928,7 @@ > > bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return false; > >@@ -953,7 +953,7 @@ > > void SysCDSetVolume(void *arg, uint8 left, uint8 right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh || !fh->fh || !fh->is_cdrom) > return; > >@@ -979,7 +979,7 @@ > > void SysCDGetVolume(void *arg, uint8 &left, uint8 &right) > { >- file_handle *fh = (file_handle *)arg; >+ basilisk_file_handle *fh = (basilisk_file_handle *)arg; > if (!fh) > return; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255644
:
179360
|
252607
|
252609
| 301387 |
301389
|
301391
|
332292