home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_07_04 / v7n4033a.txt < prev    next >
Text File  |  1989-01-14  |  1KB  |  30 lines

  1. /*                     Listing 2 -- File HEXIO.H                        */
  2. /*        Header File for Intel Hex / S-Record File I/O Routines        */
  3.  
  4. #include <stdio.h>
  5.  
  6. #define HEOF            (-1)    /*  This is our value for EOF.          */
  7.  
  8. #define HEXRECSIZE      32      /*  Max. number of data bytes per       */
  9.                                 /*      record on writes.               */
  10.  
  11. typedef struct {                /*  This is the control block that      */
  12.         FILE *file;             /*  actually runs hex file I/O.         */
  13.         unsigned char *bufp;
  14.         unsigned loadaddr;
  15.         unsigned char flags;
  16.         unsigned char count;
  17.         unsigned char buf[256];
  18. } HFILE;
  19.  
  20. /*  Function declarations:                                              */
  21.  
  22. int hclose(HFILE *);
  23. int heof(HFILE *);
  24. int herror(HFILE *);
  25. int hgetc(HFILE *);
  26. int hputc(unsigned char,HFILE *);
  27. unsigned htell(HFILE *);
  28. void hseek(HFILE *,unsigned);
  29. HFILE *hopen(char *,char *);
  30.