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 >
Wrap
Text File
|
1989-01-14
|
1KB
|
30 lines
/* Listing 2 -- File HEXIO.H */
/* Header File for Intel Hex / S-Record File I/O Routines */
#include <stdio.h>
#define HEOF (-1) /* This is our value for EOF. */
#define HEXRECSIZE 32 /* Max. number of data bytes per */
/* record on writes. */
typedef struct { /* This is the control block that */
FILE *file; /* actually runs hex file I/O. */
unsigned char *bufp;
unsigned loadaddr;
unsigned char flags;
unsigned char count;
unsigned char buf[256];
} HFILE;
/* Function declarations: */
int hclose(HFILE *);
int heof(HFILE *);
int herror(HFILE *);
int hgetc(HFILE *);
int hputc(unsigned char,HFILE *);
unsigned htell(HFILE *);
void hseek(HFILE *,unsigned);
HFILE *hopen(char *,char *);