home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gd201.zip / gd-2.0.1 / gd_io.h < prev    next >
C/C++ Source or Header  |  2001-04-03  |  917b  |  40 lines

  1. #ifndef GD_IO_H
  2. #define GD_IO_H 1
  3.  
  4. #include <stdio.h>
  5.  
  6. typedef struct gdIOCtx {
  7.     int    (*getC)(struct gdIOCtx*);
  8.     int    (*getBuf)(struct gdIOCtx*, void*, int);
  9.  
  10.         void     (*putC)(struct gdIOCtx*, int);
  11.     int    (*putBuf)(struct gdIOCtx*, const void*, int);
  12.  
  13.     int    (*seek)(struct gdIOCtx*, const int);
  14.     long    (*tell)(struct gdIOCtx*);
  15.  
  16.     void    (*free)(struct gdIOCtx*);
  17.  
  18. } gdIOCtx;
  19.  
  20. typedef struct gdIOCtx    *gdIOCtxPtr;
  21.  
  22. void Putword(int w, gdIOCtx *ctx);
  23. void Putchar(int c, gdIOCtx *ctx);
  24.  
  25. void gdPutC(const unsigned char c, gdIOCtx *ctx);
  26. int gdPutBuf(const void *, int, gdIOCtx*);
  27. void gdPutWord(int w, gdIOCtx *ctx);
  28. void gdPutInt(int w, gdIOCtx *ctx);
  29.  
  30. int gdGetC(gdIOCtx *ctx);
  31. int gdGetBuf(void *, int, gdIOCtx*);
  32. int gdGetByte(int *result, gdIOCtx *ctx);
  33. int gdGetWord(int *result, gdIOCtx *ctx);
  34. int gdGetInt(int *result, gdIOCtx *ctx);
  35.  
  36. int gdSeek(gdIOCtx *ctx, const int);
  37. long gdTell(gdIOCtx *ctx);
  38.  
  39. #endif
  40.