2 GEOS filesystem functions
4 ported to small C on 25.12.1999
5 by Maciej 'YTM/Elysium' Witkowiak
12 #include <geos/gstruct.h>
15 struct filehandle *__fastcall__ Get1stDirEntry(void);
16 struct filehandle *__fastcall__ GetNxtDirEntry(void);
18 char __fastcall__ FindFTypes(char *buffer, char ftype, char fmaxnum, const char *classtxt);
20 char __fastcall__ GetFile(char flag, const char *fname,
21 const char *loadaddr, const char *datadname, const char *datafname);
22 char __fastcall__ FindFile(const char *fname);
23 char __fastcall__ ReadFile(struct tr_se *myTrSe, char *buffer, unsigned flength);
24 char __fastcall__ SaveFile(char skip, struct fileheader *myHeader);
25 char __fastcall__ FreeFile(struct tr_se myTable[]);
26 char __fastcall__ DeleteFile(const char *fname);
27 char __fastcall__ RenameFile(const char *source, const char *target);
29 char __fastcall__ ReadByte(void);
31 char __fastcall__ FollowChain(struct tr_se *startTrSe, char *buffer);
32 char __fastcall__ GetFHdrInfo(struct filehandle *myFile);
34 char __fastcall__ OpenRecordFile(const char *fname);
35 char __fastcall__ CloseRecordFile(void);
36 char __fastcall__ NextRecord(void);
37 char __fastcall__ PreviousRecord(void);
38 char __fastcall__ PointRecord(char);
39 char __fastcall__ DeleteRecord(void);
40 char __fastcall__ InsertRecord(void);
41 char __fastcall__ AppendRecord(void);
42 char __fastcall__ ReadRecord(char *buffer, unsigned flength);
43 char __fastcall__ WriteRecord(const char *buffer, unsigned flength);
44 char __fastcall__ UpdateRecordFile(void);
57 #define INPUT_DEVICE 10
58 #define DISK_DEVICE 11
59 #define SYSTEM_BOOT 12
63 #define NUMFILETYPES 16
64 /* supported structures */
74 /* directory offsets */
75 /* offsets in dir entry */
76 #define FRST_FILE_ENTRY 2
77 #define OFF_CFILE_TYPE 0
78 #define OFF_DE_TR_SC 1
80 #define OFF_GHDR_PTR 19
81 #define OFF_GSTRUC_TYPE 21
82 #define OFF_GFILE_TYPE 22
85 #define OFF_NXT_FILE 32
86 /* offsets in file header */
87 #define O_GHIC_WIDTH 2
88 #define O_GHIC_HEIGHT 3
90 #define O_GHCMDR_TYPE 68
91 #define O_GHGEOS_TYPE 69
92 #define O_GHSTR_TYPE 70
93 #define O_GHST_ADDR 71
94 #define O_GHEND_ADDR 73
97 #define O_128_FLAGS 96
98 #define O_GH_AUTHOR 97
100 #define O_GHP_FNAME 117
101 #define O_GHINFO_TXT 0xa0