home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 326.lha / MRARPFile / MRARPFile.h < prev    next >
C/C++ Source or Header  |  1989-12-28  |  2KB  |  39 lines

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