struct Dosfile{
Dos * dos; /* owning dos file system */
int pdir; /* sector containing directory entry */
int odir; /* offset to same */
char name[8];
char ext[3];
uchar attr;
long length;
long pstart; /* physical start cluster address */
long pcurrent; /* physical current cluster address */
long lcurrent; /* logical current cluster address */
long offset;
};
struct Dos{
int dev; /* device id */
long (*read)(int, void*, long); /* read routine */
long (*seek)(int, long); /* seek routine */
long (*write)(int, void*, long); /* write routine */
int start; /* start of file system (sector no.) */
int sectbytes; /* size of a sector */
int clustsize; /* size of a cluster (in sectors) */
int clustbytes; /* size of a cluster (in bytes) */
int nresrv; /* sectors */
int nfats; /* usually 2 */
int rootsize; /* number of entries */
int volsize; /* in sectors */
int mediadesc;
int fatsize; /* size of a fat (in sectors) */
int fatbytes; /* size of a fat (in bytes) */
int fatclusters; /* no. of clusters governed by fat */
int fatbits; /* 12 or 16 */
long fataddr; /* sector address of first fat */
long rootaddr; /* sector address of root directory */
long dataaddr; /* sector address of first data block */
long freeptr; /* for cluster allocation */