Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 255644 | Differences between
and this patch

Collapse All | Expand All

(-)BasiliskII-1.0/src/AmigaOS/sys_amiga.cpp.ori (-26 / +26 lines)
Lines 44-50 Link Here
44
44
45
45
46
// File handles are pointers to these structures
46
// File handles are pointers to these structures
47
struct file_handle {
47
struct basilisk_file_handle {
48
	bool is_file;			// Flag: plain file or /dev/something?
48
	bool is_file;			// Flag: plain file or /dev/something?
49
	bool read_only;			// Copy of Sys_open() flag
49
	bool read_only;			// Copy of Sys_open() flag
50
	loff_t start_byte;		// Size of file header (if any)
50
	loff_t start_byte;		// Size of file header (if any)
Lines 189-196 Link Here
189
		if (FIB.fib_Protection & FIBF_WRITE)
189
		if (FIB.fib_Protection & FIBF_WRITE)
190
			read_only = true;
190
			read_only = true;
191
191
192
		// Create file_handle
192
		// Create basilisk_file_handle
193
		file_handle *fh = new file_handle;
193
		basilisk_file_handle *fh = new basilisk_file_handle;
194
		fh->f = f;
194
		fh->f = f;
195
		fh->is_file = true;
195
		fh->is_file = true;
196
		fh->read_only = read_only;
196
		fh->read_only = read_only;
Lines 255-262 Link Here
255
			}
255
			}
256
		}
256
		}
257
257
258
		// Create file_handle
258
		// Create basilisk_file_handle
259
		file_handle *fh = new file_handle;
259
		basilisk_file_handle *fh = new basilisk_file_handle;
260
		fh->io = io;
260
		fh->io = io;
261
		fh->is_file = false;
261
		fh->is_file = false;
262
		fh->read_only = read_only;
262
		fh->read_only = read_only;
Lines 278-284 Link Here
278
278
279
void Sys_close(void *arg)
279
void Sys_close(void *arg)
280
{
280
{
281
	file_handle *fh = (file_handle *)arg;
281
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
282
	if (!fh)
282
	if (!fh)
283
		return;
283
		return;
284
284
Lines 311-317 Link Here
311
 *  Send one I/O request, using 64-bit addressing if the device supports it
311
 *  Send one I/O request, using 64-bit addressing if the device supports it
312
 */
312
 */
313
313
314
static loff_t send_io_request(file_handle *fh, bool writing, ULONG length, loff_t offset, APTR data)
314
static loff_t send_io_request(basilisk_file_handle *fh, bool writing, ULONG length, loff_t offset, APTR data)
315
{
315
{
316
	if (fh->does_64bit) {
316
	if (fh->does_64bit) {
317
		fh->io->io_Command = writing ? NSCMD_TD_WRITE64 : NSCMD_TD_READ64;
317
		fh->io->io_Command = writing ? NSCMD_TD_WRITE64 : NSCMD_TD_READ64;
Lines 403-409 Link Here
403
403
404
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
404
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
405
{
405
{
406
	file_handle *fh = (file_handle *)arg;
406
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
407
	if (!fh)
407
	if (!fh)
408
		{
408
		{
409
		D(bug("Sys_read/%ld return 0\n", __LINE__));
409
		D(bug("Sys_read/%ld return 0\n", __LINE__));
Lines 509-515 Link Here
509
509
510
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
510
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
511
{
511
{
512
	file_handle *fh = (file_handle *)arg;
512
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
513
	if (!fh)
513
	if (!fh)
514
		{
514
		{
515
		D(bug("Sys_write/%ld return %ld\n", __LINE__, 0));
515
		D(bug("Sys_write/%ld return %ld\n", __LINE__, 0));
Lines 628-634 Link Here
628
628
629
loff_t SysGetFileSize(void *arg)
629
loff_t SysGetFileSize(void *arg)
630
{
630
{
631
	file_handle *fh = (file_handle *)arg;
631
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
632
	if (!fh)
632
	if (!fh)
633
		return true;
633
		return true;
634
634
Lines 642-648 Link Here
642
642
643
void SysEject(void *arg)
643
void SysEject(void *arg)
644
{
644
{
645
	file_handle *fh = (file_handle *)arg;
645
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
646
	if (!fh)
646
	if (!fh)
647
		return;
647
		return;
648
648
Lines 671-677 Link Here
671
671
672
bool SysFormat(void *arg)
672
bool SysFormat(void *arg)
673
{
673
{
674
	file_handle *fh = (file_handle *)arg;
674
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
675
	if (!fh)
675
	if (!fh)
676
		return false;
676
		return false;
677
677
Lines 686-692 Link Here
686
686
687
bool SysIsReadOnly(void *arg)
687
bool SysIsReadOnly(void *arg)
688
{
688
{
689
	file_handle *fh = (file_handle *)arg;
689
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
690
	if (!fh)
690
	if (!fh)
691
		return true;
691
		return true;
692
692
Lines 714-720 Link Here
714
714
715
bool SysIsFixedDisk(void *arg)
715
bool SysIsFixedDisk(void *arg)
716
{
716
{
717
	file_handle *fh = (file_handle *)arg;
717
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
718
	if (!fh)
718
	if (!fh)
719
		return true;
719
		return true;
720
720
Lines 728-734 Link Here
728
728
729
bool SysIsDiskInserted(void *arg)
729
bool SysIsDiskInserted(void *arg)
730
{
730
{
731
	file_handle *fh = (file_handle *)arg;
731
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
732
	if (!fh)
732
	if (!fh)
733
		return false;
733
		return false;
734
734
Lines 763-769 Link Here
763
763
764
void SysPreventRemoval(void *arg)
764
void SysPreventRemoval(void *arg)
765
{
765
{
766
	file_handle *fh = (file_handle *)arg;
766
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
767
	if (!fh)
767
	if (!fh)
768
		return;
768
		return;
769
769
Lines 791-797 Link Here
791
791
792
void SysAllowRemoval(void *arg)
792
void SysAllowRemoval(void *arg)
793
{
793
{
794
	file_handle *fh = (file_handle *)arg;
794
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
795
	if (!fh)
795
	if (!fh)
796
		return;
796
		return;
797
797
Lines 819-825 Link Here
819
819
820
bool SysCDReadTOC(void *arg, uint8 *toc)
820
bool SysCDReadTOC(void *arg, uint8 *toc)
821
{
821
{
822
	file_handle *fh = (file_handle *)arg;
822
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
823
	if (!fh)
823
	if (!fh)
824
		return false;
824
		return false;
825
825
Lines 853-859 Link Here
853
853
854
bool SysCDGetPosition(void *arg, uint8 *pos)
854
bool SysCDGetPosition(void *arg, uint8 *pos)
855
{
855
{
856
	file_handle *fh = (file_handle *)arg;
856
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
857
	if (!fh)
857
	if (!fh)
858
		return false;
858
		return false;
859
859
Lines 887-893 Link Here
887
887
888
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
888
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
889
{
889
{
890
	file_handle *fh = (file_handle *)arg;
890
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
891
	if (!fh)
891
	if (!fh)
892
		return false;
892
		return false;
893
893
Lines 920-926 Link Here
920
920
921
bool SysCDPause(void *arg)
921
bool SysCDPause(void *arg)
922
{
922
{
923
	file_handle *fh = (file_handle *)arg;
923
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
924
	if (!fh)
924
	if (!fh)
925
		return false;
925
		return false;
926
926
Lines 953-959 Link Here
953
953
954
bool SysCDResume(void *arg)
954
bool SysCDResume(void *arg)
955
{
955
{
956
	file_handle *fh = (file_handle *)arg;
956
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
957
	if (!fh)
957
	if (!fh)
958
		return false;
958
		return false;
959
959
Lines 986-992 Link Here
986
986
987
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
987
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
988
{
988
{
989
	file_handle *fh = (file_handle *)arg;
989
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
990
	if (!fh)
990
	if (!fh)
991
		return false;
991
		return false;
992
992
Lines 1031-1037 Link Here
1031
1031
1032
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
1032
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
1033
{
1033
{
1034
	file_handle *fh = (file_handle *)arg;
1034
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1035
	if (!fh)
1035
	if (!fh)
1036
		return false;
1036
		return false;
1037
1037
Lines 1046-1052 Link Here
1046
1046
1047
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
1047
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
1048
{
1048
{
1049
	file_handle *fh = (file_handle *)arg;
1049
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1050
	if (!fh)
1050
	if (!fh)
1051
		return;
1051
		return;
1052
1052
Lines 1096-1102 Link Here
1096
1096
1097
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
1097
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
1098
{
1098
{
1099
	file_handle *fh = (file_handle *)arg;
1099
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1100
	if (!fh)
1100
	if (!fh)
1101
		return;
1101
		return;
1102
1102
(-)BasiliskII-1.0/src/BeOS/sys_beos.cpp.ori (-32 / +32 lines)
Lines 42-49 Link Here
42
42
43
43
44
// File handles are pointers to these structures
44
// File handles are pointers to these structures
45
struct file_handle {
45
struct basilisk_file_handle {
46
	file_handle *next;	// Pointer to next file handle (must be first in struct!)
46
	basilisk_file_handle *next;	// Pointer to next file handle (must be first in struct!)
47
	const char *name;	// File/device name (copied, for mount menu)
47
	const char *name;	// File/device name (copied, for mount menu)
48
	int fd;				// fd of file/device
48
	int fd;				// fd of file/device
49
	bool is_file;		// Flag: plain file or /dev/something?
49
	bool is_file;		// Flag: plain file or /dev/something?
Lines 53-59 Link Here
53
};
53
};
54
54
55
// Linked list of file handles
55
// Linked list of file handles
56
static file_handle *first_file_handle;
56
static basilisk_file_handle *first_basilisk_file_handle;
57
57
58
// Temporary buffer for transfers from/to kernel space
58
// Temporary buffer for transfers from/to kernel space
59
const int TMP_BUF_SIZE = 0x10000;
59
const int TMP_BUF_SIZE = 0x10000;
Lines 104-110 Link Here
104
104
105
void SysInit(void)
105
void SysInit(void)
106
{
106
{
107
	first_file_handle = NULL;
107
	first_basilisk_file_handle = NULL;
108
108
109
	// Allocate temporary buffer
109
	// Allocate temporary buffer
110
	tmp_buf = new uint8[TMP_BUF_SIZE];
110
	tmp_buf = new uint8[TMP_BUF_SIZE];
Lines 127-133 Link Here
127
127
128
void SysCreateVolumeMenu(BMenu *menu, uint32 msg)
128
void SysCreateVolumeMenu(BMenu *menu, uint32 msg)
129
{
129
{
130
	for (file_handle *fh=first_file_handle; fh; fh=fh->next)
130
	for (basilisk_file_handle *fh=first_basilisk_file_handle; fh; fh=fh->next)
131
		if (!SysIsFixedDisk(fh))
131
		if (!SysIsFixedDisk(fh))
132
			menu->AddItem(new BMenuItem(fh->name, new BMessage(msg)));
132
			menu->AddItem(new BMenuItem(fh->name, new BMessage(msg)));
133
}
133
}
Lines 139-146 Link Here
139
139
140
void SysMountVolume(const char *name)
140
void SysMountVolume(const char *name)
141
{
141
{
142
	file_handle *fh;
142
	basilisk_file_handle *fh;
143
	for (fh=first_file_handle; fh && strcmp(fh->name, name); fh=fh->next) ;
143
	for (fh=first_basilisk_file_handle; fh && strcmp(fh->name, name); fh=fh->next) ;
144
	if (fh)
144
	if (fh)
145
		MountVolume(fh);
145
		MountVolume(fh);
146
}
146
}
Lines 336-342 Link Here
336
		fd = open(name, read_only ? O_RDONLY : O_RDWR);
336
		fd = open(name, read_only ? O_RDONLY : O_RDWR);
337
	}
337
	}
338
	if (fd >= 0) {
338
	if (fd >= 0) {
339
		file_handle *fh = new file_handle;
339
		basilisk_file_handle *fh = new basilisk_file_handle;
340
		fh->name = strdup(name);
340
		fh->name = strdup(name);
341
		fh->fd = fd;
341
		fh->fd = fd;
342
		fh->is_file = is_file;
342
		fh->is_file = is_file;
Lines 353-365 Link Here
353
353
354
		// Enqueue file handle
354
		// Enqueue file handle
355
		fh->next = NULL;
355
		fh->next = NULL;
356
		file_handle *q = first_file_handle;
356
		basilisk_file_handle *q = first_basilisk_file_handle;
357
		if (q) {
357
		if (q) {
358
			while (q->next)
358
			while (q->next)
359
				q = q->next;
359
				q = q->next;
360
			q->next = fh;
360
			q->next = fh;
361
		} else
361
		} else
362
			first_file_handle = fh;
362
			first_basilisk_file_handle = fh;
363
		return fh;
363
		return fh;
364
	} else
364
	} else
365
		return NULL;
365
		return NULL;
Lines 372-378 Link Here
372
372
373
void Sys_close(void *arg)
373
void Sys_close(void *arg)
374
{
374
{
375
	file_handle *fh = (file_handle *)arg;
375
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
376
	if (!fh)
376
	if (!fh)
377
		return;
377
		return;
378
378
Lines 381-389 Link Here
381
	close(fh->fd);
381
	close(fh->fd);
382
382
383
	// Dequeue file handle
383
	// Dequeue file handle
384
	file_handle *q = first_file_handle;
384
	basilisk_file_handle *q = first_basilisk_file_handle;
385
	if (q == fh) {
385
	if (q == fh) {
386
		first_file_handle = NULL;
386
		first_basilisk_file_handle = NULL;
387
		delete fh;
387
		delete fh;
388
		return;
388
		return;
389
	}
389
	}
Lines 412-418 Link Here
412
412
413
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
413
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
414
{
414
{
415
	file_handle *fh = (file_handle *)arg;
415
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
416
	if (!fh)
416
	if (!fh)
417
		return 0;
417
		return 0;
418
418
Lines 462-468 Link Here
462
462
463
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
463
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
464
{
464
{
465
	file_handle *fh = (file_handle *)arg;
465
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
466
	if (!fh)
466
	if (!fh)
467
		return 0;
467
		return 0;
468
468
Lines 504-510 Link Here
504
504
505
loff_t SysGetFileSize(void *arg)
505
loff_t SysGetFileSize(void *arg)
506
{
506
{
507
	file_handle *fh = (file_handle *)arg;
507
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
508
	if (!fh)
508
	if (!fh)
509
		return true;
509
		return true;
510
510
Lines 526-532 Link Here
526
526
527
void SysEject(void *arg)
527
void SysEject(void *arg)
528
{
528
{
529
	file_handle *fh = (file_handle *)arg;
529
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
530
	if (!fh)
530
	if (!fh)
531
		return;
531
		return;
532
532
Lines 541-547 Link Here
541
541
542
bool SysFormat(void *arg)
542
bool SysFormat(void *arg)
543
{
543
{
544
	file_handle *fh = (file_handle *)arg;
544
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
545
	if (!fh)
545
	if (!fh)
546
		return false;
546
		return false;
547
547
Lines 558-564 Link Here
558
558
559
bool SysIsReadOnly(void *arg)
559
bool SysIsReadOnly(void *arg)
560
{
560
{
561
	file_handle *fh = (file_handle *)arg;
561
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
562
	if (!fh)
562
	if (!fh)
563
		return true;
563
		return true;
564
564
Lines 585-591 Link Here
585
585
586
bool SysIsFixedDisk(void *arg)
586
bool SysIsFixedDisk(void *arg)
587
{
587
{
588
	file_handle *fh = (file_handle *)arg;
588
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
589
	if (!fh)
589
	if (!fh)
590
		return true;
590
		return true;
591
591
Lines 607-613 Link Here
607
607
608
bool SysIsDiskInserted(void *arg)
608
bool SysIsDiskInserted(void *arg)
609
{
609
{
610
	file_handle *fh = (file_handle *)arg;
610
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
611
	if (!fh)
611
	if (!fh)
612
		return false;
612
		return false;
613
613
Lines 629-635 Link Here
629
629
630
void SysPreventRemoval(void *arg)
630
void SysPreventRemoval(void *arg)
631
{
631
{
632
	file_handle *fh = (file_handle *)arg;
632
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
633
	if (!fh)
633
	if (!fh)
634
		return;
634
		return;
635
635
Lines 644-650 Link Here
644
644
645
void SysAllowRemoval(void *arg)
645
void SysAllowRemoval(void *arg)
646
{
646
{
647
	file_handle *fh = (file_handle *)arg;
647
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
648
	if (!fh)
648
	if (!fh)
649
		return;
649
		return;
650
650
Lines 659-665 Link Here
659
659
660
bool SysCDReadTOC(void *arg, uint8 *toc)
660
bool SysCDReadTOC(void *arg, uint8 *toc)
661
{
661
{
662
	file_handle *fh = (file_handle *)arg;
662
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
663
	if (!fh)
663
	if (!fh)
664
		return false;
664
		return false;
665
665
Lines 680-686 Link Here
680
680
681
bool SysCDGetPosition(void *arg, uint8 *pos)
681
bool SysCDGetPosition(void *arg, uint8 *pos)
682
{
682
{
683
	file_handle *fh = (file_handle *)arg;
683
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
684
	if (!fh)
684
	if (!fh)
685
		return false;
685
		return false;
686
686
Lines 700-706 Link Here
700
700
701
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
701
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
702
{
702
{
703
	file_handle *fh = (file_handle *)arg;
703
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
704
	if (!fh)
704
	if (!fh)
705
		return false;
705
		return false;
706
706
Lines 724-730 Link Here
724
724
725
bool SysCDPause(void *arg)
725
bool SysCDPause(void *arg)
726
{
726
{
727
	file_handle *fh = (file_handle *)arg;
727
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
728
	if (!fh)
728
	if (!fh)
729
		return true;
729
		return true;
730
730
Lines 741-747 Link Here
741
741
742
bool SysCDResume(void *arg)
742
bool SysCDResume(void *arg)
743
{
743
{
744
	file_handle *fh = (file_handle *)arg;
744
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
745
	if (!fh)
745
	if (!fh)
746
		return false;
746
		return false;
747
747
Lines 758-764 Link Here
758
758
759
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
759
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
760
{
760
{
761
	file_handle *fh = (file_handle *)arg;
761
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
762
	if (!fh)
762
	if (!fh)
763
		return false;
763
		return false;
764
764
Lines 775-781 Link Here
775
775
776
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
776
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
777
{
777
{
778
	file_handle *fh = (file_handle *)arg;
778
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
779
	if (!fh)
779
	if (!fh)
780
		return false;
780
		return false;
781
781
Lines 795-801 Link Here
795
795
796
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
796
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
797
{
797
{
798
	file_handle *fh = (file_handle *)arg;
798
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
799
	if (!fh)
799
	if (!fh)
800
		return;
800
		return;
801
801
Lines 815-821 Link Here
815
815
816
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
816
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
817
{
817
{
818
	file_handle *fh = (file_handle *)arg;
818
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
819
	if (!fh)
819
	if (!fh)
820
		return;
820
		return;
821
821
(-)BasiliskII-1.0/src/Unix/sys_unix.cpp.ori (-23 / +23 lines)
Lines 53-59 Link Here
53
53
54
54
55
// File handles are pointers to these structures
55
// File handles are pointers to these structures
56
struct file_handle {
56
struct basilisk_file_handle {
57
	char *name;			// Copy of device/file name
57
	char *name;			// Copy of device/file name
58
	int fd;
58
	int fd;
59
	bool is_file;		// Flag: plain file or /dev/something?
59
	bool is_file;		// Flag: plain file or /dev/something?
Lines 74-80 Link Here
74
};
74
};
75
75
76
// File handle of first floppy drive (for SysMountFirstFloppy())
76
// File handle of first floppy drive (for SysMountFirstFloppy())
77
static file_handle *first_floppy = NULL;
77
static basilisk_file_handle *first_floppy = NULL;
78
78
79
79
80
/*
80
/*
Lines 363-369 Link Here
363
		fd = open(name, O_RDONLY);
363
		fd = open(name, O_RDONLY);
364
	}
364
	}
365
	if (fd >= 0 || is_floppy) { // Floppy open fails if there's no disk inserted
365
	if (fd >= 0 || is_floppy) { // Floppy open fails if there's no disk inserted
366
		file_handle *fh = new file_handle;
366
		basilisk_file_handle *fh = new basilisk_file_handle;
367
		fh->name = strdup(name);
367
		fh->name = strdup(name);
368
		fh->fd = fd;
368
		fh->fd = fd;
369
		fh->is_file = is_file;
369
		fh->is_file = is_file;
Lines 456-462 Link Here
456
456
457
void Sys_close(void *arg)
457
void Sys_close(void *arg)
458
{
458
{
459
	file_handle *fh = (file_handle *)arg;
459
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
460
	if (!fh)
460
	if (!fh)
461
		return;
461
		return;
462
462
Lines 475-481 Link Here
475
475
476
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
476
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
477
{
477
{
478
	file_handle *fh = (file_handle *)arg;
478
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
479
	if (!fh)
479
	if (!fh)
480
		return 0;
480
		return 0;
481
481
Lines 495-501 Link Here
495
495
496
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
496
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
497
{
497
{
498
	file_handle *fh = (file_handle *)arg;
498
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
499
	if (!fh)
499
	if (!fh)
500
		return 0;
500
		return 0;
501
501
Lines 514-520 Link Here
514
514
515
loff_t SysGetFileSize(void *arg)
515
loff_t SysGetFileSize(void *arg)
516
{
516
{
517
	file_handle *fh = (file_handle *)arg;
517
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
518
	if (!fh)
518
	if (!fh)
519
		return true;
519
		return true;
520
520
Lines 540-546 Link Here
540
540
541
void SysEject(void *arg)
541
void SysEject(void *arg)
542
{
542
{
543
	file_handle *fh = (file_handle *)arg;
543
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
544
	if (!fh)
544
	if (!fh)
545
		return;
545
		return;
546
546
Lines 603-609 Link Here
603
603
604
bool SysFormat(void *arg)
604
bool SysFormat(void *arg)
605
{
605
{
606
	file_handle *fh = (file_handle *)arg;
606
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
607
	if (!fh)
607
	if (!fh)
608
		return false;
608
		return false;
609
609
Lines 618-624 Link Here
618
618
619
bool SysIsReadOnly(void *arg)
619
bool SysIsReadOnly(void *arg)
620
{
620
{
621
	file_handle *fh = (file_handle *)arg;
621
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
622
	if (!fh)
622
	if (!fh)
623
		return true;
623
		return true;
624
624
Lines 642-648 Link Here
642
642
643
bool SysIsFixedDisk(void *arg)
643
bool SysIsFixedDisk(void *arg)
644
{
644
{
645
	file_handle *fh = (file_handle *)arg;
645
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
646
	if (!fh)
646
	if (!fh)
647
		return true;
647
		return true;
648
648
Lines 661-667 Link Here
661
661
662
bool SysIsDiskInserted(void *arg)
662
bool SysIsDiskInserted(void *arg)
663
{
663
{
664
	file_handle *fh = (file_handle *)arg;
664
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
665
	if (!fh)
665
	if (!fh)
666
		return false;
666
		return false;
667
667
Lines 717-723 Link Here
717
717
718
void SysPreventRemoval(void *arg)
718
void SysPreventRemoval(void *arg)
719
{
719
{
720
	file_handle *fh = (file_handle *)arg;
720
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
721
	if (!fh)
721
	if (!fh)
722
		return;
722
		return;
723
723
Lines 734-740 Link Here
734
734
735
void SysAllowRemoval(void *arg)
735
void SysAllowRemoval(void *arg)
736
{
736
{
737
	file_handle *fh = (file_handle *)arg;
737
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
738
	if (!fh)
738
	if (!fh)
739
		return;
739
		return;
740
740
Lines 751-757 Link Here
751
751
752
bool SysCDReadTOC(void *arg, uint8 *toc)
752
bool SysCDReadTOC(void *arg, uint8 *toc)
753
{
753
{
754
	file_handle *fh = (file_handle *)arg;
754
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
755
	if (!fh)
755
	if (!fh)
756
		return false;
756
		return false;
757
757
Lines 890-896 Link Here
890
890
891
bool SysCDGetPosition(void *arg, uint8 *pos)
891
bool SysCDGetPosition(void *arg, uint8 *pos)
892
{
892
{
893
	file_handle *fh = (file_handle *)arg;
893
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
894
	if (!fh)
894
	if (!fh)
895
		return false;
895
		return false;
896
896
Lines 955-961 Link Here
955
955
956
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
956
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
957
{
957
{
958
	file_handle *fh = (file_handle *)arg;
958
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
959
	if (!fh)
959
	if (!fh)
960
		return false;
960
		return false;
961
961
Lines 992-998 Link Here
992
992
993
bool SysCDPause(void *arg)
993
bool SysCDPause(void *arg)
994
{
994
{
995
	file_handle *fh = (file_handle *)arg;
995
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
996
	if (!fh)
996
	if (!fh)
997
		return false;
997
		return false;
998
998
Lines 1015-1021 Link Here
1015
1015
1016
bool SysCDResume(void *arg)
1016
bool SysCDResume(void *arg)
1017
{
1017
{
1018
	file_handle *fh = (file_handle *)arg;
1018
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1019
	if (!fh)
1019
	if (!fh)
1020
		return false;
1020
		return false;
1021
1021
Lines 1038-1044 Link Here
1038
1038
1039
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
1039
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
1040
{
1040
{
1041
	file_handle *fh = (file_handle *)arg;
1041
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1042
	if (!fh)
1042
	if (!fh)
1043
		return false;
1043
		return false;
1044
1044
Lines 1061-1067 Link Here
1061
1061
1062
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
1062
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
1063
{
1063
{
1064
	file_handle *fh = (file_handle *)arg;
1064
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1065
	if (!fh)
1065
	if (!fh)
1066
		return false;
1066
		return false;
1067
1067
Lines 1076-1082 Link Here
1076
1076
1077
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
1077
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
1078
{
1078
{
1079
	file_handle *fh = (file_handle *)arg;
1079
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1080
	if (!fh)
1080
	if (!fh)
1081
		return;
1081
		return;
1082
1082
Lines 1102-1108 Link Here
1102
1102
1103
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
1103
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
1104
{
1104
{
1105
	file_handle *fh = (file_handle *)arg;
1105
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
1106
	if (!fh)
1106
	if (!fh)
1107
		return;
1107
		return;
1108
1108
(-)BasiliskII-1.0/src/Windows/sys_windows.cpp.ori (-45 / +45 lines)
Lines 54-60 Link Here
54
};
54
};
55
55
56
// File handles are pointers to these structures
56
// File handles are pointers to these structures
57
struct file_handle {
57
struct basilisk_file_handle {
58
	char *name;			// Copy of device/file name
58
	char *name;			// Copy of device/file name
59
	HANDLE fh;
59
	HANDLE fh;
60
	bool is_file;		// Flag: plain file or physical device?
60
	bool is_file;		// Flag: plain file or physical device?
Lines 68-88 Link Here
68
};
68
};
69
69
70
// Open file handles
70
// Open file handles
71
struct open_file_handle {
71
struct open_basilisk_file_handle {
72
	file_handle *fh;
72
	basilisk_file_handle *fh;
73
	open_file_handle *next;
73
	open_basilisk_file_handle *next;
74
};
74
};
75
static open_file_handle *open_file_handles = NULL;
75
static open_basilisk_file_handle *open_basilisk_file_handles = NULL;
76
76
77
// File handle of first floppy drive (for SysMountFirstFloppy())
77
// File handle of first floppy drive (for SysMountFirstFloppy())
78
static file_handle *first_floppy = NULL;
78
static basilisk_file_handle *first_floppy = NULL;
79
79
80
// CD-ROM variables
80
// CD-ROM variables
81
static const int CD_READ_AHEAD_SECTORS = 16;
81
static const int CD_READ_AHEAD_SECTORS = 16;
82
static char *sector_buffer = NULL;
82
static char *sector_buffer = NULL;
83
83
84
// Prototypes
84
// Prototypes
85
static bool is_cdrom_readable(file_handle *fh);
85
static bool is_cdrom_readable(basilisk_file_handle *fh);
86
86
87
87
88
/*
88
/*
Lines 114-138 Link Here
114
 *  Manage open file handles
114
 *  Manage open file handles
115
 */
115
 */
116
116
117
static void sys_add_file_handle(file_handle *fh)
117
static void sys_add_basilisk_file_handle(basilisk_file_handle *fh)
118
{
118
{
119
	open_file_handle *p = new open_file_handle;
119
	open_basilisk_file_handle *p = new open_basilisk_file_handle;
120
	p->fh = fh;
120
	p->fh = fh;
121
	p->next = open_file_handles;
121
	p->next = open_basilisk_file_handles;
122
	open_file_handles = p;
122
	open_basilisk_file_handles = p;
123
}
123
}
124
124
125
static void sys_remove_file_handle(file_handle *fh)
125
static void sys_remove_basilisk_file_handle(basilisk_file_handle *fh)
126
{
126
{
127
	open_file_handle *p = open_file_handles;
127
	open_basilisk_file_handle *p = open_basilisk_file_handles;
128
	open_file_handle *q = NULL;
128
	open_basilisk_file_handle *q = NULL;
129
129
130
	while (p) {
130
	while (p) {
131
		if (p->fh == fh) {
131
		if (p->fh == fh) {
132
			if (q)
132
			if (q)
133
				q->next = p->next;
133
				q->next = p->next;
134
			else
134
			else
135
				open_file_handles = p->next;
135
				open_basilisk_file_handles = p->next;
136
			delete p;
136
			delete p;
137
			break;
137
			break;
138
		}
138
		}
Lines 148-155 Link Here
148
148
149
void mount_removable_media(int media)
149
void mount_removable_media(int media)
150
{
150
{
151
	for (open_file_handle *p = open_file_handles; p != NULL; p = p->next) {
151
	for (open_basilisk_file_handle *p = open_basilisk_file_handles; p != NULL; p = p->next) {
152
		file_handle * const fh = p->fh;
152
		basilisk_file_handle * const fh = p->fh;
153
153
154
		if (fh->is_cdrom && (media & MEDIA_CD)) {
154
		if (fh->is_cdrom && (media & MEDIA_CD)) {
155
			cache_clear(&fh->cache);
155
			cache_clear(&fh->cache);
Lines 266-272 Link Here
266
 *  Can't give too much however, would be annoying, this is difficult..
266
 *  Can't give too much however, would be annoying, this is difficult..
267
 */
267
 */
268
268
269
static inline int cd_read_with_retry(file_handle *fh, ULONG LBA, int count, char *buf )
269
static inline int cd_read_with_retry(basilisk_file_handle *fh, ULONG LBA, int count, char *buf )
270
{
270
{
271
	if (!fh || !fh->fh)
271
	if (!fh || !fh->fh)
272
		return 0;
272
		return 0;
Lines 274-280 Link Here
274
	return CdenableSysReadCdBytes(fh->fh, LBA, count, buf);
274
	return CdenableSysReadCdBytes(fh->fh, LBA, count, buf);
275
}
275
}
276
276
277
static int cd_read(file_handle *fh, cachetype *cptr, ULONG LBA, int count, char *buf)
277
static int cd_read(basilisk_file_handle *fh, cachetype *cptr, ULONG LBA, int count, char *buf)
278
{
278
{
279
	ULONG l1, l2, cc;
279
	ULONG l1, l2, cc;
280
	int i, c_count, got_bytes = 0, nblocks, s_inx, ss, first_block;
280
	int i, c_count, got_bytes = 0, nblocks, s_inx, ss, first_block;
Lines 373-379 Link Here
373
 *  Check if file handle FH represents a readable CD-ROM
373
 *  Check if file handle FH represents a readable CD-ROM
374
 */
374
 */
375
375
376
static bool is_cdrom_readable(file_handle *fh)
376
static bool is_cdrom_readable(basilisk_file_handle *fh)
377
{
377
{
378
	if (!fh || !fh->fh)
378
	if (!fh || !fh->fh)
379
		return false;
379
		return false;
Lines 418-424 Link Here
418
418
419
void *Sys_open(const char *path_name, bool read_only)
419
void *Sys_open(const char *path_name, bool read_only)
420
{
420
{
421
	file_handle * fh = NULL;
421
	basilisk_file_handle * fh = NULL;
422
422
423
	// Parse path name and options
423
	// Parse path name and options
424
	char name[MAX_PATH];
424
	char name[MAX_PATH];
Lines 448-454 Link Here
448
				0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
448
				0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
449
449
450
			if (h != INVALID_HANDLE_VALUE) {
450
			if (h != INVALID_HANDLE_VALUE) {
451
				fh = new file_handle;
451
				fh = new basilisk_file_handle;
452
				fh->name = strdup(name);
452
				fh->name = strdup(name);
453
				fh->fh = h;
453
				fh->fh = h;
454
				fh->is_file = false;
454
				fh->is_file = false;
Lines 487-493 Link Here
487
		}
487
		}
488
488
489
		if (h != INVALID_HANDLE_VALUE) {
489
		if (h != INVALID_HANDLE_VALUE) {
490
			fh = new file_handle;
490
			fh = new basilisk_file_handle;
491
			fh->name = strdup(name);
491
			fh->name = strdup(name);
492
			fh->fh = h;
492
			fh->fh = h;
493
			fh->is_file = true;
493
			fh->is_file = true;
Lines 509-515 Link Here
509
		first_floppy = fh;
509
		first_floppy = fh;
510
510
511
	if (fh)
511
	if (fh)
512
		sys_add_file_handle(fh);
512
		sys_add_basilisk_file_handle(fh);
513
513
514
	return fh;
514
	return fh;
515
}
515
}
Lines 521-531 Link Here
521
521
522
void Sys_close(void *arg)
522
void Sys_close(void *arg)
523
{
523
{
524
	file_handle *fh = (file_handle *)arg;
524
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
525
	if (!fh)
525
	if (!fh)
526
		return;
526
		return;
527
527
528
	sys_remove_file_handle(fh);
528
	sys_remove_basilisk_file_handle(fh);
529
529
530
	if (fh->is_cdrom) {
530
	if (fh->is_cdrom) {
531
		cache_final(&fh->cache);
531
		cache_final(&fh->cache);
Lines 549-555 Link Here
549
549
550
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
550
size_t Sys_read(void *arg, void *buffer, loff_t offset, size_t length)
551
{
551
{
552
	file_handle *fh = (file_handle *)arg;
552
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
553
	if (!fh)
553
	if (!fh)
554
		return 0;
554
		return 0;
555
555
Lines 599-605 Link Here
599
599
600
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
600
size_t Sys_write(void *arg, void *buffer, loff_t offset, size_t length)
601
{
601
{
602
	file_handle *fh = (file_handle *)arg;
602
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
603
	if (!fh)
603
	if (!fh)
604
		return 0;
604
		return 0;
605
605
Lines 629-635 Link Here
629
629
630
loff_t SysGetFileSize(void *arg)
630
loff_t SysGetFileSize(void *arg)
631
{
631
{
632
	file_handle *fh = (file_handle *)arg;
632
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
633
	if (!fh)
633
	if (!fh)
634
		return true;
634
		return true;
635
635
Lines 650-656 Link Here
650
650
651
void SysEject(void *arg)
651
void SysEject(void *arg)
652
{
652
{
653
	file_handle *fh = (file_handle *)arg;
653
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
654
	if (!fh)
654
	if (!fh)
655
		return;
655
		return;
656
656
Lines 688-694 Link Here
688
688
689
bool SysFormat(void *arg)
689
bool SysFormat(void *arg)
690
{
690
{
691
	file_handle *fh = (file_handle *)arg;
691
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
692
	if (!fh)
692
	if (!fh)
693
		return false;
693
		return false;
694
694
Lines 703-709 Link Here
703
703
704
bool SysIsReadOnly(void *arg)
704
bool SysIsReadOnly(void *arg)
705
{
705
{
706
	file_handle *fh = (file_handle *)arg;
706
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
707
	if (!fh)
707
	if (!fh)
708
		return true;
708
		return true;
709
709
Lines 717-723 Link Here
717
717
718
bool SysIsFixedDisk(void *arg)
718
bool SysIsFixedDisk(void *arg)
719
{
719
{
720
	file_handle *fh = (file_handle *)arg;
720
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
721
	if (!fh)
721
	if (!fh)
722
		return true;
722
		return true;
723
723
Lines 736-742 Link Here
736
736
737
bool SysIsDiskInserted(void *arg)
737
bool SysIsDiskInserted(void *arg)
738
{
738
{
739
	file_handle *fh = (file_handle *)arg;
739
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
740
	if (!fh)
740
	if (!fh)
741
		return false;
741
		return false;
742
742
Lines 761-767 Link Here
761
761
762
void SysPreventRemoval(void *arg)
762
void SysPreventRemoval(void *arg)
763
{
763
{
764
	file_handle *fh = (file_handle *)arg;
764
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
765
	if (!fh)
765
	if (!fh)
766
		return;
766
		return;
767
767
Lines 776-782 Link Here
776
776
777
void SysAllowRemoval(void *arg)
777
void SysAllowRemoval(void *arg)
778
{
778
{
779
	file_handle *fh = (file_handle *)arg;
779
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
780
	if (!fh)
780
	if (!fh)
781
		return;
781
		return;
782
782
Lines 791-797 Link Here
791
791
792
bool SysCDReadTOC(void *arg, uint8 *toc)
792
bool SysCDReadTOC(void *arg, uint8 *toc)
793
{
793
{
794
	file_handle *fh = (file_handle *)arg;
794
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
795
	if (!fh || !fh->fh || !fh->is_cdrom)
795
	if (!fh || !fh->fh || !fh->is_cdrom)
796
		return false;
796
		return false;
797
797
Lines 811-817 Link Here
811
811
812
bool SysCDGetPosition(void *arg, uint8 *pos)
812
bool SysCDGetPosition(void *arg, uint8 *pos)
813
{
813
{
814
	file_handle *fh = (file_handle *)arg;
814
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
815
	if (!fh || !fh->fh || !fh->is_cdrom)
815
	if (!fh || !fh->fh || !fh->is_cdrom)
816
		return false;
816
		return false;
817
817
Lines 841-847 Link Here
841
841
842
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
842
bool SysCDPlay(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, uint8 end_m, uint8 end_s, uint8 end_f)
843
{
843
{
844
	file_handle *fh = (file_handle *)arg;
844
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
845
	if (!fh || !fh->fh || !fh->is_cdrom)
845
	if (!fh || !fh->fh || !fh->is_cdrom)
846
		return false;
846
		return false;
847
847
Lines 869-875 Link Here
869
869
870
bool SysCDPause(void *arg)
870
bool SysCDPause(void *arg)
871
{
871
{
872
	file_handle *fh = (file_handle *)arg;
872
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
873
	if (!fh || !fh->fh || !fh->is_cdrom)
873
	if (!fh || !fh->fh || !fh->is_cdrom)
874
		return false;
874
		return false;
875
875
Lines 889-895 Link Here
889
889
890
bool SysCDResume(void *arg)
890
bool SysCDResume(void *arg)
891
{
891
{
892
	file_handle *fh = (file_handle *)arg;
892
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
893
	if (!fh || !fh->fh || !fh->is_cdrom)
893
	if (!fh || !fh->fh || !fh->is_cdrom)
894
		return false;
894
		return false;
895
895
Lines 908-914 Link Here
908
908
909
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
909
bool SysCDStop(void *arg, uint8 lead_out_m, uint8 lead_out_s, uint8 lead_out_f)
910
{
910
{
911
	file_handle *fh = (file_handle *)arg;
911
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
912
	if (!fh || !fh->fh || !fh->is_cdrom)
912
	if (!fh || !fh->fh || !fh->is_cdrom)
913
		return false;
913
		return false;
914
914
Lines 928-934 Link Here
928
928
929
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
929
bool SysCDScan(void *arg, uint8 start_m, uint8 start_s, uint8 start_f, bool reverse)
930
{
930
{
931
	file_handle *fh = (file_handle *)arg;
931
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
932
	if (!fh || !fh->fh || !fh->is_cdrom)
932
	if (!fh || !fh->fh || !fh->is_cdrom)
933
		return false;
933
		return false;
934
934
Lines 953-959 Link Here
953
953
954
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
954
void SysCDSetVolume(void *arg, uint8 left, uint8 right)
955
{
955
{
956
	file_handle *fh = (file_handle *)arg;
956
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
957
	if (!fh || !fh->fh || !fh->is_cdrom)
957
	if (!fh || !fh->fh || !fh->is_cdrom)
958
		return;
958
		return;
959
959
Lines 979-985 Link Here
979
979
980
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
980
void SysCDGetVolume(void *arg, uint8 &left, uint8 &right)
981
{
981
{
982
	file_handle *fh = (file_handle *)arg;
982
	basilisk_file_handle *fh = (basilisk_file_handle *)arg;
983
	if (!fh)
983
	if (!fh)
984
		return;
984
		return;
985
985

Return to bug 255644