home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 552.lha / KeyMacro_v1.2 / MRArpFile.h < prev    next >
C/C++ Source or Header  |  1991-09-08  |  1KB  |  46 lines

  1. /*  MRARPFile.h
  2.  *  Definitions for ARP extended file support.
  3.  *  Author: Mark R. Rinfret
  4.  */
  5.  
  6. #ifndef MRARPFILE_H
  7. #define MRARPFILE_H
  8.  
  9. #ifndef __NO_PRAGMAS
  10. #define __NO_PRAGMAS 1
  11. #endif    /* __NO_PRAGMAS */
  12.  
  13. #include <libraries/arpbase.h>
  14.  
  15. typedef struct
  16. {
  17.     BPTR             fh;        /* AmigaDOS FileHandle pointer */
  18.     struct DefaultTracker    *fileTracker;
  19.     struct DefaultTracker    *myTracker;    /* this structure's tracker */
  20.     struct DefaultTracker    *bufTracker;
  21.     UBYTE            *buf;        /* read/write buffer */
  22.     LONG             bufSize;    /* allocated size of buffer */
  23.     LONG             bufLength;    /* number of bytes in buffer */
  24.     LONG             bufPos;    /* read/write position */
  25.     LONG             mode;        /* how file was opened */
  26.     LONG             lastError;    /* last error code encountered */
  27.     LONG             lastPosition;    /* position of last access */
  28.     WORD             endOfFile;    /* used by FRead, FGets */
  29. } ARPFileHandle;
  30.  
  31.     /* Create function prototypes if necessary. */
  32.  
  33. #ifndef _MRARPFILE_PRIVATE
  34.  
  35. char *            FGetsARP(char *s,LONG length,ARPFileHandle *file);
  36. LONG            FPutsARP(char *s,ARPFileHandle *file);
  37. LONG            ReadARPFile(ARPFileHandle *file,APTR buffer,LONG length);
  38. LONG            CloseARPFile(ARPFileHandle *file);
  39. ARPFileHandle *        OpenARPFile(char *name,LONG accessMode,LONG bytes);
  40. LONG            SeekARPFile(ARPFileHandle *file,LONG position,LONG mode);
  41. LONG            WriteARPFile(ARPFileHandle *file,APTR buffer,LONG length);
  42.  
  43. #endif    /* _MRARPFILE_PRIVATE */
  44.  
  45. #endif    /* MRARPFILE_H */
  46.