2000-05-28 13:40:48 +00:00
|
|
|
/*
|
|
|
|
GEOS filesystem functions
|
|
|
|
|
2003-04-04 14:41:06 +00:00
|
|
|
by Maciej 'YTM/Elysium' Witkowiak
|
2000-05-28 13:40:48 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GFILE_H
|
|
|
|
#define _GFILE_H
|
|
|
|
|
|
|
|
#ifndef _GSTRUCT_H
|
|
|
|
#include <geos/gstruct.h>
|
|
|
|
#endif
|
|
|
|
|
2003-08-28 20:51:38 +00:00
|
|
|
struct filehandle *Get1stDirEntry(void);
|
|
|
|
struct filehandle *GetNxtDirEntry(void);
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2001-08-15 16:09:35 +00:00
|
|
|
char __fastcall__ FindFTypes(char *buffer, char ftype, char fmaxnum, const char *classtxt);
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-05-01 16:18:04 +00:00
|
|
|
char __fastcall__ GetFile(char flag, const char *fname,
|
|
|
|
const char *loadaddr, const char *datadname, const char *datafname);
|
2001-08-15 16:09:35 +00:00
|
|
|
char __fastcall__ FindFile(const char *fname);
|
2003-04-04 21:16:15 +00:00
|
|
|
char __fastcall__ ReadFile(struct tr_se *myTrSe, char *buffer, unsigned flength);
|
2003-04-17 16:22:17 +00:00
|
|
|
char __fastcall__ SaveFile(char skip, struct fileheader *myHeader);
|
2000-05-28 13:40:48 +00:00
|
|
|
char __fastcall__ FreeFile(struct tr_se myTable[]);
|
2001-08-15 16:09:35 +00:00
|
|
|
char __fastcall__ DeleteFile(const char *fname);
|
|
|
|
char __fastcall__ RenameFile(const char *source, const char *target);
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-08-28 20:51:38 +00:00
|
|
|
char ReadByte(void);
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
char __fastcall__ FollowChain(struct tr_se *startTrSe, char *buffer);
|
|
|
|
char __fastcall__ GetFHdrInfo(struct filehandle *myFile);
|
|
|
|
|
2001-08-15 16:09:35 +00:00
|
|
|
char __fastcall__ OpenRecordFile(const char *fname);
|
2003-08-28 20:51:38 +00:00
|
|
|
char CloseRecordFile(void);
|
|
|
|
char NextRecord(void);
|
|
|
|
char PreviousRecord(void);
|
2000-05-28 13:40:48 +00:00
|
|
|
char __fastcall__ PointRecord(char);
|
2003-08-28 20:51:38 +00:00
|
|
|
char DeleteRecord(void);
|
|
|
|
char InsertRecord(void);
|
|
|
|
char AppendRecord(void);
|
2003-04-04 21:16:15 +00:00
|
|
|
char __fastcall__ ReadRecord(char *buffer, unsigned flength);
|
|
|
|
char __fastcall__ WriteRecord(const char *buffer, unsigned flength);
|
2003-08-28 20:51:38 +00:00
|
|
|
char UpdateRecordFile(void);
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
/* GEOS filetypes */
|
|
|
|
#define NOT_GEOS 0
|
|
|
|
#define BASIC 1
|
|
|
|
#define ASSEMBLY 2
|
|
|
|
#define DATA 3
|
|
|
|
#define SYSTEM 4
|
|
|
|
#define DESK_ACC 5
|
|
|
|
#define APPLICATION 6
|
|
|
|
#define APPL_DATA 7
|
|
|
|
#define FONT 8
|
|
|
|
#define PRINTER 9
|
|
|
|
#define INPUT_DEVICE 10
|
|
|
|
#define DISK_DEVICE 11
|
|
|
|
#define SYSTEM_BOOT 12
|
|
|
|
#define TEMPORARY 13
|
|
|
|
#define AUTO_EXEC 14
|
|
|
|
#define INPUT_128 15
|
|
|
|
#define NUMFILETYPES 16
|
|
|
|
/* supported structures */
|
|
|
|
#define SEQUENTIAL 0
|
|
|
|
#define VLIR 1
|
|
|
|
/* DOS filetypes */
|
|
|
|
#define DEL 0
|
|
|
|
#define SEQ 1
|
|
|
|
#define PRG 2
|
|
|
|
#define USR 3
|
|
|
|
#define REL 4
|
|
|
|
#define CBM 5
|
|
|
|
|
|
|
|
#endif
|