]> git.sur5r.net Git - cc65/blob - include/geos/gfile.h
added missing parameters to GetFile and SaveFile functions
[cc65] / include / geos / gfile.h
1 /*
2   GEOS filesystem functions
3
4   ported to small C on 25.12.1999
5   by Maciej 'YTM/Elysium' Witkowiak
6 */
7
8 #ifndef _GFILE_H
9 #define _GFILE_H
10
11 #ifndef _GSTRUCT_H
12 #include <geos/gstruct.h>
13 #endif
14
15 struct filehandle *__fastcall__ Get1stDirEntry(void);
16 struct filehandle *__fastcall__ GetNxtDirEntry(void);
17
18 char __fastcall__ FindFTypes(char *buffer, char ftype, char fmaxnum, const char *classtxt);
19
20 char __fastcall__ GetFile(char saveflag, char loadflag, const char *fname,
21                           const char *loadaddr, const char *datadname, 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);
28
29 char __fastcall__ ReadByte(void);
30
31 char __fastcall__ FollowChain(struct tr_se *startTrSe, char *buffer);
32 char __fastcall__ GetFHdrInfo(struct filehandle *myFile);
33
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);
45
46 /* GEOS filetypes */
47 #define NOT_GEOS        0
48 #define BASIC           1
49 #define ASSEMBLY        2
50 #define DATA            3
51 #define SYSTEM          4
52 #define DESK_ACC        5
53 #define APPLICATION     6
54 #define APPL_DATA       7
55 #define FONT            8
56 #define PRINTER         9
57 #define INPUT_DEVICE    10
58 #define DISK_DEVICE     11
59 #define SYSTEM_BOOT     12
60 #define TEMPORARY       13
61 #define AUTO_EXEC       14
62 #define INPUT_128       15
63 #define NUMFILETYPES    16
64 /* supported structures */
65 #define SEQUENTIAL      0
66 #define VLIR            1
67 /* DOS filetypes */
68 #define DEL             0
69 #define SEQ             1
70 #define PRG             2
71 #define USR             3
72 #define REL             4
73 #define CBM             5
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
79 #define OFF_FNAME       3
80 #define OFF_GHDR_PTR    19
81 #define OFF_GSTRUC_TYPE 21
82 #define OFF_GFILE_TYPE  22
83 #define OFF_YEAR        23
84 #define OFF_SIZE        28
85 #define OFF_NXT_FILE    32
86 /* offsets in file header */
87 #define O_GHIC_WIDTH    2
88 #define O_GHIC_HEIGHT   3
89 #define O_GHIC_PIC      4
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
95 #define O_GHST_VEC      75
96 #define O_GHFNAME       77
97 #define O_128_FLAGS     96
98 #define O_GH_AUTHOR     97
99 #define O_GHP_DISK      97
100 #define O_GHP_FNAME     117
101 #define O_GHINFO_TXT    0xa0
102
103 #endif