1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

Ignore start address in cbm_opendir. Rearrange the code somewhat to make it

shorter.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4319 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-10-03 18:38:39 +00:00
parent 82c312bd72
commit a3529cd048

View File

@ -13,20 +13,21 @@
unsigned char __fastcall__ cbm_opendir (unsigned char lfn, unsigned char device)
{
unsigned char __fastcall__ cbm_opendir (unsigned char lfn, unsigned
char device) {
unsigned char status;
if ((status = cbm_open (lfn, device, CBM_READ, "$")) == 0) {
if (cbm_k_chkin (lfn) == 0) {
if (cbm_k_basin () == 0x01) { /* Start address */
if (cbm_k_basin () == 0x04) {
cbm_k_clrch ();
return 0;
}
/* Ignore start address */
cbm_k_basin();
cbm_k_basin();
if (cbm_k_readst()) {
cbm_close(lfn);
status = 2;
cbm_k_clrch();
} else {
cbm_close (lfn);
cbm_k_clrch ();
return 2;
status = 0;
cbm_k_clrch();
}
}
}