2002-04-13 02:03:09 +00:00
|
|
|
#ifndef GD_IO_H
|
|
|
|
#define GD_IO_H 1
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2003-04-05 17:23:55 +00:00
|
|
|
|
|
|
|
#ifdef VMS
|
|
|
|
#define Putchar gdPutchar
|
|
|
|
#endif
|
2003-12-28 20:11:08 +00:00
|
|
|
|
2002-04-13 02:03:09 +00:00
|
|
|
typedef struct gdIOCtx {
|
|
|
|
int (*getC)(struct gdIOCtx*);
|
|
|
|
int (*getBuf)(struct gdIOCtx*, void*, int);
|
|
|
|
|
2003-03-13 02:22:31 +00:00
|
|
|
void (*putC)(struct gdIOCtx*, int);
|
2002-04-13 02:03:09 +00:00
|
|
|
int (*putBuf)(struct gdIOCtx*, const void*, int);
|
|
|
|
|
|
|
|
int (*seek)(struct gdIOCtx*, const int);
|
|
|
|
long (*tell)(struct gdIOCtx*);
|
|
|
|
|
2003-03-13 02:22:31 +00:00
|
|
|
void (*gd_free)(struct gdIOCtx*);
|
2002-04-13 02:03:09 +00:00
|
|
|
|
|
|
|
} gdIOCtx;
|
|
|
|
|
|
|
|
typedef struct gdIOCtx *gdIOCtxPtr;
|
|
|
|
|
|
|
|
void Putword(int w, gdIOCtx *ctx);
|
|
|
|
void Putchar(int c, gdIOCtx *ctx);
|
|
|
|
|
|
|
|
void gdPutC(const unsigned char c, gdIOCtx *ctx);
|
|
|
|
int gdPutBuf(const void *, int, gdIOCtx*);
|
|
|
|
void gdPutWord(int w, gdIOCtx *ctx);
|
|
|
|
void gdPutInt(int w, gdIOCtx *ctx);
|
|
|
|
|
|
|
|
int gdGetC(gdIOCtx *ctx);
|
|
|
|
int gdGetBuf(void *, int, gdIOCtx*);
|
|
|
|
int gdGetByte(int *result, gdIOCtx *ctx);
|
|
|
|
int gdGetWord(int *result, gdIOCtx *ctx);
|
|
|
|
int gdGetInt(int *result, gdIOCtx *ctx);
|
|
|
|
|
|
|
|
int gdSeek(gdIOCtx *ctx, const int);
|
|
|
|
long gdTell(gdIOCtx *ctx);
|
|
|
|
|
|
|
|
#endif
|