Added "support" for the 64 bit data structures of EHCI in appendix B, in case the...
[cake.git] / tools / adflib / adf_file.h
blob950bcd19d80a6796118fd561c90b17978435ea09
1 #ifndef ADF_FILE_H
2 #define ADF_FILE_H 1
4 /*
5 * ADF Library. (C) 1997-1998 Laurent Clevy
7 * adf_file.h
9 */
11 #include"prefix.h"
13 #include"adf_str.h"
15 RETCODE adfGetFileBlocks(struct Volume* vol, struct bFileHeaderBlock* entry,
16 struct FileBlocks* );
17 RETCODE adfFreeFileBlocks(struct Volume* vol, struct bFileHeaderBlock *entry);
18 PREFIX long adfFileRealSize(unsigned long size, int blockSize, long *dataN, long *extN);
20 long adfPos2DataBlock(long pos, int blockSize, int *posInExtBlk, int *posInDataBlk, long *curDataN );
22 RETCODE adfWriteFileHdrBlock(struct Volume *vol, SECTNUM nSect, struct bFileHeaderBlock* fhdr);
24 RETCODE adfReadDataBlock(struct Volume *vol, SECTNUM nSect, void *data);
25 RETCODE adfWriteDataBlock(struct Volume *vol, SECTNUM nSect, void *data);
26 RETCODE adfReadFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext);
27 RETCODE adfWriteFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext);
29 PREFIX struct File* adfOpenFile(struct Volume *vol, char* name, char *mode);
30 PREFIX void adfCloseFile(struct File *file);
31 PREFIX long adfReadFile(struct File* file, long n, unsigned char *buffer);
32 PREFIX BOOL adfEndOfFile(struct File* file);
33 RETCODE adfReadNextFileBlock(struct File* file);
34 PREFIX long adfWriteFile(struct File *file, long n, unsigned char *buffer);
35 SECTNUM adfCreateNextFileBlock(struct File* file);
36 PREFIX void adfFlushFile(struct File *file);
40 #endif /* ADF_FILE_H */