2 GEOS filesystem functions
4 ported to small C on 25.12.1999
5 by Maciej 'YTM/Alliance' 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__ FindFile(const char *fname);
21 char __fastcall__ ReadFile(struct tr_se *myTrSe, char *buffer, int flength);
22 char __fastcall__ SaveFile(struct fileheader *myHeader);
23 char __fastcall__ FreeFile(struct tr_se myTable[]);
24 char __fastcall__ DeleteFile(const char *fname);
25 char __fastcall__ RenameFile(const char *source, const char *target);
27 char __fastcall__ ReadByte(void);
29 char __fastcall__ FollowChain(struct tr_se *startTrSe, char *buffer);
30 char __fastcall__ GetFHdrInfo(struct filehandle *myFile);
32 char __fastcall__ OpenRecordFile(const char *fname);
33 char __fastcall__ CloseRecordFile(void);
34 char __fastcall__ NextRecord(void);
35 char __fastcall__ PreviousRecord(void);
36 char __fastcall__ PointRecord(char);
37 char __fastcall__ DeleteRecord(void);
38 char __fastcall__ InsertRecord(void);
39 char __fastcall__ AppendRecord(void);
40 char __fastcall__ ReadRecord(char *buffer, int flength);
41 char __fastcall__ WriteRecord(const char *buffer, int flength);
42 char __fastcall__ UpdateRecordFile(void);
55 #define INPUT_DEVICE 10
56 #define DISK_DEVICE 11
57 #define SYSTEM_BOOT 12
61 #define NUMFILETYPES 16
62 /* supported structures */
72 /* directory offsets */
73 /* offsets in dir entry */
74 #define FRST_FILE_ENTRY 2
75 #define OFF_CFILE_TYPE 0
76 #define OFF_DE_TR_SC 1
78 #define OFF_GHDR_PTR 19
79 #define OFF_GSTRUC_TYPE 21
80 #define OFF_GFILE_TYPE 22
83 #define OFF_NXT_FILE 32
84 /* offsets in file header */
85 #define O_GHIC_WIDTH 2
86 #define O_GHIC_HEIGHT 3
88 #define O_GHCMDR_TYPE 68
89 #define O_GHGEOS_TYPE 69
90 #define O_GHSTR_TYPE 70
91 #define O_GHST_ADDR 71
92 #define O_GHEND_ADDR 73
95 #define O_128_FLAGS 96
96 #define O_GH_AUTHOR 97
98 #define O_GHP_FNAME 117
99 #define O_GHINFO_TXT 0xa0