6 typedef struct filenode_t
9 struct filenode_t
*next
; /* pointer to the next node */
10 struct datahandle_t
*data
; /* a datafile this file belongs to */
11 char *name
; /* comple path */
13 int offset
; /* offset in the disk file when the logical file starts */
18 typedef struct datahandle_t
20 struct datahandle_t
*next
;
21 FILE *sourceFile
; /* disk opened file */
22 FileNode
*files
; /* list of file headers */
26 /* type of file the filehandle describes */
34 typedef struct filehandle_t
36 int type
; /* FX_xxx */
38 DataHandle
*data
; /* data where the file resists */
39 FileNode
*file
; /* node describing the file attributes */
45 /* buffering veriables (used mainly with FH_ARCHIVE */
47 int position
; /* current file position */
48 char *buffer
; /* buffer used for faster reading */
49 int bufferPosition
; /* position in the buffer */
51 int bufferBytes
; /* number of bytes in the buffer */
55 DataHandle
*dataOpen(char *fname
);
56 void dataClose(DataHandle
*data
);
57 void dataCloseAll(void);
58 void *dataLoadFile(char *fname
);
59 unsigned int dataFileLength(char *fname
);
60 FileHandle
*dataFileOpen(char *fname
);
61 void dataFileClose(FileHandle
*handle
);
62 void *dataFileGets(FileHandle
*handle
, void *buf
, int len
);
63 int dataFileRead(FileHandle
*handle
, void *buf
, int len
);
64 void dataExportRequestedFiles(char *fname
);
65 void dataStoreRequestedFiles(int enable
);