]> git.sur5r.net Git - cc65/blob - include/geos/gfile.h
removed unnecessary __fastcall__s, some minor cleanups
[cc65] / include / geos / gfile.h
1 /*
2   GEOS filesystem functions
3
4   by Maciej 'YTM/Elysium' Witkowiak
5 */
6
7 #ifndef _GFILE_H
8 #define _GFILE_H
9
10 #ifndef _GSTRUCT_H
11 #include <geos/gstruct.h>
12 #endif
13
14 struct filehandle *Get1stDirEntry(void);
15 struct filehandle *GetNxtDirEntry(void);
16
17 char __fastcall__ FindFTypes(char *buffer, char ftype, char fmaxnum, const char *classtxt);
18
19 char __fastcall__ GetFile(char flag, const char *fname,
20                           const char *loadaddr, const char *datadname, const char *datafname);
21 char __fastcall__ FindFile(const char *fname);
22 char __fastcall__ ReadFile(struct tr_se *myTrSe, char *buffer, unsigned flength);
23 char __fastcall__ SaveFile(char skip, struct fileheader *myHeader);
24 char __fastcall__ FreeFile(struct tr_se myTable[]);
25 char __fastcall__ DeleteFile(const char *fname);
26 char __fastcall__ RenameFile(const char *source, const char *target);
27
28 char ReadByte(void);
29
30 char __fastcall__ FollowChain(struct tr_se *startTrSe, char *buffer);
31 char __fastcall__ GetFHdrInfo(struct filehandle *myFile);
32
33 char __fastcall__ OpenRecordFile(const char *fname);
34 char CloseRecordFile(void);
35 char NextRecord(void);
36 char PreviousRecord(void);
37 char __fastcall__ PointRecord(char);
38 char DeleteRecord(void);
39 char InsertRecord(void);
40 char AppendRecord(void);
41 char __fastcall__ ReadRecord(char *buffer, unsigned flength);
42 char __fastcall__ WriteRecord(const char *buffer, unsigned flength);
43 char UpdateRecordFile(void);
44
45 /* GEOS filetypes */
46 #define NOT_GEOS        0
47 #define BASIC           1
48 #define ASSEMBLY        2
49 #define DATA            3
50 #define SYSTEM          4
51 #define DESK_ACC        5
52 #define APPLICATION     6
53 #define APPL_DATA       7
54 #define FONT            8
55 #define PRINTER         9
56 #define INPUT_DEVICE    10
57 #define DISK_DEVICE     11
58 #define SYSTEM_BOOT     12
59 #define TEMPORARY       13
60 #define AUTO_EXEC       14
61 #define INPUT_128       15
62 #define NUMFILETYPES    16
63 /* supported structures */
64 #define SEQUENTIAL      0
65 #define VLIR            1
66 /* DOS filetypes */
67 #define DEL             0
68 #define SEQ             1
69 #define PRG             2
70 #define USR             3
71 #define REL             4
72 #define CBM             5
73 /* directory offsets */
74 /* offsets in dir entry i.e. index dirEntryBuf with these */
75 #define FRST_FILE_ENTRY 2
76 #define OFF_CFILE_TYPE  0
77 #define OFF_DE_TR_SC    1
78 #define OFF_FNAME       3
79 #define OFF_GHDR_PTR    19
80 #define OFF_GSTRUC_TYPE 21
81 #define OFF_GFILE_TYPE  22
82 #define OFF_YEAR        23
83 #define OFF_SIZE        28
84 #define OFF_NXT_FILE    32
85 /* offsets in file header i.e. index fileHeader with these */
86 #define O_GHIC_WIDTH    2
87 #define O_GHIC_HEIGHT   3
88 #define O_GHIC_PIC      4
89 #define O_GHCMDR_TYPE   68
90 #define O_GHGEOS_TYPE   69
91 #define O_GHSTR_TYPE    70
92 #define O_GHST_ADDR     71
93 #define O_GHEND_ADDR    73
94 #define O_GHST_VEC      75
95 #define O_GHFNAME       77
96 #define O_128_FLAGS     96
97 #define O_GH_AUTHOR     97
98 #define O_GHP_DISK      97
99 #define O_GHP_FNAME     117
100 #define O_GHINFO_TXT    160
101
102 #endif