/* MRARPFile.h * Definitions for ARP extended file support. * Author: Mark R. Rinfret */ #ifndef MRARPFILE_H #define MRARPFILE_H #include typedef struct { BPTR fh; /* AmigaDOS FileHandle pointer */ struct DefaultTracker *fileTracker; struct DefaultTracker *myTracker; /* this structure's tracker */ struct DefaultTracker *bufTracker; UBYTE *buf; /* read/write buffer */ LONG bufSize; /* allocated size of buffer */ LONG bufLength; /* number of bytes in buffer */ LONG bufPos; /* read/write position */ LONG mode; /* how file was opened */ LONG lastError; /* last error code encountered */ LONG lastPosition; /* position of last access */ WORD endOfFile; /* used by FRead, FGets */ } ARPFileHandle; /* Create function prototypes if necessary. */ #ifndef _MRARPFILE_PRIVATE char * FGetsARP(char *s,LONG length,ARPFileHandle *file); LONG FPutsARP(char *s,ARPFileHandle *file); LONG ReadARPFile(ARPFileHandle *file,APTR buffer,LONG length); LONG CloseARPFile(ARPFileHandle *file); ARPFileHandle * OpenARPFile(char *name,LONG accessMode,LONG bytes); LONG SeekARPFile(ARPFileHandle *file,LONG position,LONG mode); LONG WriteARPFile(ARPFileHandle *file,APTR buffer,LONG length); #endif /* _MRARPFILE_PRIVATE */ #endif /* MRARPFILE_H */