gd-libgd / src / gd_io.h

#ifndef GD_IO_H
#define GD_IO_H 1

#include <stdio.h>

typedef struct gdIOCtx
{
  int (*getC) (struct gdIOCtx *);
  int (*getBuf) (struct gdIOCtx *, void *, int);

  void (*putC) (struct gdIOCtx *, int);
  int (*putBuf) (struct gdIOCtx *, const void *, int);

  /* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */
  int (*seek) (struct gdIOCtx *, const int); 

  long (*tell) (struct gdIOCtx *);

  void (*gd_free) (struct gdIOCtx *);

}
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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.